[GIS] How to upload a large amount of datasets into GeoNode

geonodegeoserverwfswms

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?

Best Answer

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

Related Question