[GeoNode-devel] Support for additional types in upload

Eric Groning eg at novel-t.ch
Tue Mar 14 08:40:16 PDT 2017


Hello,

Apologies for the late response, how time flies!  Thank you for your offer for some support and/or collaboration.
We will be definitely be looking at this new importer module to see how it could work with FGDBs.  Can you tell us about the current state of the module?  As it should it be considered stable/beta/alpha/etc?


Regarding an implementation approach, it seems like adding FGDB support would involve implementing / adding to an importer (seen here: https://github.com/GeoNode/django-osgeo-importer/blob/master/osgeo_importer/importers.py )

While we mentioned ogr2ogr, it looks like the Django osgeo importer uses the python GDAL /OGR library.  They look functionally equivalent though we haven’t used the python/OGR library as much.  There is a python port of ogr2ogr, so it seems like it should be fine in theory: https://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/ogr2ogr.py

Another thing would be to use the OpenFileGDB driver as it doesn’t require the SDK from ESRI: http://www.gdal.org/drv_openfilegdb.html and considering that the importer for geonode, in general, just needs to read a FileGDB, not necessarily write one.

If you have any comments / or could recommend an approach, it would be very welcome.

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>

From: geonode-devel [mailto:geonode-devel-bounces at lists.osgeo.org] On Behalf Of Jivan Amara
Sent: Monday, December 12, 2016 08:22 PM
To: geonode-devel at lists.osgeo.org
Subject: Re: [GeoNode-devel] Support for additional types in upload

No worries; I wasn't contacting you to say you shouldn't move forward; just that you should join in and implement your ideas on the importer instead of directly in GeoNode.  It will be a bit before I turn my attention to enabling fgdb imports.  Definitely get in touch if you plan to move forward.  If it's down the road some I'd be happy to work together, if it's sooner I can offer some support to get you going with the importer.

Best, Jivan

On 12/12/2016 07:07 AM, Simone Dalmasso wrote:
Rollback, apologyze,

you are working on the importer already, so I'll leave to who is directly involved too.

Thanks!

2016-12-12 16:01 GMT+01:00 Simone Dalmasso <simone.dalmasso at gmail.com<mailto:simone.dalmasso at gmail.com>>:
Hi Jivan,

this interesting indeed, though the community is working on the https://github.com/GeoNode/django-osgeo-importer which will be used in GeoNode soon as default way to import data. Do you think that your work can fit in that one?

2016-12-05 19:59 GMT+01:00 Jivan Amara <development at jivanamara.net<mailto:development at jivanamara.net>>:

> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 25 Nov 2016 15:52:17 +0000
> From: Eric Groning <eg at novel-t.ch<mailto:eg at novel-t.ch>>
> To: "geonode-devel at lists.osgeo.org<mailto:geonode-devel at lists.osgeo.org>" <geonode-devel at lists.osgeo.org<mailto:geonode-devel at lists.osgeo.org>>
> Subject: [GeoNode-devel] Support for additional types in upload
> Message-ID:
>       <VI1PR04MB1181179E9070D8AD3FE1F96FFA890 at VI1PR04MB1181.eurprd04.prod.outlook.com<mailto:VI1PR04MB1181179E9070D8AD3FE1F96FFA890 at VI1PR04MB1181.eurprd04.prod.outlook.com>>
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 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><http://www.novel-t.ch/> | @: eg at novel-t.ch<mailto:eg at novel-t.ch><mailto:eg at novel-t.ch<mailto:eg at novel-t.ch>>
>
Hi Eric,
This project is for making uploads generic:
https://github.com/geonode/django-osgeo-importer and we're going to be
working on FGDB support.  The approach you outlined looks good, I'd just
suggest doing it as part of the importer.

--
Cheers,
Jivan Amara
---
Senior Software Developer / System Administrator
Development at JivanAmara.net<mailto:Development at JivanAmara.net>


_______________________________________________
geonode-devel mailing list
geonode-devel at lists.osgeo.org<mailto:geonode-devel at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/geonode-devel



--
Simone



--
Simone

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20170314/2dd2a684/attachment-0001.html>


More information about the geonode-devel mailing list