diff --git a/doc/interfaces_overview.md b/doc/interfaces_overview.md index 54245b449a6..7c737998881 100644 --- a/doc/interfaces_overview.md +++ b/doc/interfaces_overview.md @@ -38,9 +38,9 @@ r.slope.aspect elevation=elevation slope=slope aspect=aspect GRASS Python interface provides libraries to create GRASS scripts and access the internal data structures of GRASS. The Python interface consists of two main libraries: -*[grass.script](https://grass.osgeo.org/grass-stable/manuals/libpython/script_intro.html)* +*[grass.script](https://grass.osgeo.org/grass-devel/manuals/libpython/script_intro.html)* provides a Python interface to GRASS tools -and *[grass.pygrass](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_index.html)* +and *[grass.pygrass](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_index.html)* enables access to the internal data structures of GRASS. To get started with scripting, create a new project with `gs.create_project` and diff --git a/doc/jupyter_intro.md b/doc/jupyter_intro.md index 64796c44711..22c8af8e3b4 100644 --- a/doc/jupyter_intro.md +++ b/doc/jupyter_intro.md @@ -112,7 +112,7 @@ m.show() ``` !!! grass-tip "Map Size and Extent" - See [detailed documentation](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.jupyter.html#module-grass.jupyter.map) + See [detailed documentation](https://grass.osgeo.org/grass-devel/manuals/libpython/grass.jupyter.html#module-grass.jupyter.map) for changing the map size and geographic extent. ## Interactive map @@ -138,7 +138,7 @@ m.show() The map gives you the ability to query the map, zoom in and out, and pan around, set the computational region, and create simple vector data by digitizing. -To change the default basemap, see [documentation](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.jupyter.html#module-grass.jupyter.interactivemap). +To change the default basemap, see [documentation](https://grass.osgeo.org/grass-devel/manuals/libpython/grass.jupyter.html#module-grass.jupyter.interactivemap). ## 3D map @@ -250,11 +250,11 @@ flow_map.show() ## Python library documentation For complete documentation on the `grass.jupyter` package, see the -[grass.jupyter](https://grass.osgeo.org/grass-stable/manuals/libpython/grass.jupyter.html) +[grass.jupyter](https://grass.osgeo.org/grass-devel/manuals/libpython/grass.jupyter.html) library documentation page. For complete documentation on the `grass.script` package, see the -[grass.script](https://grass.osgeo.org/grass-stable/manuals/libpython/script_intro.html) +[grass.script](https://grass.osgeo.org/grass-devel/manuals/libpython/script_intro.html) library documentation page. ## Tutorials diff --git a/doc/python_intro.md b/doc/python_intro.md index 3489c942855..1c1fb80060c 100644 --- a/doc/python_intro.md +++ b/doc/python_intro.md @@ -9,9 +9,9 @@ authors: GRASS Python interface provides libraries to create GRASS scripts and access the internal data structures of GRASS. The Python interface consists of two main libraries: -*[grass.script](https://grass.osgeo.org/grass-stable/manuals/libpython/script_intro.html)* +*[grass.script](https://grass.osgeo.org/grass-devel/manuals/libpython/script_intro.html)* provides a Python interface to GRASS tools -and *[grass.pygrass](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_index.html)* +and *[grass.pygrass](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_index.html)* enables access to the internal data structures of GRASS. ## Scripting API @@ -61,14 +61,14 @@ gs.run_command("r.slope.aspect", elevation="elevation", slope="slope") ### Running tools -The *[gs.run_command](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.run_command)*, -*[gs.parse_command](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.parse_command)*, -*[gs.read_command](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.read_command)*, -and *[gs.write_command](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.write_command)* +The *[gs.run_command](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.run_command)*, +*[gs.parse_command](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.parse_command)*, +*[gs.read_command](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.read_command)*, +and *[gs.write_command](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.write_command)* functions are the four main *grass.script* functions used to execute GRASS tools with Python. -The *[gs.run_command](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.run_command)* +The *[gs.run_command](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.run_command)* function is used to run a GRASS tool when you require no return value. For example, when computing raster slope with [r.slope.aspect](r.slope.aspect.md): @@ -77,7 +77,7 @@ no return value. For example, when computing raster slope with gs.run_command("r.slope.aspect", elevation="elevation", slope="slope") ``` -The *[gs.parse_command](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.parse_command)* +The *[gs.parse_command](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.parse_command)* function is useful when the tool returns machine-readable text output on the standard output. For example, use it to parse the output of [v.db.select](v.db.select.md#json) @@ -87,7 +87,7 @@ to represent attribute data in a Python dictionary: data = gs.parse_command("v.db.select", map="hospitals", format="json") ``` -The *[gs.read_command](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.read_command)* +The *[gs.read_command](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.read_command)* function returns the text output of a GRASS tool. This can be useful when you want to print human-readable output of a tool. For example, when reading the output of [g.region](g.region.md): @@ -96,7 +96,7 @@ For example, when reading the output of [g.region](g.region.md): print(gs.read_command("g.region", flags="p")) ``` -The *[gs.write_command](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.write_command)* +The *[gs.write_command](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.write_command)* function is used to send data to a GRASS tool through the standard input. For example, when writing a custom color scheme to a raster map with [r.colors](r.colors.md): @@ -116,7 +116,7 @@ gs.write_command("r.colors", ) ``` -For error handling, please refer to the [documentation](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.handle_errors). +For error handling, please refer to the [documentation](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.handle_errors). !!! grass-tip "Overwriting data" By default, GRASS prevents overwriting existing maps to protect your data, @@ -143,15 +143,15 @@ The most common ones are: | Function | Description | |----------|-------------| -| [gs.region](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.core.region) | Get the GRASS region info as a dictionary | -| [gs.raster_info](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.raster.raster_info) | Get basic information about a raster map as a dictionary| -| [gs.raster_what](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.raster.raster_what) | Query raster at coordinates | -| [gs.mapcalc](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.raster.mapcalc) | Execute a raster algebra expression | -| [vector_columns](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.vector.vector_columns) | Get the columns of a vector attribute table | -| [vector_info](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.vector.vector_info) | Get information about a vector map | -| [vector_db_select](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.vector.vector_db_select) | Get attribute data of a vector map | -| [vector_info_topo](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.vector.vector_info_topo) | Get topology information about a vector map | -| [mapcalc3d](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.raster3d.mapcalc3d) | Execute a 3D raster algebra expression | +| [gs.region](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.core.region) | Get the GRASS region info as a dictionary | +| [gs.raster_info](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.raster.raster_info) | Get basic information about a raster map as a dictionary| +| [gs.raster_what](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.raster.raster_what) | Query raster at coordinates | +| [gs.mapcalc](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.raster.mapcalc) | Execute a raster algebra expression | +| [vector_columns](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.vector.vector_columns) | Get the columns of a vector attribute table | +| [vector_info](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.vector.vector_info) | Get information about a vector map | +| [vector_db_select](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.vector.vector_db_select) | Get attribute data of a vector map | +| [vector_info_topo](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.vector.vector_info_topo) | Get topology information about a vector map | +| [mapcalc3d](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.raster3d.mapcalc3d) | Execute a 3D raster algebra expression | Here is an example how to use these helper functions: @@ -173,8 +173,8 @@ The GRASS Python API includes a NumPy interface that allows you to read and write raster data as NumPy arrays. This makes it easy to integrate GRASS with the broader Python scientific stack for advanced analysis and custom modeling. -Using *[grass.script.array](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.array.array)* -and *[grass.script.array3d](https://grass.osgeo.org/grass-stable/manuals/libpython/script.html#script.array.array3d)*, +Using *[grass.script.array](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.array.array)* +and *[grass.script.array3d](https://grass.osgeo.org/grass-devel/manuals/libpython/script.html#script.array.array3d)*, you can switch between GRASS raster maps and NumPy arrays, run GRASS tools, and perform array-based operations as needed. It works for rasters as well as for 3D rasters. @@ -233,27 +233,27 @@ core packages of `grass.pygrass` include: | Topic | Documentation Link | |-------------------------------|------------------------------------------------------------------------------------------------------| -| Project and Region Management | [grass.pygrass.gis](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_gis.html) | -| Raster Data Access | [grass.pygrass.raster](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html) | -| Vector Data Access | [grass.pygrass.vector](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html) | -| GRASS Tool Access | [grass.pygrass.modules](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_modules.html) | +| Project and Region Management | [grass.pygrass.gis](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_gis.html) | +| Raster Data Access | [grass.pygrass.raster](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html) | +| Vector Data Access | [grass.pygrass.vector](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html) | +| GRASS Tool Access | [grass.pygrass.modules](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_modules.html) | For a complete reference of the PyGRASS library, see the Full Documentation: -[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_index.html){ .md-button } +[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_index.html){ .md-button } ### Project Management -The [grass.pygrass.gis](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_gis.html) +The [grass.pygrass.gis](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_gis.html) module provides access to the project and region management -of GRASS. The [grass.pygrass.gis](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_gis.html) +of GRASS. The [grass.pygrass.gis](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_gis.html) module provides functions to create, manage, and delete GRASS projects and -mapsets. The core classes include [Gisdbase](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.gis.html#pygrass.gis.Gisdbase), -[Location](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.gis.html#pygrass.gis.Location), +mapsets. The core classes include [Gisdbase](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.gis.html#pygrass.gis.Gisdbase), +[Location](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.gis.html#pygrass.gis.Location), and [Mapset](https://grass.osgeo.org/grass85/manuals/libpython/pygrass.gis.html#pygrass.gis.Mapset). -The [Gisdbase](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.gis.html#pygrass.gis.Gisdbase) +The [Gisdbase](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.gis.html#pygrass.gis.Gisdbase) class provides access to the GRASS database and where you can manage GRASS projects and mapsets. @@ -268,14 +268,14 @@ print(projects) ``` This will return a list of all projects in the GRASS database directory as -[Location](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.gis.html#pygrass.gis.Location) +[Location](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.gis.html#pygrass.gis.Location) objects. ```text ['nc_spm_08_grass7', 'my_project'] ``` -The [Location](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.gis.html#pygrass.gis.Location) +The [Location](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.gis.html#pygrass.gis.Location) object provides access to the specific project and its mapsets. @@ -305,11 +305,11 @@ rasters = mapset.glist(type='raster') ``` For more details about the `gis` module, see the Full Documentation: -[GIS Module](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_gis.html) +[GIS Module](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_gis.html) ### Region -The [grass.pygrass.gis.region](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.gis.html#pygrass.gis.region.Region) +The [grass.pygrass.gis.region](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.gis.html#pygrass.gis.region.Region) module gives access to read and modify computational regions. For example, to get the current extent and resolution of the active mapset: @@ -373,7 +373,7 @@ Resolution: [10.0, 10.0] For more details about the `region` module, see the Full Documentation: -[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.gis.html#module-pygrass.gis){ .md-button } +[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.gis.html#module-pygrass.gis){ .md-button } ### Data Management @@ -381,20 +381,20 @@ For more details about the `region` module, see the Full Documentation: Do you have an idea that requires more advanced raster processing? PyGRASS provides direct read and write access to raster data with the -[grass.pygrass.raster](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html) -module. The core classes include [RasterRow](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html#rasterrow), -[RasterRowIO](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html#rasterrowio), -and [RasterSegment](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html#rastersegment). +[grass.pygrass.raster](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html) +module. The core classes include [RasterRow](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html#rasterrow), +[RasterRowIO](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html#rasterrowio), +and [RasterSegment](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html#rastersegment). Each class provides a different level of access to the raster data with its own set of read and write capabilities, as shown in the table below. | Class | Description | Read | Write | |----------------|-------------------------------------------------------- |-------|------| -| [RasterRow](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html#rasterrow) | Read write access to raster row data. | :rabbit2: Random | :rabbit2: Sequential | -| [RasterRowIO](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html#rasterrowio) | Fast read only access to raster row data. | :rabbit2: Cached | :x: No | -| [RasterSegment](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html#rastersegment) | Simultaneous read write access to tiled raster segments stored on disk. | :turtle: Cached | :turtle: Random | +| [RasterRow](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html#rasterrow) | Read write access to raster row data. | :rabbit2: Random | :rabbit2: Sequential | +| [RasterRowIO](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html#rasterrowio) | Fast read only access to raster row data. | :rabbit2: Cached | :x: No | +| [RasterSegment](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html#rastersegment) | Simultaneous read write access to tiled raster segments stored on disk. | :turtle: Cached | :turtle: Random | -The [RasterRow](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html#rasterrow) +The [RasterRow](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html#rasterrow) class allows for either read or write access to raster row data and provides methods to access raster state and metadata. To read all rows of the `elevation` raster: @@ -438,7 +438,7 @@ with raster.RasterRow('elevation') as elev: ``` !!! grass-tip "RasterSegment" - The [RasterSegment](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html#rastersegment) + The [RasterSegment](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html#rastersegment) class provides simultaneous read and write access to tiled raster segments stored on disk. This class is useful for working with large raster datasets that do not fit into memory. @@ -446,21 +446,21 @@ with raster.RasterRow('elevation') as elev: For more details about the `raster` module, see the Full Documentation: -[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_raster.html){ .md-button } +[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_raster.html){ .md-button } #### Vector -The [grass.pygrass.vector](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html#vector) +The [grass.pygrass.vector](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html#vector) module provides direct read and write access to vector data in GRASS. -The core classes include [Vector](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.Vector) -and [VectorTopo](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html#vectortopo-label). +The core classes include [Vector](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.Vector) +and [VectorTopo](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html#vectortopo-label). | Class | Description | |----------------|--------------| -| [Vector](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.Vector) | Provides basic information about vector data. | -| [VectorTopo](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html#vectortopo-label) | Read and write access to vector data. | +| [Vector](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.Vector) | Provides basic information about vector data. | +| [VectorTopo](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html#vectortopo-label) | Read and write access to vector data. | -Here is a simple example with [Vector](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.Vector) +Here is a simple example with [Vector](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.Vector) to check if a vector map exists and print the mapset it is in. ```python @@ -475,9 +475,9 @@ if roads.exists(): ``` -With the [VectorTopo](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html#vectortopo-label) +With the [VectorTopo](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html#vectortopo-label) class you can get the same basic information about the -vector map returned by the [Vector](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.Vector) +vector map returned by the [Vector](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.Vector) class in addition to read and write access. ```python @@ -496,22 +496,22 @@ with VectorTopo('roadsmajor') as roads: #### Geometry and Attributes -In GRASS vector [geometry](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html#geometry-classes) +In GRASS vector [geometry](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html#geometry-classes) and attributes are treated separately. This means that the attributes of a vector are not automatically read when the geometry is read. To build a geometry object, you can use the geometry class in the -[grass.pygrass.vector.geometry](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#module-pygrass.vector.geometry) +[grass.pygrass.vector.geometry](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#module-pygrass.vector.geometry) module. | Geometry Class | Description | |----------------|-------------| -| [Area](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Area) | Represents the topological composition of a closed ring of boundaries and a centroid. | -| [Boundary](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Boundary) | Represents the border line to describe an area. | -| [Centroid](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Centroid) | Represents a centroid feature in a vector map. | -| [Isle](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Isle) | Represents an isle feature in a vector map. | -| [Line](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line) | Represents a line feature in a vector map. | -| [Point](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Point) | Represents a point feature in a vector map. | +| [Area](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Area) | Represents the topological composition of a closed ring of boundaries and a centroid. | +| [Boundary](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Boundary) | Represents the border line to describe an area. | +| [Centroid](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Centroid) | Represents a centroid feature in a vector map. | +| [Isle](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Isle) | Represents an isle feature in a vector map. | +| [Line](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line) | Represents a line feature in a vector map. | +| [Point](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Point) | Represents a point feature in a vector map. | Each geometry class has its own set of methods to help extract useful information. For example, let's built a `Boundary` object from a list of points @@ -528,7 +528,7 @@ area = border.area ``` To access the attributes of a vector map, you can use the `attrs` attribute -of the [VectorTopo](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html#vectortopo-label) +of the [VectorTopo](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html#vectortopo-label) object. The `attrs` attribute is a dictionary that contains the attributes of the current feature. @@ -546,7 +546,7 @@ with VectorTopo('roadsmajor') as roads: ``` To write a new feature to the `roads` vector map with attributes -we need to access the database of the vector map with the [VectorTopo](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html#vectortopo-label). +we need to access the database of the vector map with the [VectorTopo](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html#vectortopo-label). Here is an example of how to write a new feature to the `roads` vector map. @@ -582,7 +582,7 @@ with VectorTopo('roadsmajor', mode='rw') as roads: roads.build() ``` -Featurs can also be updated by using the [rewrite](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.VectorTopo.rewrite) +Featurs can also be updated by using the [rewrite](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.VectorTopo.rewrite) method instead of the `write`. If the geometry of the feature has not changed, you can save the attributes to the database table without rebuilding the topology using `table.conn.commit`. @@ -610,10 +610,10 @@ You can also use many of `Geometry` and `Attribute` methods to filter features in a more concise way. For example, to test if a random point is within 5000 meters of a road segment -you can use the [distance](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line.distance) -method of the [Line](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line) -geometry object. The [distance](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line.distance) -method returns a [LineDist](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.LineDist) +you can use the [distance](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line.distance) +method of the [Line](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line) +geometry object. The [distance](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.Line.distance) +method returns a [LineDist](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.geometry.LineDist) object that contains the distance and the closest point on the line. ```python @@ -641,8 +641,8 @@ with VectorTopo('roadsmajor') as roads: ``` Or to simple filter a table using `SQL` you can use the `where` method with -[table_to_dict](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.VectorTopo.table_to_dict) -to get a dictionary of the features that match the query, the [table.Filter](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass.vector.html#pygrass.vector.table.Filters) +[table_to_dict](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.VectorTopo.table_to_dict) +to get a dictionary of the features that match the query, the [table.Filter](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass.vector.html#pygrass.vector.table.Filters) class for more advanced operations. ```python @@ -679,17 +679,17 @@ SELECT * FROM roadsmajor WHERE ROAD_NAME = 'NC-50' ORDER BY cat LIMIT 5; !!! grass-tip "Used Different SQL Database" The default database for GRASS is SQLite, but you can use other SQL databases - like PostgreSQL with the `driver` option in the [VectorTopo](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html#vectortopo-label) + like PostgreSQL with the `driver` option in the [VectorTopo](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html#vectortopo-label) object. For more details about the `vector` module, see the Full Documentation: -[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_vector.html){ .md-button } +[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_vector.html){ .md-button } ### GRASS Tool Access -The [grass.pygrass.modules](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_modules.html) +The [grass.pygrass.modules](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_modules.html) module provides access to the GRASS tools and modules. The `Module` class provides a Pythonic interface to the GRASS modules and tools. @@ -729,13 +729,13 @@ slope_aspect_tool.keywords slope_aspect_tool.inputs ``` -The [grass.pygrass.modules](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_modules.html) +The [grass.pygrass.modules](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_modules.html) module provides an alterative approach to running GRASS tools. To learn more about the `Module` class, see the Full Documentation: -[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-stable/manuals/libpython/pygrass_modules.html#module-class){ .md-button } +[Full Documentation :material-arrow-right-bold:](https://grass.osgeo.org/grass-devel/manuals/libpython/pygrass_modules.html#module-class){ .md-button } ## GRASS Python best practices diff --git a/imagery/i.gensigset/i.gensigset.md b/imagery/i.gensigset/i.gensigset.md index 90b7b142c5a..51ad0df7a28 100644 --- a/imagery/i.gensigset/i.gensigset.md +++ b/imagery/i.gensigset/i.gensigset.md @@ -37,7 +37,7 @@ This map must be prepared by the user in advance by using a combination of *[wxGUI vector digitizer](wxGUI.vdigit.md)* and *[v.to.rast](v.to.rast.md)*, or some other import/development process (e.g., -*[v.transects](https://grass.osgeo.org/grass-stable/manuals/addons/v.transects.html))* +*[v.transects](https://grass.osgeo.org/grass-devel/manuals/addons/v.transects.html))* to define the areas representative of the classes in the image. At present, there is no fully-interactive tool specifically designed for diff --git a/imagery/i.landsat.toar/i.landsat.toar.md b/imagery/i.landsat.toar/i.landsat.toar.md index 2736983c0b9..7e6a81f9c73 100644 --- a/imagery/i.landsat.toar/i.landsat.toar.md +++ b/imagery/i.landsat.toar/i.landsat.toar.md @@ -26,7 +26,7 @@ settings, in order to have the largest possible sample of pixels from where to get the darkest one of the scene and perform the DOS correction. To limit the results to a custom region, the user is advised to clip the results (with -[r.clip](https://grass.osgeo.org/grass-stable/manuals/addons/r.clip.html), +[r.clip](https://grass.osgeo.org/grass-devel/manuals/addons/r.clip.html), for instance) or to define the region first, import the images with region cropping, and then running the module. diff --git a/imagery/i.pca/i.pca.md b/imagery/i.pca/i.pca.md index a4b522a8afd..ab4d94eae04 100644 --- a/imagery/i.pca/i.pca.md +++ b/imagery/i.pca/i.pca.md @@ -84,7 +84,7 @@ of Texas, Austin, 1990. *[i.cca](i.cca.md), [g.gui.iclass](g.gui.iclass.md), [i.fft](i.fft.md), [i.ifft](i.ifft.md), -[m.eigensystem](https://grass.osgeo.org/grass-stable/manuals/addons/m.eigensystem.html), +[m.eigensystem](https://grass.osgeo.org/grass-devel/manuals/addons/m.eigensystem.html), [r.covar](r.covar.md), [r.mapcalc](r.mapcalc.md)* *[Principal Components Analysis diff --git a/man/mkdocs/docs/development_intro.md b/man/mkdocs/docs/development_intro.md index 8bc1b97432f..d85112599a0 100644 --- a/man/mkdocs/docs/development_intro.md +++ b/man/mkdocs/docs/development_intro.md @@ -7,7 +7,7 @@ title: Development Introduction ## API reference and documentation -- [Python library](https://grass.osgeo.org/grass-stable/manuals/libpython/index.html) +- [Python library](https://grass.osgeo.org/grass-devel/manuals/libpython/index.html) - [C API reference and developer manual](https://grass.osgeo.org/programming8/) - [Tools](full_index.md) - [Standard parser options](parser_standard_options.md) @@ -15,7 +15,7 @@ title: Development Introduction ## Testing -- [Testing](https://grass.osgeo.org/grass-stable/manuals/libpython/gunittest_testing.html) +- [Testing](https://grass.osgeo.org/grass-devel/manuals/libpython/gunittest_testing.html) ## Addons @@ -25,7 +25,7 @@ repository and are a great place to plubish and share custom tools, models, and The addons are maintained by the GRASS community and are a great way to extend the functionality of GRASS. -- [Addons](https://grass.osgeo.org/grass-stable/manuals/addons/) +- [Addons](https://grass.osgeo.org/grass-devel/manuals/addons/) ## Contributing diff --git a/raster/r.buildvrt/r.buildvrt.md b/raster/r.buildvrt/r.buildvrt.md index 3dc03d6e81d..594c6343b10 100644 --- a/raster/r.buildvrt/r.buildvrt.md +++ b/raster/r.buildvrt/r.buildvrt.md @@ -57,13 +57,13 @@ maps, especially on slower file systems with latency like NFS. Performance degradation may also occur on local file systems, but is usually less severe. For such use cases consider using the GRASS GIS addon -[r.buildvrt.gdal](https://grass.osgeo.org/grass-stable/manuals/addons/r.buildvrt.gdal.html) +[r.buildvrt.gdal](https://grass.osgeo.org/grass-devel/manuals/addons/r.buildvrt.gdal.html) or building GDAL VRTs, e.g. with *gdalbuildvrt*. ## SEE ALSO *[r.tile](r.tile.md), [r.patch](r.patch.md), [r.external](r.external.md) -[r.buildvrt.gdal](https://grass.osgeo.org/grass-stable/manuals/addons/r.buildvrt.gdal.html)* +[r.buildvrt.gdal](https://grass.osgeo.org/grass-devel/manuals/addons/r.buildvrt.gdal.html)* The equivalent GDAL utility *[gdalbuildvrt](https://gdal.org/en/stable/programs/gdalbuildvrt.html)* diff --git a/raster/r.covar/r.covar.md b/raster/r.covar/r.covar.md index 5d9c5dde6f5..ab9d95eaff6 100644 --- a/raster/r.covar/r.covar.md +++ b/raster/r.covar/r.covar.md @@ -16,7 +16,7 @@ would result in N real eigen values and N eigen vectors (each composed of N real numbers). The module -*[m.eigensystem](https://grass.osgeo.org/grass-stable/manuals/addons/m.eigensystem.html)* +*[m.eigensystem](https://grass.osgeo.org/grass-devel/manuals/addons/m.eigensystem.html)* in [GRASS GIS Addons](https://grass.osgeo.org/download/addons/) can be installed and used to generate the eigenvalues and vectors. @@ -68,7 +68,7 @@ This can be done with *[r.rescale](r.rescale.md)*. ## SEE ALSO *[i.pca](i.pca.md), -[m.eigensystem](https://grass.osgeo.org/grass-stable/manuals/addons/m.eigensystem.html) +[m.eigensystem](https://grass.osgeo.org/grass-devel/manuals/addons/m.eigensystem.html) (Addon), [r.mapcalc](r.mapcalc.md), [r.rescale](r.rescale.md)* ## AUTHOR diff --git a/raster/r.mapcalc/r.mapcalc.md b/raster/r.mapcalc/r.mapcalc.md index fd808d8c384..2cb66a1ac8c 100644 --- a/raster/r.mapcalc/r.mapcalc.md +++ b/raster/r.mapcalc/r.mapcalc.md @@ -930,7 +930,7 @@ Anil K. Jain (Prentice Hall, NJ, 1989; p 67). ## SEE ALSO *[g.region](g.region.md), -[r.bitpattern](https://grass.osgeo.org/grass-stable/manuals/addons/r.bitpattern.html), +[r.bitpattern](https://grass.osgeo.org/grass-devel/manuals/addons/r.bitpattern.html), [r.blend](r.blend.md), [r.colors](r.colors.md), [r.fillnulls](r.fillnulls.md), [r.mapcalc.simple](r.mapcalc.simple.md)* diff --git a/raster/r.smooth.edgepreserve/r.smooth.edgepreserve.md b/raster/r.smooth.edgepreserve/r.smooth.edgepreserve.md index edce8c07aac..50b1c8714e9 100644 --- a/raster/r.smooth.edgepreserve/r.smooth.edgepreserve.md +++ b/raster/r.smooth.edgepreserve/r.smooth.edgepreserve.md @@ -104,7 +104,7 @@ r.smooth.edgepreserve function=tukey input=ortho_2001_t792_1m \ - Smooth with statistics: *[r.neighbours](r.neighbours)* - The Mumford-Shah variational model for image segmentation (an add-on): -*[r.smooth.seg](https://grass.osgeo.org/grass-stable/manuals/addons/r.smooth.seg.html)* +*[r.smooth.seg](https://grass.osgeo.org/grass-devel/manuals/addons/r.smooth.seg.html)* ## REFERENCES diff --git a/raster/r.texture/r.texture.md b/raster/r.texture/r.texture.md index ff1105c4f90..4e116e1011f 100644 --- a/raster/r.texture/r.texture.md +++ b/raster/r.texture/r.texture.md @@ -49,7 +49,7 @@ algorithms such as [i.maxlik](i.maxlik.md) or [i.smap](i.smap.md), or for the identification of objects in [i.segment](i.segment.md), and/or for the characterization of these objects and thus, for example, as one of the raster inputs of the -[i.segment.stats](https://grass.osgeo.org/grass-stable/manuals/addons/i.segment.stats.html) +[i.segment.stats](https://grass.osgeo.org/grass-devel/manuals/addons/i.segment.stats.html) addon. In general, several variables constitute texture: differences in grey diff --git a/scripts/g.download.project/g.download.project.md b/scripts/g.download.project/g.download.project.md index 0476259070c..0bf35160d6c 100644 --- a/scripts/g.download.project/g.download.project.md +++ b/scripts/g.download.project/g.download.project.md @@ -32,7 +32,7 @@ grass --tmp-project XY --exec g.download.project url=https://grass.osgeo.org/sam *[g.mapset](g.mapset.md), [g.mapsets](g.mapsets.md), [r.proj](r.proj.md), [v.proj](v.proj.md), -[g.proj.all](https://grass.osgeo.org/grass-stable/manuals/addons/g.proj.all.html)* +[g.proj.all](https://grass.osgeo.org/grass-devel/manuals/addons/g.proj.all.html)* ## AUTHOR diff --git a/vector/v.info/v.info.md b/vector/v.info/v.info.md index e9ceb3cdff3..6d564425b14 100644 --- a/vector/v.info/v.info.md +++ b/vector/v.info/v.info.md @@ -181,7 +181,7 @@ bottom=0.000000 ## PYTHON See *[Python Scripting -Library](https://grass.osgeo.org/grass-stable/manuals/libpython/)* for +Library](https://grass.osgeo.org/grass-devel/manuals/libpython/)* for more info. Note: The Python tab in the *wxGUI* can be used for entering the