Geonode data upload

From stgo
Revision as of 15:37, 19 June 2015 by StefanS (Talk | contribs)

Jump to: navigation, search

>> return to Cedeus IDE


Loading Existing Layers from PostGIS

  • Step 1: add the layer from PostGIS to GeoServer (using "add layer" option; however, PostGIS needs to be defined already as datastore)
  • Step 2: update a particular layer's info in GeoNode using "geonode updatelayers"; e.g.
    sudo geonode updatelayers --ignore-errors --filter=catastrobosquenativo_vii_maule

Dealing with Problems I discovered when Uploading Data to GeoNode

Nothing happens when pressing Upload Button

Problem: Sometimes nothing happens when the shapefiles are selected and the upload button is pressed

Solution: Check if the file name contains spanish/latin characters or similar. If yes: rename the file to remove these characters.

File upload size limits

It may happen that the file to be uploaded to GeoNode hits the current size limit of 100 MB.

Its possible to change the size limit in /etc/geonode/local_settings.py with the entry MAX_DOCUMENT_SIZE = 500 # MB. Afterwards, restart Apache. However, its best to apply this larger limit only temporarily.

One 400MB shapefile, Uso de Suelo Aysen from MMA (with db = 750MB), I could not upload to GeoNode. Instead I copied it to the Geonode1204b VM and imported it there using:

sudo geonode importlayers /home/myuser/xxx/ (see GeoNode documentation)

Before I actually changed the shapefile name to avoid latin characters. Afterwards I used "geonode updatelayers --ignore-errors --skip-geonode-registered"

Spanish characters

Problem: Sometimes, after upload names of attributes or attribute values are not correctly represented, i.e. Categor�A

Solution: This is an encoding problem. Before hitting the upload button in geonode, select the file encoding. In most cases it encoding is Latin 1.

Transformation error

Problem: The shapefile upload fails with an error. In particular I get:

java.lang.RuntimeException: java.io.IOException: transform error

and also (looking /usr/share/geoserver/data/logs/geoserver.log) I got:

Caused by: java.io.IOException: transform error
       at org.geoserver.catalog.CatalogBuilder.getLatLonBounds(CatalogBuilder.java:525)
       at org.geoserver.catalog.CatalogBuilder.doSetupBounds(CatalogBuilder.java:466)
       at org.geoserver.catalog.CatalogBuilder.setupBounds(CatalogBuilder.java:450)
       at org.geoserver.catalog.rest.DataStoreFileResource.handlePut(DataStoreFileResource.java:405)
       ... 88 more
Caused by: org.geotools.referencing.operation.projection.ProjectionException: Transformation doesn't convergence.
       at org.geotools.referencing.operation.projection.MapProjection.inv_mlfn(MapProjection.java:1385)
       at org.geotools.referencing.operation.projection.TransverseMercator.inverseTransformNormalized(TransverseMercator.java:217)

Reason: In some cases, there may be points/geometries with coordinates at 0/0 that cannot be transformed.

Solution: The problem is that there seems to be a misfit with the projection. Remember:

  • Chile's Easter Island is far off, so UTM 19S is perhaps not so good working as it is not in zone 19

To solve this issue I re-saved the shapefile as WGS84 (epsg 4326) in geographic coordinates (and also I used UTF-8 character encoding, just to make sure). This new shapefile I was able to load in GeoNode 2.0

"quantize with one INF" Error

Exception: ('Failed to process accidentesgs2013_epsg4326', InvalidOperation('quantize with one INF',))

this error seems to occur when no bounds can be calculated after upload by GeoServer. Means, I got an infinite sign in one of the bound text boxes. When I recalculated or set the Lat/Lon bound manually it was ok then (at least for the accidentesgs2013 layer) .

To get the layer into GeoNode I used geonode updatelayers.