New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WFS: content detected as NAS without geometries, but dataset contains them #720
Comments
@jef-n This file is currently recognized by the NAS driver because the header contains the "aaa-suite" string. Do you think this is appropriate ? Or should it not identify itself for this file to let the GML driver deal with it ? In which case how to relax OGRNASDriverIdentify() ?
|
FYI: This is the simplified WFS for clients, which are not capable of loading NAS over WFS (there's also a version with complex objects). QGIS can load the simple WFS. Perhaps they also had a discussion about this topic? |
No, QGIS uses its own WFS implementation that has only a simple features GML parser. The OGR WFS driver passes the GetFeature response to its other drivers (GML, GeoJSON, etc... and possibly NAS), and let them decode it. Here the NAS driver believes that this is for it, but this isn't probably the best decision. |
How about a switch to let the user force the format |
You can already use |
Great, thanks. |
@rouault oops, missed this one. I guess the problem is that we don't have a |
…)" This reverts commit 29c1d1d. wfs:FeatureCollection can be found in valid NAS files: 29c1d1d#commitcomment-29847335
Can anyone give a quick roundup, what has changed now? |
9ec6971 breaks the tests. See 9ec6971#commitcomment-29848859 |
@rouault does https://gist.github.com/jef-n/6e121d62770380047f75a827805b421c look ok to you? |
That stil means that users have to set NAS_INDICATOR to esoteric value that they are unlikely to guess. I think the situation before the changes attempted in that ticket was not so bad after all, wasn't it ? |
Depends on the point of view. To me the NAS driver is meant to import the data into a pre-created schema that also has the triggers to handle deletions in place and a corresponding schema.gfs (like implemented in alkisimport or described on the PostNAS site). Using it in other circumstances is an edge case to me as it might lead to unexpected results. The driver will deduce attributes and their types from the first appearing element - and silently ignore attributes from following attributes or data that doesn't match the type the first element suggested the attribute would have. The data is usually spread over several files so scanning the one you're currently importing wouldn't help either. And the datasets are usually large, so reading them directly from XML doesn't make much sense to me either. So the commit fixes this by only enabling the NAS driver in known territory and the changes to the test put it into the environment that it (probably) commonly used in. OTH just using Not sure what's actually better. |
@jef-n OK i'll defer on your judgment having no practical experience with this driver. probably some more prominent notice is needed in the driver doc |
@jef-n I've disabled the nas tests for now per 5a4d3f4 as they break the build I tried https://gist.github.com/jef-n/6e121d62770380047f75a827805b421c but it broke with
And your fix will only work when ogr_nas.py is run individually, and not when run with run_all.py |
…est the NAS driver (refs #720) [ci skip]
Even on |
Expected behavior and actual behavior.
This issue stays in connection with #719, since the same WFS is affected.
When trying to raw data downloaded from a WFS (see below), the content gets interpreted as NAS without geometries. But the data contains geometries, which can be parsed as normal GML.
Steps to reproduce the problem.
Operating system
Microsoft Windows 7, Version 6.1.7601 (64-bit)
GDAL version and provenance
GDAL 2.4.0dev, released 2018/99/99 from OSGeo4W (64-bit)
The text was updated successfully, but these errors were encountered: