1

I'm wondering to upload a large amount of datasets into GeoNode (from shapefiles or PostGIS)... but if I add those datasets directly to GeoServer, GeoNode won't know that a specific layer was added and for consequent I wont see in GeoNode front end my uploaded layers..

How is the best way to do this? Design a script that uses GeoNode classes to upload shapefiles? And what about if I want to link a database directly to GeoServer for automatic layers creation? Is there any way to GeoNode look for updates that were made in GeoServer and show them on GeoNode front end?

It must be develop a new Django application to do this?

What is the best approach?

2

Well, you can use the geoserver curl interface to add the layers that you want. You can write simple commands to run against that, targeting your server.

If it's a shapefile, upload it to the place where you want (possibily the same server as GeoServer) and use cURL.

After that, you can use management command in geonode called updatelayers. It pools GeoServer for new layers and adds them to GeoNode.

http://geonode.readthedocs.org/en/latest/tutorials/admin/commands.html

http://docs.geoserver.org/stable/en/user/rest/examples/curl.html

2

All layers published in GeoServer (if it was installed through GeoNode) are available in GeoNode when you run the updatelayers command as George mentioned. Depending on your installation, de command can me run as

geonode updatelayers

or standing on the folder where manage.py is (usually in your geonode project folder /home/geonode/your-geonode-project/) as

python manage.py updatelayers

Additionaly there are some opctions in this command that might be usefull for you. Check it adding -h at the end of the above command.

NOTE: this answer works on GeoNode 2.6.3. installed in Ubuntu.

In my opinion, the best way to add lots of layers is conecting your PostGIS database to GeoServer, and publish them there. After that just run updatelayers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.