Skip to content

Commit

Permalink
Merge pull request #40 from mundialis/location_and_type_fixe
Browse files Browse the repository at this point in the history
Fixes for location name and typos
  • Loading branch information
neteler committed Sep 22, 2019
2 parents 933dc18 + bee5f2d commit 2af0b14
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ First install Proj4 and GRASS GIS by downloading the latest git version and comp
wget https://storage.googleapis.com/datentransfer/LL.tar.gz
tar xzvf LL.tar.gz
rm -f LL.tar.gz
mv LL latlong_wgs84
..
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ The results of the asynchronous computations are available as GeoTIFF file in a
.. [#post] https://www.getpostman.com/apps
.. [#http] https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
.. [#method] https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods
.. [#grassloc] https://grass.osgeo.org/grass72/manuals/helptext.html#2.-background:-grass-gis-location-structure
.. [#grassloc] https://grass.osgeo.org/grass78/manuals/helptext.html#2.-background:-grass-gis-location-structure
2 changes: 1 addition & 1 deletion docs/tutorial_process_chain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ Sentinel-2A NDVI process chain
We create a process chain that computes the NDVI
from a Sentinel-2A scene based on the bands 8 and 4
with the GRASS GIS module r.mapcalc.
We use the latitude/longitude location **LL** as processing environment.
We use the latitude/longitude location **latlong_wgs84** as processing environment.
and the computational region of sentinel band B04
for the NDVI processing. Then we calculate univariate statistics for the Sentinel-2A scene.
The computed NDVI raster layer will be exported as geotiff file that can be accessed via an URL.
Expand Down
4 changes: 2 additions & 2 deletions scripts/ace
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export ACTINIA_URL='https://actinia.mundialis.de/latest'
"""

# Example script for actinia with import and export options
# grass77 ~/grassdata/nc_spm_08/user1/
# grass78 ~/grassdata/nc_spm_08/user1/
import_export = """
g.region raster=elev+https://storage.googleapis.com/graas-geodata/elev_ned_30m.tif -p
r.univar map=elev
Expand All @@ -56,7 +56,7 @@ r.info slope_elev
"""

# Example script for actinia with export options
# grass77 ~/grassdata/nc_spm_08/user1/
# grass78 ~/grassdata/nc_spm_08/user1/
export_script = """
# Example script for actinia shell interface
g.region raster=elevation -p
Expand Down
4 changes: 2 additions & 2 deletions src/actinia_core/resources/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def __init__(self):
self.GRASS_TMP_DATABASE = "%s/actinia/workspace/temp_db" % home # The directory to store temporary GRASS databases
self.GRASS_RESOURCE_DIR = "%s/actinia/resources" % home # Directory to store exported resources
self.GRASS_RESOURCE_QUOTA = 100 # The size quota of the resource storage in Gigibit
self.GRASS_GIS_BASE = "/usr/local/grass-7.7.svn" # Installation directory of GRASS
self.GRASS_GIS_START_SCRIPT = "/usr/local/bin/grass77"
self.GRASS_GIS_BASE = "/usr/local/grass-7.8.dev" # Installation directory of GRASS
self.GRASS_GIS_START_SCRIPT = "/usr/local/bin/grass78"
self.GRASS_ADDON_PATH = "%s/.grass7/addons/" % home
self.GRASS_MODULES_XML_PATH = os.path.join(self.GRASS_GIS_BASE, "gui", "wxpython", "xml", "module_items.xml")
self.GRASS_VENV = "%s/src/actinia/grass_venv/bin/activate_this.py" % home # The path to the activation
Expand Down
6 changes: 3 additions & 3 deletions src/actinia_core/resources/common/request_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,19 @@ def extract_glist_parameters(args):
# Create a grass EPSG code parser
start_script_parser = reqparse.RequestParser()
start_script_parser.add_argument('epsg', required=True, location='args',
type=int, help='A EPSG code as interger must be provided')
type=int, help='A EPSG code as integer must be provided')


def extract_start_script_parameters(args):
"""Parse the request parameters for the GRASS start script from parsed arguments
that were created with the start_script_parser.
Args:
args (dict): The argument dictionary with grass71 options
args (dict): The argument dictionary with grass78 options
Returns:
list:
A List of grass71 parameter
A List of grass78 parameter
"""
options = []
if "epsg" in args:
Expand Down
4 changes: 2 additions & 2 deletions src/actinia_core/resources/common/response_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,11 @@ class CategoricalStatisticsResultModel(Schema):


class RegionModel(Schema):
"""Output og GRASS module g.region -gu3
"""Output of GRASS GIS module g.region -gu3
It is used as schema to define the *process_result* in a ProcessingResponseModel derivative.
GRASS 7.3.svn (LL):~ > g.region -gu3
GRASS 7.8.dev (latlong_wgs84):~ > g.region -gu3
projection=3
zone=0
n=80
Expand Down
2 changes: 1 addition & 1 deletion src/actinia_core/resources/common/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, user_id, user_group=None, user_role=None,
"user1",
"landsat"],
"ECAD":["PERMANENT"],
"LL":["PERMANENT"]},
"latlong_wgs84":["PERMANENT"]},
accessible_modules=global_config.MODULE_WHITE_LIST,
cell_limit = global_config.MAX_CELL_LIMIT,
process_num_limit=global_config.PROCESS_NUM_LIMIT,
Expand Down
4 changes: 2 additions & 2 deletions src/actinia_core/resources/location_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ class LocationListResponseModel(Schema):
'description': 'The list of locations in the GRASS database'
}
}
example = {"locations": ["nc_spm_08" "LL", "ECAD"], "status": "success"}
example = {"locations": ["nc_spm_08" "latlong_wgs84", "ECAD"], "status": "success"}
required = ["status", "locations"]


class ListLocationsResource(ResourceBase):
"""This resource represents grass database directory
"""This resource represents GRASS GIS database directory
that contains locations.
"""

Expand Down
2 changes: 1 addition & 1 deletion src/actinia_core/testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def setUpClass(cls):
"landsat",
"test_mapset"],
"ECAD": ["PERMANENT"],
"LL": ["PERMANENT"]}
"latlong_wgs84": ["PERMANENT"]}

################### Create users ###################

Expand Down
6 changes: 3 additions & 3 deletions tests/test_common_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

__license__ = "GPLv3"
__author__ = "Sören Gebbert"
__copyright__ = "Copyright 2016-2018, Sören Gebbert and mundialis GmbH & Co. KG"
__copyright__ = "Copyright 2016-2019, Sören Gebbert and mundialis GmbH & Co. KG"
__maintainer__ = "Sören Gebbert"
__email__ = "soerengebbert@googlemail.com"

Expand Down Expand Up @@ -64,8 +64,8 @@ def setup_environment():
# GRASS

# Setup the test environment
global_config.GRASS_GIS_BASE="/usr/local/grass-7.5.svn"
global_config.GRASS_GIS_START_SCRIPT="/usr/local/bin/grass75"
global_config.GRASS_GIS_BASE="/usr/local/grass-7.8.dev"
global_config.GRASS_GIS_START_SCRIPT="/usr/local/bin/grass78"
# global_config.GRASS_DATABASE= "/usr/local/grass_test_db"
# global_config.GRASS_DATABASE = "%s/graas/grass_test_db" % home

Expand Down
4 changes: 2 additions & 2 deletions tests/test_resource_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def setup_environment():
# GRASS

# Setup the test environment
global_config.GRASS_GIS_BASE="/usr/local/grass-7.5.svn"
global_config.GRASS_GIS_START_SCRIPT="/usr/local/bin/grass75"
global_config.GRASS_GIS_BASE="/usr/local/grass-7.8.dev"
global_config.GRASS_GIS_START_SCRIPT="/usr/local/bin/grass78"
# global_config.GRASS_DATABASE= "/usr/local/grass_test_db"
# global_config.GRASS_DATABASE = "%s/graas/grass_test_db" % home
global_config.GRASS_TMP_DATABASE = "/tmp"
Expand Down

0 comments on commit 2af0b14

Please sign in to comment.