[GeoNode-devel] Support for additional types in upload

Eric Groning eg at novel-t.ch
Fri Nov 25 07:52:17 PST 2016


Hello,

I'm currently adding FGDB support for the upload for a project based on a customized geonode.  Since it might be a feature the community is interested in, I figured it's worth it to mention in this list.  I also have a few questions.

First, here is a rough outline of what I'm changing:

-Use gdal 2.1.2 (the latest) compiled with FileGDB support (via GDAL_LIBRARY_PATH in Django settings)
-Change layer forms / upload / geoserver signals to accept a zipped fgdb
-Change geoserver_pre_save to use call ogr2ogr directly to convert the FGDB to the geoserver data Postgis database (as geoserver won't convert an uploaded FGDB as it does with shapefiles)

Second, with regards to adding this to geonode via pull request:

The implementation I'm doing wouldn't really be directly merge-able.  To do this properly, there would likely need to be some refactoring done to make the upload generic and extensible (like to easily add more gdal supported types with different file structures / extentions such as KML / Postgis backups / GML / SqLite / GeoJSON / etc).   The configuration would have impacts on how the upload form is validated, the layer upload javascript, the model, and how the layer is uploaded to geoserver.  So not a light / easy change :)

A side issue is that for some formats, you can have multiple layers.  As such, it would be nice to have the UI handle multiple layers (ie let the user choose which layers to upload)

For reference, below are links to some shapefile specific handling in the code --
https://github.com/GeoNode/geonode/blob/master/geonode/layers/utils.py#L94
https://github.com/GeoNode/geonode/blob/master/geonode/layers/forms.py#L81
https://github.com/GeoNode/geonode/blob/master/geonode/geoserver/helpers.py#L1084


The questions are:

Is supporting more types / making the upload more generic a planned feature for a future geonode release?

What would be the pros / cons to this approach vs an approach like first converting the upload to a shapefile (like in the layer_upload view), then use the existing upload flow?

Any pain points / gotchas in the above approach?


Best regards,
Eric

Novel-T Sàrl
Eric GRÖNING - Solutions Engineer
W: www.novel-t.ch<http://www.novel-t.ch/> | @: eg at novel-t.ch<mailto:eg at novel-t.ch>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20161125/8b8cb7c7/attachment.html>


More information about the geonode-devel mailing list