Skip to content

Commit

Permalink
Spelling fixes in raster addons documentation (#664)
Browse files Browse the repository at this point in the history
* Spelling fixes in r.accumulate
* Spelling fixes in r.flexure
* Spelling fixes in r.agent
* Fix r.connectivity page description truncated
* Spelling fixes r.area
* Spelling fixes in r.area.createweight. Also, some links had some spaces shown in the rendered page, since the line was wrapped in the middle of the URL. It is now fixed.
* Spelling fixes in r.connectivity.corridors
* Spelling fixes in r.basin
* Spelling fixes for r.bearing.distance
* Spelling fixes for r.bioclim
* Spelling fixes in r.bitpattern. And necessary indentation fixes to the touched header, to be consistent.
* Spelling fixes in r.catchment
* Spelling fixes in r.category.trim
* Spelling fixes for r.change.info
* Spelling fixes for r.clip
* Spelling fixes for r.colors.cubehelix
* Spelling fixes for r.colors.matplotlib
* Spelling fixes for r.colors.out_sld
* Spelling fixes in r.confusionmatrix
* Spelling fixes in r.cpt2grass
* Spelling fix in r.crater
* Spelling fixes in r.denoise
* r.diversity: HTML formating of parameter in manual
* r.droka: Spelling fixes
* r.droka: Spelling fixes and some english comments
* r.edm.eval: Spelling fixes
* r.edm.eval: HTML formating of parameters
* r.euro.ecosystem: Spelling fixes
* r.exdet: Spelling fixes
* r.fidimo: Spelling fixes
* r.fill.category: Spelling fixes
* r.findtheriver: Spelling fixes
* r.flexure: Spelling fixes
* r.flowfill: Spelling fixes
* r.forestfrag: Spelling fixes
* r.futures.demand: Spelling fixes
* r.futures.devpressure: Spelling fixes
* r.futures.parallelpga: Spelling fixes
* r.futures.pga: Spelling fixes
* r.futures.potential: Spelling fixes
* r.futures.potential: Spelling fixes
* r.futures.potsurface: Spelling fixes
* r.futures: Comment old SVN date
* r.futures.calib: Spelling fixes
* r.futures.demand: Additional spelling fixes
* r.droka: Apply translation suggestions
  • Loading branch information
echoix committed Jan 12, 2022
1 parent 305ba6b commit 11cdf2d
Show file tree
Hide file tree
Showing 72 changed files with 372 additions and 379 deletions.
2 changes: 1 addition & 1 deletion src/raster/r.accumulate/accumulate_iterative.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static void trace_up(struct cell_map *dir_buf, struct raster_map *weight_buf,
/* pop one upstream cell */
struct neighbor *cur_up = get_up(&up_stack, 0);

/* only if the current cell is not process */
/* only if the current cell is not processed */
if (!cur_up->done) {
/* find its upstream cells */
find_up(dir_buf, weight_buf, accum_buf, done, neg, cur_up->row,
Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.accumulate/delineate_streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void trace_down(struct cell_map *dir_buf, struct raster_map *accum_buf,
int dir;

/* if the current cell is outside the computational region or its
* acccumulation is less than the threshold, stop tracing */
* accumulation is less than the threshold, stop tracing */
if (row < 0 || row >= nrows || col < 0 || col >= ncols ||
get(accum_buf, row, col) < thresh)
return;
Expand Down
12 changes: 6 additions & 6 deletions src/raster/r.agent/libagent/ant.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Ant(agent.Agent):
Ants are wandering around by chance until they find some goal cell,
then they will mark their way back home with pheromone. Following ants
choose the marked cells on the playground more likely then unmarked
choose the marked cells on the playground more likely than unmarked
spots.
There are several optimizations / idealizations to choose from,
Expand Down Expand Up @@ -107,7 +107,7 @@ def costlymarkedposition(self, positions):
"""
Avoiding high values on the costsurface, combined with the
marked pheromone values on a certain layer combined with a random
value, pick a posiiton out of a list of positions.
value, pick a position out of a list of positions.
@param positions list of possible positions
@return position the decision for a position
"""
Expand All @@ -119,7 +119,7 @@ def costlymarkedposition(self, positions):
if (penalty < self.world.minpenalty) or (penalty > self.world.maxpenalty):
positions.remove(p)
if not positions:
# die as there is nowwhere to go to
# die as there is nowhere to go to
self.snuffit()
# make sure to not walk again..
return [0, 0, 99, 99]
Expand Down Expand Up @@ -148,7 +148,7 @@ def costlymarkedposition(self, positions):
def markedposition(self, positions):
"""
Based on the value on a certain layer combined with a random
value, pick a posiiton out of a list of positions.
value, pick a position out of a list of positions.
@param positions list of possible positions
@return position the decision for a position
"""
Expand Down Expand Up @@ -184,7 +184,7 @@ def choose(self):

def walkhome(self):
"""
Do all the things necessary for performing a regualar step when
Do all the things necessary for performing a regular step when
walking back home.
"""
self.position = self.nextstep
Expand All @@ -205,7 +205,7 @@ def walkhome(self):

def walkaround(self):
"""
Do all the things necessary for performing a regualar step when
Do all the things necessary for performing a regular step when
walking around.
"""
self.laststeps.append(self.position)
Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.agent/libagent/anthill.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Anthill(world.World):
The agents are implemented as ants, wandering around by chance
if they find a goal cell they will mark their way back home
with pheromone. The following ants then choose the marked cells
on the playground more likely then unmarked spots. The pheromone
on the playground more likely than unmarked spots. The pheromone
evaporates over time.
"""

Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.agent/libagent/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __str__(self):


class EnvError(Error):
"""Exception raised for missing GRASS environement.
"""Exception raised for missing GRASS environment.
Attributes:
expr -- Context expression in which the error occurred
Expand Down
6 changes: 3 additions & 3 deletions src/raster/r.agent/libagent/playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def getrandomposition(self):

def isvalidposition(self, position):
"""
Test if a position realy is on the playground
Test if a position really is on the playground
@return list position if on, boolean False if off the playground
"""
if (
Expand Down Expand Up @@ -248,7 +248,7 @@ def getorderedneighbourpositions(self, position, freedom):

def getneighbourpositions(self, position, freedom):
"""
Get all the positions reachable from a certain position and shuffel
Get all the positions reachable from a certain position and shuffle
@param list coordinates of a certain cell
@param int number of potentially reachable neighbours
@return list of coordinates, or boolean False
Expand Down Expand Up @@ -278,7 +278,7 @@ def setcellvalue(self, layername, position, value):
def decaycellvalues(self, layername, halflife, minimum=0):
"""
Let the values in each cell decay, volatilize or evaporate over time.
This method is intendet for relativly small 2D python arrays, see
This method is intended for relatively small 2D python arrays, see
grassland.Grassland.decaycellvalues for numpy arrays.
@param string layername name of the layer to work on
@param long halflife or number of years when to reach half of the value
Expand Down
4 changes: 2 additions & 2 deletions src/raster/r.agent/libagent/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class World(object):
"""
Generic World class as basis for more complex worlds.
Generic World class as a basis for more complex worlds.
A world is a place where things happen. A world normally
consists of some playground, i.e. a setup of various
layers. Furthermore it holds a list of agents that will
Expand Down Expand Up @@ -98,7 +98,7 @@ def bear(self, timetolive, position=None, agenttype=None):
Set a new agent into the world
@param int number of cycles the agent has to live
@param list coordinates to put the agent on, none for a random position
@param agenttype the typ of agent to be spawned
@param agenttype the type of agent to be spawned
@return agent the newly created agent
"""
position = self.findposition(position)
Expand Down
6 changes: 3 additions & 3 deletions src/raster/r.agent/r.agent.aco/r.agent.aco.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ <h2>DESCRIPTION</h2>
<p>
The basic concept of such an ACO world, is to take some cost surface
and transform it to a penalty layer. Even if the algorithm comes from
the realm of insects, it might be adopted to different animal kingdoms.
the realm of insects, it might be adapted to different animal kingdoms.
Depending on the type of agent this penalty layer must be reinterpreted:
if for example we want to talk about human
if for example, we want to talk about human
agents
the penalty layer may be expressed by the walking velocity, e.g. calculated
with the algorithm proposed by
Expand Down Expand Up @@ -37,7 +37,7 @@ <h2>NOTES</h2>

<h2>EXAMPLE</h2>

A fictive usecase could look something like this
A fictive use case could look something like this
(note: at the moment the
in- and output variables with <em>libold</em>, are still ascii-files):
<p>
Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.agent/r.agent.aco/r.agent.aco.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MODULE: r.agent.aco
AUTHOR(S): michael lustenberger inofix.ch
PURPOSE: r.agent.aco is used to organize ant-like agents in a raster
based playground. As decribed by the Ant Colony Optimization
based playground. As described by the Ant Colony Optimization
algorithm, the ants wander around looking for attractors,
marking their paths if they find any.
COPYRIGHT: (C) 2011 by Michael Lustenberger and the GRASS Development Team
Expand Down
2 changes: 1 addition & 1 deletion src/raster/r.agent/r.agent.rand/r.agent.rand.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ <h2>DESCRIPTION</h2>
As the name suggests, <em>r.agent.rand</em>
lets agents wander around just based on chance.
You only need to define a single input
map, just some raster map, that will be completly ignored,
map, just some raster map, that will be completely ignored,
it is only used to set the frame for the agents to come.

4 changes: 2 additions & 2 deletions src/raster/r.agent/tests/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
README file for libagent's test suite

This test cases are intended to contain all the tests for
These test cases are intended to contain all the tests for
libagent and to be usable with python 2.7 and higher, it
should however run resp. via the separate unittest2 available
as backport for python 2.3-2.6 too.
Expand All @@ -10,7 +10,7 @@ level issue
user@host:~/path/r.agent.aco$ unit2 discover -v -p "test*.py"

All tests except for tests.test_grassland should run without
the GRASS environemnent. For tests.test_grassland you must start
the GRASS environment. For tests.test_grassland you must start
the tests inside the GRASS console respectively:
GRASS 6.4.4 (foobar):~/path/r.agent.aco > unit2 discover -v -p "test*.py"

51 changes: 19 additions & 32 deletions src/raster/r.area.createweight/r.area.createweight.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h2>DESCRIPTION</h2>
grid. The spatial resolution of this output weighted grid should be
specified via the <b>tile_size</b> parameter, and its name via the
<b>output</b> parameter. The <b>tile_size</b> must be greater than
the spatial resolution of <b>basemap_a</b>. It it considered good
the spatial resolution of <b>basemap_a</b>. It is considered good
practice that the <b>tile_size</b> also be greater than the spatial
resolution of the other basemap and distance maps. The extent of the
output weighted grid is created using the extent of the spatial units,
Expand Down Expand Up @@ -70,8 +70,8 @@ <h2>DESCRIPTION</h2>
labels, using the flags <b>-a</b> and <b>-b</b>, for <b>basemap_a</b>
and <b>basemap_b</b> respectively. If these flags are used, the raster
should already contain the associated category labels. The module
<a href="https://grass.osgeo.org/grass-stable/manuals/r.category.html">r.
category</a> can be used to set category labels for a raster map. If
<a href=https://grass.osgeo.org/grass-stable/manuals/r.category.html>r.category</a>
can be used to set category labels for a raster map. If
the flag(s) <b>-a</b> and/or <b>-b</b> is(are) selected without existing
categories for the corresponding raster map, the class value will be
kept.
Expand Down Expand Up @@ -99,11 +99,9 @@ <h2>NOTES</h2>
NULL values in the rasters). In the example below, numerous spatial
units are not sufficiently covered, and should be removed prior to
running the add-on. It is up to the users to choose an acceptable level of coverage

for their analysis, and to ensure the quality of the input

data, keeping in mind that the higher the coverage, the better the RF
model. The RF model and its' prediction will only be as good as the
model. The RF model and its prediction will only be as good as the
input data it is given.

<center>
Expand All @@ -120,18 +118,14 @@ <h2>NOTES</h2>
rasters), the cell will be given a nodata value.

<p>The module makes a temporary copy of the categorical input rasters

(<b>basemap_a</b> and <b>basemap_b</b>) clipped to the

area covered by the spatial units. This allows for the extraction of
raster categories that exist only within the spatial units. If a user
specifies a list of raster categories (<b>basemap_a_list</b>

or <b>basemap_b_list</b>), these classes must be present in the area
covered by the spatial units. The distance map (<b>distance_to</b>) is
not changed, and it is kept in its original format.


<p>The spatial units are rasterised to the extent, cell size and
alignment of the output weighted grid, and then are re-vectorised. This
results in spatial units whose boundaries will have a 'staircase'
Expand All @@ -147,27 +141,25 @@ <h2>NOTES</h2>
units (see examples).

<p>
<table cellspacing="2" cellpadding="2" width="100%" align=center
border="0">
<table cellspacing="2" cellpadding="2" width="100%" align=center border="0">
<tr>
<th><a href="r_area_createweight_input_spatial_units.png">
<img src="r_area_createweight_input_spatial_units.png"
width=300></a></th>
<th><a href="r_area_createweight_gridded_spatial_units.png">
<th><a href="r_area_createweight_input_spatial_units.png">
<img src="r_area_createweight_input_spatial_units.png" width=300></a></th>
<th><a href="r_area_createweight_gridded_spatial_units.png">
<img src="r_area_createweight_gridded_spatial_units.png" width=300></a>
</th>
</tr>
<tr>
<th><i>Input spatial units</i></th>
<th><i>'Gridded' spatial units</i></th>
<th><i>Input spatial units</i></th>
<th><i>'Gridded' spatial units</i></th>
</tr>
</table>

<p>The response variable is log-transformed to avoid non-normal
distribution and used to train the model. The prediction is then
back-transformed and stored in the final weight raster. This approach
is similar to the one proposed by [1]. Because of this log
transformation (napierian logarithm), it is mandatory to not have zero
transformation (Napierian logarithm), it is mandatory to not have zero
or negative values in the column containing the response variable
(<b>response_variable</b> parameter). It is also expected that the
response variable column does not contain <em>NULL</em> values.
Expand All @@ -176,7 +168,7 @@ <h2>NOTES</h2>
the weighting layer if the predicted weight is smaller than 0.0000000001
obs./m².

<p>The covariates whose feature importance is bellow 0.5% are, by
<p>The covariates whose feature importance is below 0.5% are, by
default, removed from the final model. The <b>-a</b> flag can be used to
force keeping all the covariates in the final model.

Expand Down Expand Up @@ -229,7 +221,7 @@ <h4>Python libraries</h4>
corresponding to each package and install them using the following
command: <em>pip install packagename.whl</em>. Links for
downloading wheels are provided below. The version installed should be
compatible with user's Python version. If GRASS was not installed
compatible with the user's Python version. If GRASS was not installed
using the OSGeo4W method, the pip package manager can be installed by
saving the "get-pip.py" python script provided
<a href="https://bootstrap.pypa.io/get-pip.py">here</a> in the folder
Expand All @@ -239,11 +231,9 @@ <h4>Python libraries</h4>

<ul>
<li>Pandas Wheel (mainly relevant to Windows users):
<a href="https://pypi.python.org/pypi/pandas">https://pypi.python.org/pypi/
pandas</a></li>
<a href="https://pypi.python.org/pypi/pandas">https://pypi.python.org/pypi/pandas</a></li>
<li>Scikit-learn Wheel (mainly relevant to Windows users):
<a href="https://pypi.python.org/pypi/scikit-learn/">https://pypi.python.
org/pypi/scikit-learn/</a></li>
<a href="https://pypi.python.org/pypi/scikit-learn/">https://pypi.python.org/pypi/scikit-learn/</a></li>
<li>Unofficial Windows compiled binaries from <a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/">
Christoph Gohlke</a></li>
</ul>
Expand Down Expand Up @@ -435,15 +425,12 @@ <h2>REFERENCES</h2>
[1] Stevens, F.R., Gaughan, A.E., Linard, C. and Tatem, A.J., 2015.
Disaggregating census data for population mapping using random forests
with remotely-sensed and ancillary data. <i>PloS one, 10</i>(2),
e0107042. <a
href="https://doi.org/10.1371/journal.pone.0107042">https://doi.org/10.
1371/journal.pone.0107042</a>
e0107042. <a href="https://doi.org/10.1371/journal.pone.0107042">https://doi.org/10.1371/journal.pone.0107042</a>
<p>[2] Grippa, T., Linard, C., Lennert, M., Georganos, S., Mboga, N.,
Vanhuysse, S., Gadiaga, A., Wolff, E., 2019. Improving urban population
distribution models with very-high resolution satellite information.
<i>Data, 4</i>(1), 13. <a
href="https://doi.org/10.3390/data4010013">https://doi.org/10.3390/
data4010013</a>
href="https://doi.org/10.3390/data4010013">https://doi.org/10.3390/data4010013</a>
<p>[3] Flasse, C., T. Grippa, et S. Fennia. 2021. A TOOL FOR MACHINE
LEARNING BASED DASYMETRIC MAPPING APPROACHES IN GRASS GIS. The
International Archives of the Photogrammetry, Remote Sensing and
Expand All @@ -456,8 +443,8 @@ <h2>ACKNOWLEDGEMENT</h2>
This work was funded by the Belgian Federal Science Policy Office
(BELSPO) (Research Program for Earth Observation <a
href="https://eo.belspo.be/About/Stereo3.aspx">STEREO III</a>),
as part of the <a href="https://maupp.ulb.ac.be/">MAUPP project
</a>(contract SR/00/304) and DASYWEIGHT project (contract SR/11/205).
as part of the <a href="https://maupp.ulb.ac.be/">MAUPP project</a>
(contract SR/00/304) and DASYWEIGHT project (contract SR/11/205).

<h2>SEE ALSO</h2>

Expand Down
Loading

0 comments on commit 11cdf2d

Please sign in to comment.