<div dir="ltr">Hi Peter,<br><div><br>On Thu, Aug 8, 2019 at 3:56 PM "Peter Löwe" <<a href="mailto:peter.loewe@gmx.de">peter.loewe@gmx.de</a>> wrote:<br>><br>> Hi Markus, all,<br></div><div>[...]<br></div><div>>  <br></div><div>> For me, GDAL2.3.1 in GRASS refuses to accept the "GMLAS:" <br></div><div>from <a href="https://gdal.org/drivers/vector/gmlas.html">https://gdal.org/drivers/vector/gmlas.html</a>: The driver requires Xerces-C >= 3.1</div><div><br></div><div>You need to rebuild GDAL accordingly, but<br></div><div><br></div><div>> override for the import-driver:<br>>  <br>> ogr2ogr -f GeoJSON SMALL.json GMLAS:SMALL.gml -oo REMOVE_UNUSED_LAYERS=YES -oo REMOVE_UNUSED_FIELDS=YES -sql "SELECT * FROM groundsurface"<br></div><div><br></div><div>apparently GMLAS is supported. What is the exact error message for " GDAL2.3.1 in GRASS refuses to accept the "GMLAS:""?</div><div><br></div><div>Markus M<br></div><div>>  <br>> --> if GDAL-4-GRASS is currently built without GMLAS-support, it would be wortwhile to include it soonish (-> benefits: <a href="https://inspire.ec.europa.eu/sites/default/files/presentations/gml_application_schema_made_easy_in_gdal_ogr_and_qgis_-_gmlas_driver_0.pdf">https://inspire.ec.europa.eu/sites/default/files/presentations/gml_application_schema_made_easy_in_gdal_ogr_and_qgis_-_gmlas_driver_0.pdf</a>) <br>>  <br>> Otherwise, the standard GML-driver doesn't feature the REMOVE_xxx options:<br>> ogr2ogr -f GeoJSON SMALL.json SMALL.gml -oo REMOVE_UNUSED_LAYERS=YES -oo REMOVE_UNUSED_FIELDS=YES -sql "SELECT * FROM groundsurface"<br>>  <br>> Warning 6: driver GML does not support open option REMOVE_UNUSED_LAYERS<br>> Warning 6: driver GML does not support open option REMOVE_UNUSED_FIELDS<br>> ERROR 6: The GeoJSON driver does not overwrite existing files.<br>> ERROR 1: GeoJSON driver failed to create SMALL.json<br>>  <br>> Best,<br>> peter<br>>  <br>><br>>  <br>> <<a href="mailto:peter.loewe@gmx.de">peter.loewe@gmx.de</a>><br>>  <br>>  <br>> Gesendet: Donnerstag, 08. August 2019 um 15:15 Uhr<br>> Von: "Markus Metz" <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>><br>> An: "Peter Löwe" <<a href="mailto:peter.loewe@gmx.de">peter.loewe@gmx.de</a>><br>> Cc: grass-user <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>> Betreff: Re: [GRASS-user] Wrangling CityGML with GRASS ?<br>><br>><br>> On Thu, Aug 8, 2019 at 2:59 PM "Peter Löwe" <<a href="mailto:peter.loewe@gmx.de">peter.loewe@gmx.de</a>> wrote:<br>> ><br>> > Hello Markus, Stefan, all,<br>> ><br>> > thanks for all your advice. New challenges have emerged, as the dataset is defined as a polyhedral surface:<br>> ><br>> > I upgraded to GRASS 7.6.1 which comes with GDAL 2.3.1.<br>> ><br>> > The data sources are official CityGML files provided by the German Federal Agency for Cartographyand Geodesy (Bundesamt für Kartographie), which have an ".xml"-extension.<br>> ><br>> > v.in.ogr -2 -o --o input=TEST.xml output=TEST01<br>> > throws several warnings and creates an empty vector without an points/lines in it:<br>> ><br>> >  Warning 1: Unrecognized geometry type : 1015                            [<=== note this!]<br>> > No projection information available for layer <Building><br>> > Übersteuere die Überprüfung der Projektion.<br>> > Check if OGR layer <Building> contains polygons...<br>> >  100%<br>> > WARNUNG: Vektorkarte <SMALL01> existiert bereits und wird überschrieben.<br>> > Creating attribute table for layer <Building>...<br>> > Importing 1 features (OGR layer <Building>)...<br>> > WARNUNG: Skipping unsupported geometry type 'POLYHEDRALSURFACE'           [<=== note this!]<br>>  <br>> v.in.ogr could force-convert these polyhedral surfaces to multipolygons, at the risk of getting garbage.<br>>  <br>> The required change to v.in.ogr would be small, but it would be safer to skip these unsupported feature types in order to avoid garbage output.<br>>  <br>> Markus M<br>>  <br>>  </div></div>