-
-
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
ogrmerge doesn't support layer or dataset style tables #11405
Comments
I highly doubt you got better luck with LineStyle. Trying with https://developers.google.com/kml/documentation/kmlreference?hl=fr#example_12 that doesn't work either. ogrmerge, and more fundamentally the OGR VRT format that is used underneath, have currently no support for storing style tables. |
Actually these commands will never be safe if they (silently) throw away things they don't understand. Because newer versions of KML (coming out of Google headquarters) will always have new features they don't understand. But there is hope on the horizon: these commands need to have an attitude change: pass things they don't understand through, unscathed. Oh, and the
|
From https://developers.google.com/kml/
The latests standard version is 2.3, 2015-08-04, but the latest OGC test suite is still for version 2.2. I feel that it is unlikely that KML will get much new features any more from Google or elsewhere. |
Well that website says
So therefore there will be future versions! |
I won't hold my breath for too long on this.... especially since Google dropped maintenance of libkml and no one is maintaining it anymore |
What is the bug?
We trust ogrmerge to just merge the KML that has been handed to it.
Alas, it wipes out the entire
section.
What's even more nefarious is that other styles aside from IconStyle survive. And of course it all depends on -f LIBKML. If one uses -f KML even more damage is done.
Steps to reproduce the issue
Here's your sample file,
https://developers.google.com/kml/documentation/kmlreference#example_7
Run ogrmerge on it.
Versions and provenance
ogrmerge --version
GDAL 3.9.3, released 2024/10/07
Additional context
Yes, this will have to wait until LIBKML supports Iconstyle I suppose.
But in the meantime promenet warnings that something has been wiped out should be emitted and documented.
I mean it currently makes plenty of
but not a peep about it running off with that style declaration.
What's worse, during testing I thought I could trust it, as my LineStyles sailed through unscathed. Little did I know that it had a special diet...
Oh well, looks like I'll have to merge my KML by hand from now on.
I mean some people want to merge some KMLs that were made by other programs.
Perhaps it could just close its eyes and just merge it without censoring it.
https://gis.stackexchange.com/a/37221/77230 I suppose is not safe either.
OK, I made a workaround:
mr.gz
The text was updated successfully, but these errors were encountered: