Re: [QGIS-Developer] Question on FGDB support for "Save As" / "Export"

2018-07-31 Thread Nyall Dawson
On Tue, 31 Jul 2018 at 20:06, Andreas Neumann  wrote:

>
> About issue 2:
>
> @Jürgen: can you include the necessary gdal-filegdb package also in the 
> standalone installer - or are there license problems?
>

-1 to packaging the gdal-filegdb package by default. My rationale:

- I've experienced lots of issues with this driver. For one, it's much
slower to open gdbs, especially over networks. I've also hit bugs in
the past where the driver doesn't handle certain subset queries in the
same way as other ogr drivers (I can't recall the exact details, but I
think the particular issue I hit was fixed.)

- The driver has known issues. From
https://www.gdal.org/drv_filegdb.html, there's e.g. this important
one: "The SDK is known to be unable to open layers with particular
spatial reference systems.". And then on
https://www.gdal.org/drv_openfilegdb.html there's a list of features
that we'd lose by changing to the filegdb driver:

"Advantages of the OpenFileGDB driver:

Can read ArcGIS 9.X Geodatabases, and not only 10 or above.
Can open layers with any spatial reference system.
Thread-safe (i.e. datasources can be processed in parallel).
Uses the VSI Virtual File API, enabling the user to read a Geodatabase
in a ZIP file or stored on a HTTP server.
Faster on databases with a big number of fields.
Does not depend on a third-party library.
Robust against corrupted Geodatabase files.

Drawbacks of the OpenFileGDB driver:

Read-only.
Cannot use spatial indexes.
Cannot read data from compressed data in CDF format (Compressed Data Format)."

That's a pretty significant loss in my opinion - especially the point
about the closed source driver being non thread-safe.

- The OpenFileGDB driver is very heavily tested for robustness and
security issues with the ongoing fuzz testing of GDAL drivers.

- Last, but not least, we'd lose the ability to actually fix issues.
We'd be dependent on bug fixes in the ESRI SDK, and be powerless to
get fixes we need implemented.


These are all significant issues, and the moment we make the switch to
the closed source driver and give users write support, there's no way
we can revert this decision and remove the ability to edit GDB files.
It's not a decision we can make lightly.

I'd rather leave this decision up to individual users (and those who
make in-house software packages for deployment in their organisation)
to make. I.e. leave it as is, where it's effectively an "opt-in"
change. And push people to helping make the open driver better, as
it's a more sustainable solution in the long term.

(Lastly, a rant: I hate file geodatabases. They are the WORST format
for spatial data that I've seen. It's like ESRI took everything which
people disliked about shapefiles and magnified those. Instead of a
handful of files, we get hundreds. Instead of minor user confusion
about how they need to package all the dependent files, we get this
super-confusing folder/file mix, which causes all sorts of issues for
non-ArcGIS software because it just breaks fundamental file management
assumptions. And they are SLOW. So SLOOW. Even in ArcGIS they are
slow to open and manage. GIve me shapefiles over this monstrosity any
day.)

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Question on FGDB support for "Save As" / "Export"

2018-07-31 Thread Andreas Neumann
Hi Matthias, 

We need to be able to select an existing fgdb-folder (as seen by the OS
it is just a regular folder). 

Currently, QGIS just opens the folder and then expects the user to pick
a file, but currently we can't select a folder without traversing deeper
into it. 

Andreas 

On 2018-07-31 13:58, Matthias Kuhn wrote:

> Hi,
> 
> Just a quick question about the file vs. directory problem. Do we need
> to be able to select an existing directory or a new one?
> If it's the latter (new .gdb-folder), we can just use the existing file
> dialog, which will return a path to a file name (but not yet create a
> new file) and we can then have the fgdb driver create a new folder
> instead of a file at this position.
> I might be missing something though.
> 
> Matthias
> 
> On 07/31/2018 12:05 PM, Andreas Neumann wrote: 
> 
>> Hi,
>> 
>> A Swiss QGIS user asked me if/how FGDB for export/Save as can be
>> supported in QGIS - question specifically about the Windows distribution
>> of QGIS 3.x. Sometimes, QGIS users have to deliver results in fgdb
>> format, because their clients require it.
>> 
>> A quick e-mail exchange with Even Roualt revealed the following:
>> 
>> 1. it is already supported if the proper "gdal-filegdb" packages are
>> installed.
>> 
>> 2. Currently, it can only be enabled in the OSGeo4W version by selecting
>> the "gdal-filegdb" package. The standalone installer does not include
>> this package.
>> 
>> 3. There are issues when wanting to "Save As" an additional layer into
>> an already existing FGDB. The problem is that fgdb files are actually
>> directories. And the current "Save As" dialog does not support selecting
>> "directories" to save into, only files. As a workaround, it works if one
>> copy/pastes the full path from the Windows file explorer into the "Save
>> As" dialog, but not when selecting a directory interactively.
>> 
>> Here is some info on the third issue from Even:
>> 
>> "I don't have the solution on top of my mind. According to
>> http://doc.qt.io/qt-5/qfiledialog.html#FileMode-enum it seems that you can
>> setup the selector to select file or directories, but not both.
>> We actually use the QFileDialog::getSaveFileName() API that probably
>> internally resolves to QFileDialog::AnyFile
>> Perhaps a more experience QT dev than me would have an idea.
>> Or an hack (but not sure we can really do better) would be to allow the user
>> to select any file in the .gdb directory, and then automatically strips out
>> the filename to just keep the directory name when we see this a file in in a
>> .gdb directory"
>> 
>> ---
>> 
>> So here are my two questions:
>> 
>> About issue 2:
>> 
>> @Jürgen: can you include the necessary gdal-filegdb package also in the
>> standalone installer - or are there license problems?
>> 
>> About issue 3:
>> 
>> Does some dev have an idea or solution on how to more easily select a
>> folder instead of a file, for the case of writing an additional layer
>> into an already existing .fgdb folder?
>> 
>> Thank you all for your ideas and the discussion,
>> 
>> Andreas
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Question on FGDB support for "Save As" / "Export"

2018-07-31 Thread Matthias Kuhn
Hi,

Just a quick question about the file vs. directory problem. Do we need
to be able to select an existing directory or a new one?
If it's the latter (new .gdb-folder), we can just use the existing file
dialog, which will return a path to a file name (but not yet create a
new file) and we can then have the fgdb driver create a new folder
instead of a file at this position.
I might be missing something though.

Matthias

On 07/31/2018 12:05 PM, Andreas Neumann wrote:
> Hi,
> 
> A Swiss QGIS user asked me if/how FGDB for export/Save as can be
> supported in QGIS - question specifically about the Windows distribution
> of QGIS 3.x. Sometimes, QGIS users have to deliver results in fgdb
> format, because their clients require it.
> 
> A quick e-mail exchange with Even Roualt revealed the following:
> 
> 1. it is already supported if the proper "gdal-filegdb" packages are
> installed.
> 
> 2. Currently, it can only be enabled in the OSGeo4W version by selecting
> the "gdal-filegdb" package. The standalone installer does not include
> this package.
> 
> 3. There are issues when wanting to "Save As" an additional layer into
> an already existing FGDB. The problem is that fgdb files are actually
> directories. And the current "Save As" dialog does not support selecting
> "directories" to save into, only files. As a workaround, it works if one
> copy/pastes the full path from the Windows file explorer into the "Save
> As" dialog, but not when selecting a directory interactively.
> 
> Here is some info on the third issue from Even:
> 
> "I don't have the solution on top of my mind. According to
> http://doc.qt.io/qt-5/qfiledialog.html#FileMode-enum it seems that you can
> setup the selector to select file or directories, but not both.
> We actually use the QFileDialog::getSaveFileName() API that probably
> internally resolves to QFileDialog::AnyFile
> Perhaps a more experience QT dev than me would have an idea.
> Or an hack (but not sure we can really do better) would be to allow the user
> to select any file in the .gdb directory, and then automatically strips out
> the filename to just keep the directory name when we see this a file in in a
> .gdb directory"
> 
> ---
> 
> So here are my two questions:
> 
> About issue 2:
> 
> @Jürgen: can you include the necessary gdal-filegdb package also in the
> standalone installer - or are there license problems?
> 
> About issue 3:
> 
> Does some dev have an idea or solution on how to more easily select a
> folder instead of a file, for the case of writing an additional layer
> into an already existing .fgdb folder?
> 
> Thank you all for your ideas and the discussion,
> 
> Andreas
> 
> 
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Question on FGDB support for "Save As" / "Export"

2018-07-31 Thread Andreas Neumann
Hi, 

A Swiss QGIS user asked me if/how FGDB for export/Save as can be
supported in QGIS - question specifically about the Windows distribution
of QGIS 3.x. Sometimes, QGIS users have to deliver results in fgdb
format, because their clients require it. 

A quick e-mail exchange with Even Roualt revealed the following: 

1. it is already supported if the proper "gdal-filegdb" packages are
installed. 

2. Currently, it can only be enabled in the OSGeo4W version by selecting
the "gdal-filegdb" package. The standalone installer does not include
this package. 

3. There are issues when wanting to "Save As" an additional layer into
an already existing FGDB. The problem is that fgdb files are actually
directories. And the current "Save As" dialog does not support selecting
"directories" to save into, only files. As a workaround, it works if one
copy/pastes the full path from the Windows file explorer into the "Save
As" dialog, but not when selecting a directory interactively. 

Here is some info on the third issue from Even: 

"I don't have the solution on top of my mind. According to
http://doc.qt.io/qt-5/qfiledialog.html#FileMode-enum it seems that you
can
setup the selector to select file or directories, but not both.
We actually use the QFileDialog::getSaveFileName() API that probably
internally resolves to QFileDialog::AnyFile
Perhaps a more experience QT dev than me would have an idea.
Or an hack (but not sure we can really do better) would be to allow the
user
to select any file in the .gdb directory, and then automatically strips
out
the filename to just keep the directory name when we see this a file in
in a
.gdb directory" 

--- 

So here are my two questions: 

About issue 2: 

@Jürgen: can you include the necessary gdal-filegdb package also in the
standalone installer - or are there license problems? 

About issue 3: 

Does some dev have an idea or solution on how to more easily select a
folder instead of a file, for the case of writing an additional layer
into an already existing .fgdb folder? 

Thank you all for your ideas and the discussion, 

Andreas___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer