Hey all,
I'm attempting to process some KML files from an outside source and sometimes a <Placemark> will contain two <MultiGeometry> blocks. GDAL will not process these placemarks: layer.GetNextFeature() will return null, and GetLastErrorMsg() returns an empty string. I've attached a sample file "broken.kml", along with two copies in which one of the geometry blocks was deleted. GDAL processes these "part*.kml" files correctly. Google Earth uses the last geometry and ignores the others. Are there any settings I could use to get GDAL to exhibit the same behavior? Philip Kahly Software Engineer [hidden email] _______________________________________________ gdal-dev mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/gdal-dev ![]() ![]() ![]() |
On mercredi 15 février 2017 16:21:09 CET Kahly, Philip D. wrote: > Hey all, > > I'm attempting to process some KML files from an outside source and > sometimes a <Placemark> will contain two <MultiGeometry> blocks. > > GDAL will not process these placemarks: layer.GetNextFeature() will return > null, and GetLastErrorMsg() returns an empty string. > > I've attached a sample file "broken.kml", along with two copies in which > one of the geometry blocks was deleted. GDAL processes these "part*.kml" > files correctly. > > > Google Earth uses the last geometry and ignores the others. Are there any > settings I could use to get GDAL to exhibit the same behavior?
Philip,
From a quick try, I'd say that you must use the "old" KML driver. With the LIBKML driver, the reported geometry is the last one.
Even
-- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/gdal-dev |
Thanks, I am using the "old" KML driver. I tried to compile LIBKML for Windows awhile back but had quite a bit of trouble. I'll give it another try... Do you know of any distributions of GDAL with LIBKML? Philip |
On mercredi 15 février 2017 10:08:01 CET archgnulinux wrote: > Even Rouault-2 wrote > > > From a quick try, I'd say that you must use the "old" KML driver. With the > > LIBKML driver, the > > reported geometry is the last one. > > Thanks, I am using the "old" KML driver. > > I tried to compile LIBKML for Windows awhile back but had quite a bit of > trouble. > I'll give it another try... > > Do you know of any distributions of GDAL with LIBKML?
You mention Windows, but your nickname is archgnulinux... So assuming the later, the GDAL 2.1.2 package in UbuntuGIS unstable for Xenial is built against libkml. And I also see that the GDAL package in OSGEO4W has the libkml dependency.
> > Philip > > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/gdal-dev-Placemark-With-Two-Geometries- > Is-Not-Processed-tp5308067p5308076.html Sent from the GDAL - Dev mailing > list archive at Nabble.com. > _______________________________________________ > gdal-dev mailing list > https://lists.osgeo.org/mailman/listinfo/gdal-dev
-- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/gdal-dev |
Unfortunately, I have to use Windows for this... OSGEO4W didn't have the 2.1 version, but I found a package on GISInternals and it works. Thanks for you help. Philip |
On mercredi 15 février 2017 11:27:54 CET archgnulinux wrote: > Even Rouault-2 wrote > > > You mention Windows, but your nickname is archgnulinux... So assuming the > > later, the GDAL 2.1.2 package in UbuntuGIS unstable for Xenial is built > > against libkml. > > And I also see that the GDAL package in OSGEO4W has the libkml dependency. > > Unfortunately, I have to use Windows for this... > > OSGEO4W didn't have the 2.1 version
It does. It has 2.1.3
-- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/gdal-dev |
Free forum by Nabble | Edit this page |