<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Arial Unicode MS";
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@Arial Unicode MS";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">First, here is a rough outline of what I’m changing:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-Use gdal 2.1.2 (the latest) compiled with FileGDB support (via GDAL_LIBRARY_PATH in Django settings)<o:p></o:p></p>
<p class="MsoNormal">-Change layer forms / upload / geoserver signals to accept a zipped fgdb<o:p></o:p></p>
<p class="MsoNormal">-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)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Second, with regards to adding this to geonode via pull request:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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 <span style="font-family:Wingdings">J</span> <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For reference, below are links to some shapefile specific handling in the code --
<o:p></o:p></p>
<p class="MsoNormal"><a href="https://github.com/GeoNode/geonode/blob/master/geonode/layers/utils.py#L94">https://github.com/GeoNode/geonode/blob/master/geonode/layers/utils.py#L94</a>
<o:p></o:p></p>
<p class="MsoNormal"><a href="https://github.com/GeoNode/geonode/blob/master/geonode/layers/forms.py#L81">https://github.com/GeoNode/geonode/blob/master/geonode/layers/forms.py#L81</a>
<o:p></o:p></p>
<p class="MsoNormal"><a href="https://github.com/GeoNode/geonode/blob/master/geonode/geoserver/helpers.py#L1084">https://github.com/GeoNode/geonode/blob/master/geonode/geoserver/helpers.py#L1084</a>
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The questions are:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is supporting more types / making the upload more generic a planned feature for a future geonode release?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any pain points / gotchas in the above approach?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
<p class="MsoNormal">Eric<o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:16.0pt;font-family:"Arial Unicode MS",sans-serif;color:black"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:16.0pt;font-family:"Arial Unicode MS",sans-serif;color:black">N<span style="font-variant:small-caps">ovel</span>-</span></b><b><span style="font-size:18.0pt;font-family:"Arial Unicode MS",sans-serif;color:#D80000">T</span></b><b><span style="font-size:16.0pt;font-family:"Arial Unicode MS",sans-serif;color:black">
</span></b><span style="font-size:10.0pt;font-family:"Arial Unicode MS",sans-serif;color:black">Sŕrl</span><span style="font-size:12.0pt;font-family:"Arial Unicode MS",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:"Arial Unicode MS",sans-serif;color:black">Eric GRÖNING
</span></b><b><span style="font-size:10.0pt;font-family:"Arial Unicode MS",sans-serif;color:black">-</span></b><b><span style="font-size:10.0pt;font-family:"Arial Unicode MS",sans-serif;color:#1F497D">
</span></b><span style="font-size:10.0pt;font-family:"Arial Unicode MS",sans-serif;font-variant:small-caps;color:#D80000">Solutions Engineer</span><span style="font-family:"Arial Unicode MS",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial Unicode MS",sans-serif;color:black">W:
</span><span lang="FR" style="color:#1F497D"><a href="http://www.novel-t.ch/"><span lang="EN-US" style="font-size:10.0pt;color:#D80000">www.novel-t.ch</span></a></span><span style="font-size:9.0pt;font-family:"Arial Unicode MS",sans-serif;color:black"> | @:
</span><span style="font-size:10.0pt;color:#1F497D"><a href="mailto:eg@novel-t.ch"><span style="color:blue">eg@novel-t.ch</span></a></span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>