Bug 319612 - Update kml export to use KML 2.2 schema [patch]
Summary: Update kml export to use KML 2.2 schema [patch]
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Geolocation-KMLExport (show other bugs)
Version: 3.0.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-10 09:39 UTC by Glenn Washburn
Modified: 2018-01-31 19:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.0.0


Attachments
Version Change from 2.1 to 2.2 (1.17 KB, patch)
2013-08-12 22:36 UTC, David Greengas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Washburn 2013-05-10 09:39:46 UTC
The current KML export plugin export with a KML 2.1 schema.  It would be nice to use KML 2.2.

Reproducible: Always

Actual Results:  
Generated KML uses http://earth.google.com/kml/2.1 for schema.

Expected Results:  
Generated KML should use http://www.opengis.net/kml/2.2 for schema.

Since 2.2 is a super-set of 2.1, no other changes need be made.
Comment 1 David Greengas 2013-08-12 22:36:59 UTC
Created attachment 81682 [details]
Version Change from 2.1 to 2.2

I modified the declaration to use version 2.2 per the request. I did not confirm that version 2.2 is a superset of 2.1.
Comment 2 caulier.gilles 2013-10-30 08:01:05 UTC
Git commit 9a16cf758542b3f407e2eda707237c11f216547a by Gilles Caulier.
Committed on 30/10/2013 at 07:59.
Pushed by cgilles into branch 'master'.

KMLExport : apply patch #81682 to change KML version from 2.1 to 2.2
FIXED-IN: 4.0.0

M  +1    -1    kmlexport/kmlexport.cpp

http://commits.kde.org/kipi-plugins/9a16cf758542b3f407e2eda707237c11f216547a
Comment 3 Michael G. Hansen 2013-11-03 21:23:19 UTC
Hi Glenn,

if 2.2 is a superset of 2.1, but we do not use any 2.2 features, what is the advantage of changing the version then? IMHO the only change is that applications which can read 2.1 but not 2.2 will stop working, while applications which can read 2.2 should be able to read 2.1 as well.

Michael
Comment 4 Michael G. Hansen 2013-11-03 21:27:50 UTC
The patch actually sets "http://earth.google.com/kml/2.2" as the schema URL, which leads to a 404, while "http://www.opengis.net/kml/2.2" leads to an XSD document. I suggest to use "http://www.opengis.net/kml/2.2" then because it actually returns a document.

Michael
Comment 5 Glenn Washburn 2013-11-04 05:22:08 UTC
Michael,

I believe you're right about using http://www.opengis.net/kml/2.2, as I suggested in the bug report.  As to why use 2.2 instead of 2.1, I *believe* it was because google earth was complaining about it.  However, I currently don't have google earth setup to test this.  The only problem I can see with using 2.2 vs 2.1 is if there are some required elements in 2.2 that are currently not generated.  I suspect this is not the case, but it needs to be verified.
Comment 6 Glenn Washburn 2013-11-04 22:33:12 UTC
It looks like 32-bit Google Earth version 7.1.2.2041 has no problem with either 2.1 or 2.2, nor earth.google.com or www.opengis.net.  Considering Michael's comment, it seems most appropriate to keep the version at 2.1 but use the "www.opengis.net" hostname, especially considering that's the hostname used by Google Earth when exporting a KML file.
Comment 7 caulier.gilles 2013-11-05 09:30:42 UTC
Glenn,

http://www.opengis.net/kml/2.1 do not return a document, where http://www.opengis.net/kml/2.2 yes...

Gilles Caulier
Comment 8 caulier.gilles 2013-11-05 09:36:11 UTC
Git commit 5d994656fdc21613162645983889839897bd4683 by Gilles Caulier.
Committed on 05/11/2013 at 09:32.
Pushed by cgilles into branch 'master'.

fix url to XML documentation

M  +1    -1    kmlexport/kmlexport.cpp

http://commits.kde.org/kipi-plugins/5d994656fdc21613162645983889839897bd4683

diff --git a/kmlexport/kmlexport.cpp b/kmlexport/kmlexport.cpp
index 522985b..31f36b0 100644
--- a/kmlexport/kmlexport.cpp
+++ b/kmlexport/kmlexport.cpp
@@ -459,7 +459,7 @@ void KmlExport::generate()
     QDomImplementation impl;
     QDomProcessingInstruction instr = m_kmlDocument->createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"");
     m_kmlDocument->appendChild(instr);
-    QDomElement kmlRoot             = m_kmlDocument->createElementNS("http://earth.google.com/kml/2.2","kml");
+    QDomElement kmlRoot             = m_kmlDocument->createElementNS("http://www.opengis.net/kml/2.2", "kml");
     m_kmlDocument->appendChild( kmlRoot );

     QDomElement kmlAlbum            = addKmlElement(kmlRoot, "Document");