![]() The new object-oriented Python programming API introduces an abstract layer that opens the possibility to use and access transparently the efficient raster and vector functions of GRASS that are implemented in C. The module interface was designed to be easily extended to work with remote processing services (Web Processing Service (WPS), Web Service Definition Language (WSDL)/Simple Object Access Protocol (SOAP)). ![]() Our design concept of the module interface allows the direct linking of inputs and outputs of GRASS modules to create process chains, including compatibility checks, process control and error handling. We present the architecture of the PyGRASS library, covering interfaces to GRASS modules, vector and raster data, with a focus on the new capabilities that it provides to GRASS users and developers. +++ vector/v.in.ogr/main.PyGRASS is an object-oriented Python Application Programming Interface (API) for Geographic Resources Analysis Support System (GRASS) Geographic Information System (GIS), a powerful open source GIS widely used in academia, commercial settings and governmental agencies. One question we have to answer is whether GRASS should allow the creation of mapsets with 0 resolution in any direction, and, if not (as I think it should be), then what would be a reasonable default when creating a location from a file containing data with identical coordinates in either of the directions or with just one point. The following hack let's you import the file, but this is not a complete solution. IIUC the error comes from the fact that the Y coordinates are strictly identical and that thus N = S in the DEFAULT_WIND & WIND files and GRASS has trouble dealing with a mapset with 0 resolution in any direction. I also opened the json file in QGIS, saved as a new shapefile and tried to import that: same error. V.in.ogr -i in=test.shp location=new_location2 -verboseĪTTENTION: All available OGR layers will be imported into vector map V.in.ogr -i in=test.json location=new_location1 -verboseĪTTENTION: All available OGR layers will be imported into vector map Interestingly, when I convert the json file to shape before import, I get the same error: V.in.ogr -i -verbose input=/home/grassuser/repo/sample.json output=qwer location=new_location This failure is actually the reason that v.import fails too (step 3): Trying to create a new location using v.in.ogr -i fails.GRASS 7.0.3svn (damflood):~/repo > cat sample.json 2 features (Point type) written to (GeoJSON format). V.out.ogr type=point output=sample.json format=GeoJSON ![]() I create a new vector containing two points and I export it:. ![]() On Ubuntu 14.04 (it is a different container than the initial post, but it is the same ogrinfo -version Replace the contents of the file we created on step 1 with the following snippet (in this case we are importing just a single point):Įven though I cannot really comment whether this is actually valid syntax according to the spec ( | GeoJSON linters accept it though), on my machines ogrinfo opens the file without problems:.WARNING: All available OGR layers will be imported into vector mapĪs we can see the location was created without problems. GRASS 7.0.3svn (epsg_4326):~ > v.in.ogr input=~/my_input.json -i location=example_multi_point Create a new location using the JSON file you created on step 1:.Start a new GRASS session using the location you just grass -text ~/locations/epsg_4326/PERMANENT/.WARNING: Searched for a web browser, but none foundĬreating new GRASS GIS location/mapset. WARNING: Default locale settings are missing. Create a new GRASS grass -e -c EPSG:4326 ~/locations/epsg_4326.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |