-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
ogr2ogr wfs to postgis discard some (random) field #1375
Comments
You can get more information about what GDAL is doing by adding
|
Thanks jratike80 |
Minimum fix pushed. The issue was the SE_ANNO_CAD_DATA attribute of type xsd:hexBinary, this type being not supported. |
Then it created a mess with other fields? |
yes, as soon as the OGR GML .xsd parser detects something it doesn't understand, it just stops. And it then fallbacks to analyzing the GML content itself without schema (which is also error prone) |
Hello
I am trying to import WFS layers to Postgis using Osgeo4W gdal (2.4.0-7) Windows 10 Pro x64.
I made a script to load a single WFS layer to a specific Postgis table, with overwrite action.
It works fine but not all WFS fields are created and then populated into Postgis table.
For example this WFS layer:
"C:\OSGeo4W64\bin\ogrinfo.exe" -so -nomd -noextent -fields=YES "WFS:http://serviziogc.regione.fvg.it/geoserver/wfs?service=WFS&request=GetFeature&version=1.1.0&typeName=IDROGRAF:CORSI_ACQUA" "IDROGRAF:CORSI_ACQUA"
gives me this field list:
These are the fields created by:
"C:\OSGeo4W64\bin\ogr2ogr.exe" -lco GEOMETRY_NAME=geom -overwrite -f "PostgreSQL" -a_srs EPSG:3045 PG:"dbname=postgisdatabase user=postgisuser host=postgishost" -nln schema.table "WFS:http://serviziogc.regione.fvg.it/geoserver/wfs?service=WFS&request=GetFeature&version=1.1.0&typeName=IDROGRAF:CORSI_ACQUA&srsName=EPSG:3045" -nlt PROMOTE_TO_MULTI
If I load this specific WFS layer into Qgis it has many more fields and if I load the same WFS to Postgis trough Qgis/DBmanager I get all the WFS fields:
In BOLD missing fields
Same behaviour with other WFS layers both number and text fields
Is this normal or is there any problem with the script code or ogr?
Thanks
Pietro
The text was updated successfully, but these errors were encountered: