[GRASS-user] Wrangling CityGML with GRASS ?
"Peter Löwe"
peter.loewe at gmx.de
Thu Aug 8 05:59:26 PDT 2019
Hello Markus, Stefan, all,
thanks for all your advice. New challenges have emerged, as the dataset is defined as a polyhedral surface:
I upgraded to GRASS 7.6.1 which comes with GDAL 2.3.1.
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.
v.in.ogr -2 -o --o input=TEST.xml output=TEST01
throws several warnings and creates an empty vector without an points/lines in it:
Warning 1: Unrecognized geometry type : 1015 [<=== note this!]
No projection information available for layer <Building>
Übersteuere die Überprüfung der Projektion.
Check if OGR layer <Building> contains polygons...
100%
WARNUNG: Vektorkarte <SMALL01> existiert bereits und wird überschrieben.
Creating attribute table for layer <Building>...
Importing 1 features (OGR layer <Building>)...
WARNUNG: Skipping unsupported geometry type 'POLYHEDRALSURFACE' [<=== note this!]
100%
-----------------------------------------------------
Erstelle Topologie für die Vektorkarte <SMALL01 at PERMANENT>...
Registriere Primitive...
WARNUNG: Input data contains 3D features. Created vector is 2D only,
disable -2 flag to import 3D vector.
This problem seems to be ogr/gdal related:
ogrinfo -al TEST.xml
describes the geometry as a POLYHEDRALSURFACE Z (((412033.466 5812969.869 ...))).
ogr2ogr -f "GML" TEST.gml TEST.xml fails (some effect when trying other target formats like CSV or ESRI shape:
Warning 1: Unrecognized geometry type : 1015
ERROR 6: Unsupported geometry type 3D PolyhedralSurface
ERROR 1: Export of geometry to GML failed
ERROR 1: Terminating translation prematurely after failed
translation of layer Building (use -skipfailures to skip errors)
There is GDAL documentation about surfaces (https://gdal.org/development/rfc/rfc64_triangle_polyhedralsurface_tin.html), but I couldn't find anything about transformations/pruning from 3D to 2D.
The CGAL library appears to be capable to handle such surfaces, but GIS-integration seems to be limited (https://www.cgal.org/).
Ideas on how to proceed, anyone ?
best,
Peter
<peter.loewe at gmx.de>
> Gesendet: Dienstag, 06. August 2019 um 14:46 Uhr
> Von: grass-user-request at lists.osgeo.org
> An: grass-user at lists.osgeo.org
> Betreff: grass-user Digest, Vol 160, Issue 5
>
> Send grass-user mailing list submissions to
> grass-user at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.osgeo.org/mailman/listinfo/grass-user
> or, via email, send a message with subject or body 'help' to
> grass-user-request at lists.osgeo.org
>
> You can reach the person managing the list at
> grass-user-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of grass-user digest..."
>
>
> Today's Topics:
>
> 1. Re: Problems starting grass 7.4.1 in ubuntu (Markus Metz)
> 2. Re: wms google (Micha Silver)
> 3. Re: Wrangling CityGML with GRASS ? (Stefan Blumentrath)
> 4. Re: Wrangling CityGML with GRASS ? (Peter Löwe)
> 5. Re: Wrangling CityGML with GRASS ? (Markus Metz)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 5 Aug 2019 22:32:12 +0200
> From: Markus Metz <markus.metz.giswork at gmail.com>
> To: Sebastián Dietrich <sebadietrich at gmail.com>
> Cc: grass-user <grass-user at lists.osgeo.org>
> Subject: Re: [GRASS-user] Problems starting grass 7.4.1 in ubuntu
> Message-ID:
> <CAG+h=FGejQGA8neHu3Sf_hSA6YNSNkOZVDUL1zck8Fk8uM2Gzw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> On Mon, Aug 5, 2019 at 5:35 PM Sebastián Dietrich <sebadietrich at gmail.com>
> wrote:
> >
> > Hi everyone, when i try to launch g.gui i get the following message:
> >
> > GRASS 7.4.1 (EPSG5344):~/Documentos/grassdata > g.gui
> > Lanzando GUI <wxpython> en el fondo, por favor espere...
> > Traceback (most recent call last):
> > File "/usr/lib/grass74/gui/wxpython/wxgui.py", line 25, in <module>
> > from core import globalvar
> > File "/usr/lib/grass74/gui/wxpython/core/globalvar.py", line 39, in
> <module>
> > 'locale')).ugettext
> > AttributeError: 'GNUTranslations' object has no attribute 'ugettext'
> > [MÁSCARA ráster presente]
> > GRASS 7.4.1 (EPSG5344):~/Documentos/grassdata >
> >
> > Can someone help with this issue?
>
> GNUTranslations has an attribute ugettext only in Python2, not in Python3.
> Make sure that the link "python" points to "python2", test with "python
> --version"
>
> Markus M
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190805/c9190edf/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 6 Aug 2019 09:19:31 +0300
> From: Micha Silver <tsvibar at gmail.com>
> To: Sebastián Dietrich <sebadietrich at gmail.com>
> Cc: Ken Mankoff <mankoff at gmail.com>, grass-user at lists.osgeo.org
> Subject: Re: [GRASS-user] wms google
> Message-ID: <73c1d605-3729-ab98-2f81-096d4a8d20b7 at gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190806/002e1069/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 6 Aug 2019 09:13:57 +0000
> From: Stefan Blumentrath <Stefan.Blumentrath at nina.no>
> To: "Peter Löwe" <peter.loewe at gmx.de>, "grass-user at lists.osgeo.org"
> <grass-user at lists.osgeo.org>
> Subject: Re: [GRASS-user] Wrangling CityGML with GRASS ?
> Message-ID:
> <HE1PR0201MB21405732C039676E8A785D9C9ED50 at HE1PR0201MB2140.eurprd02.prod.outlook.com>
>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Peter,
>
> Not personally...
> I would guess you would import CityGML through GDAL:
> https://3d.bk.tudelft.nl/svitalis/citygml/gdal/2017/07/24/messing-around-with-citygml-on-gdal-2.2.html
> There you can create subsets and the like...
>
> What are you planning to do with it, roughly?
>
> Cheers
> Stefan
>
>
> -----Original Message-----
> From: grass-user <grass-user-bounces at lists.osgeo.org> On Behalf Of "Peter Löwe"
> Sent: torsdag 1. august 2019 11:10
> To: grass-user at lists.osgeo.org
> Subject: [GRASS-user] Wrangling CityGML with GRASS ?
>
> Hi list,
>
> I'm looking for information/howtos/etc. about how to deal with large CityGML data sets using GRASS.
>
> Has anybody already explored this ?
>
> Best,
> Peter
>
> <peter.loewe at gmx.de>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
> ------------------------------
>
> Message: 4
> Date: Tue, 6 Aug 2019 12:23:29 +0200
> From: "Peter Löwe" <peter.loewe at gmx.de>
> To: "Stefan Blumentrath" <Stefan.Blumentrath at nina.no>
> Cc: "grass-user at lists.osgeo.org" <grass-user at lists.osgeo.org>
> Subject: Re: [GRASS-user] Wrangling CityGML with GRASS ?
> Message-ID:
> <trinity-c2c845f5-697c-4269-afaf-8be6360d44d9-1565087009741 at 3c-app-gmx-bs34>
>
> Content-Type: text/plain; charset=UTF-8
>
> Hi Stefan,
>
> thanks for the link: That's also the latest information we found so far, except for several OSGeo conference recordings (e.g. https://doi.org/10.5446/40913 https://doi.org/10.5446/40694).
> My colleagues have ingested CityGML datasets into R, which caused issues with the vector-topology for individual buildings. Also, we have to cope with significant amounts of CityGML datasets, which would require very large amounts of RAM, if the processing is done in R. Since GRASS locations are storage-effective AND GRASS handles vector topologies well, I had hoped that someone already explored this approach further :-)
>
> If this should be not the case (yet) we'll gladly report at one of next years FOSS4G events.
>
> Best,
> peter
>
> <peter.loewe at gmx.de>
>
>
> > Gesendet: Dienstag, 06. August 2019 um 11:13 Uhr
> > Von: "Stefan Blumentrath" <Stefan.Blumentrath at nina.no>
> > An: "Peter Löwe" <peter.loewe at gmx.de>, "grass-user at lists.osgeo.org" <grass-user at lists.osgeo.org>
> > Betreff: RE: [GRASS-user] Wrangling CityGML with GRASS ?
> >
> > Hi Peter,
> >
> > Not personally...
> > I would guess you would import CityGML through GDAL:
> > https://3d.bk.tudelft.nl/svitalis/citygml/gdal/2017/07/24/messing-around-with-citygml-on-gdal-2.2.html
> > There you can create subsets and the like...
> >
> > What are you planning to do with it, roughly?
> >
> > Cheers
> > Stefan
> >
> >
> > -----Original Message-----
> > From: grass-user <grass-user-bounces at lists.osgeo.org> On Behalf Of "Peter Löwe"
> > Sent: torsdag 1. august 2019 11:10
> > To: grass-user at lists.osgeo.org
> > Subject: [GRASS-user] Wrangling CityGML with GRASS ?
> >
> > Hi list,
> >
> > I'm looking for information/howtos/etc. about how to deal with large CityGML data sets using GRASS.
> >
> > Has anybody already explored this ?
> >
> > Best,
> > Peter
> >
> > <peter.loewe at gmx.de>
> >
> > _______________________________________________
> > grass-user mailing list
> > grass-user at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-user
> >
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 6 Aug 2019 14:45:50 +0200
> From: Markus Metz <markus.metz.giswork at gmail.com>
> To: Peter Löwe <peter.loewe at gmx.de>
> Cc: Stefan Blumentrath <Stefan.Blumentrath at nina.no>,
> "grass-user at lists.osgeo.org" <grass-user at lists.osgeo.org>
> Subject: Re: [GRASS-user] Wrangling CityGML with GRASS ?
> Message-ID:
> <CAG+h=FEkahTTz_DCBcgM8+0GBaqmQ7P_eGLMaEndZigbTdAZ4Q at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Peter,
>
> On Tue, Aug 6, 2019 at 12:23 PM "Peter Löwe" <peter.loewe at gmx.de> wrote:
> >
> > Hi Stefan,
> >
> > thanks for the link: That's also the latest information we found so far,
> except for several OSGeo conference recordings (e.g.
> https://doi.org/10.5446/40913 https://doi.org/10.5446/40694).
>
> GML and GMLAS are supported by GDAL 2.2+. However, in order to import GMLAS
> properly, some tricks are needed (interleaved reading for non-sequential
> layers, see
> https://gdal.org/drivers/vector/gmlas.html#performance-issues-with-large-multi-layer-gml-files)
> which are built into GRASS 7.6+.
>
> > My colleagues have ingested CityGML datasets into R, which caused issues
> with the vector-topology for individual buildings.
>
> That's not related to the data format, but to the content: 3D polygons.
> These are not supported in GRASS, when importing you need to convert the
> data to 2D with v.in.ogr -2, otherwise you get corrupt topology. Maybe this
> is also needed for R.
>
> Markus M
>
> > Also, we have to cope with significant amounts of CityGML datasets, which
> would require very large amounts of RAM, if the processing is done in R.
> Since GRASS locations are storage-effective AND GRASS handles vector
> topologies well, I had hoped that someone already explored this approach
> further :-)
> >
> > If this should be not the case (yet) we'll gladly report at one of next
> years FOSS4G events.
> >
> > Best,
> > peter
> >
> > <peter.loewe at gmx.de>
> >
> >
> > > Gesendet: Dienstag, 06. August 2019 um 11:13 Uhr
> > > Von: "Stefan Blumentrath" <Stefan.Blumentrath at nina.no>
> > > An: "Peter Löwe" <peter.loewe at gmx.de>, "grass-user at lists.osgeo.org" <
> grass-user at lists.osgeo.org>
> > > Betreff: RE: [GRASS-user] Wrangling CityGML with GRASS ?
> > >
> > > Hi Peter,
> > >
> > > Not personally...
> > > I would guess you would import CityGML through GDAL:
> > >
> https://3d.bk.tudelft.nl/svitalis/citygml/gdal/2017/07/24/messing-around-with-citygml-on-gdal-2.2.html
> > > There you can create subsets and the like...
> > >
> > > What are you planning to do with it, roughly?
> > >
> > > Cheers
> > > Stefan
> > >
> > >
> > > -----Original Message-----
> > > From: grass-user <grass-user-bounces at lists.osgeo.org> On Behalf Of
> "Peter Löwe"
> > > Sent: torsdag 1. august 2019 11:10
> > > To: grass-user at lists.osgeo.org
> > > Subject: [GRASS-user] Wrangling CityGML with GRASS ?
> > >
> > > Hi list,
> > >
> > > I'm looking for information/howtos/etc. about how to deal with large
> CityGML data sets using GRASS.
> > >
> > > Has anybody already explored this ?
> > >
> > > Best,
> > > Peter
> > >
> > > <peter.loewe at gmx.de>
> > >
> > > _______________________________________________
> > > grass-user mailing list
> > > grass-user at lists.osgeo.org
> > > https://lists.osgeo.org/mailman/listinfo/grass-user
> > >
> > _______________________________________________
> > grass-user mailing list
> > grass-user at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/grass-user
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190806/2dc10111/attachment.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
> ------------------------------
>
> End of grass-user Digest, Vol 160, Issue 5
> ******************************************
>
More information about the grass-user
mailing list