Opened 11 years ago
Closed 11 years ago
#4883 closed defect (fixed)
libkml can't read own output
Reported by: | 45136 | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.3 |
Component: | OGR_SF | Version: | 1.9.2 |
Severity: | normal | Keywords: | libkml |
Cc: | winkey, Even Rouault |
Description
I have made the following simple kml file named kmltest.kml:
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <Document> <name>kmltest.kml</name> <Folder> <name>testlayer</name> <Placemark> <name>Test point</name> <styleUrl>#L_WB</styleUrl> <ExtendedData> <Data name="System"> <displayName>System</displayName> <value>foobar</value> </Data> </ExtendedData> <Point> <coordinates>36.1,36.2,0</coordinates> </Point> </Placemark> </Folder> </Document> </kml>
and performed the following operation with gdal 1.9.2 and libkml driver:
ogr2ogr -f libkml kmlexport.kml kmltest.kml ogr2ogr -f libkml kmlexport2.kml kmlexport.kml
kmlexport has the following ExtendedData:
<ExtendedData> <SchemaData schemaUrl="#testlayer.schema"> <SimpleData name="System"> foobar </SimpleData> </SchemaData> </ExtendedData>
(which is correct), but the second output looks like this:
<kml> <Document> <Schema id="testlayer.schema"> <SimpleField name="" type="string"/> </Schema> <Document> <name>testlayer</name> <Placemark> <name>Test point</name> <styleUrl>#L_WB</styleUrl> <Point> <coordinates> 36.1,36.2,0 </coordinates> </Point> </Placemark> </Document> </Document> </kml>
Looks like ExtendedData as provided by the first kmleport.kml is not read in the second running.
Change History (8)
comment:1 by , 11 years ago
Cc: | added |
---|---|
Component: | default → OGR_SF |
Milestone: | 2.0.0 |
comment:2 by , 11 years ago
I'm sorry, I have only access to the OSGEo4W Installer on Windows 7, no chance to build myself. GDAL Version is 1.9.2-1 from 2012/10/8, and no newer available. Because this is a blocker for anyone using kml with ExtendedData from external sources: Can anybody build a new gdal version for OSGEo4W?
comment:3 by , 11 years ago
Status: | new → assigned |
---|
Ah, interesting. I did the libkml build into OSGeo4W (just added recently) and I may have botched something. I'll investigate.
comment:5 by , 11 years ago
Milestone: | → 1.9.3 |
---|
comment:6 by , 11 years ago
The new package (1.9.2-2) is now uploaded. Could you upgrade and see if the problem is resolved for you?
comment:8 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I am unable to reproduce the problem. For me the kmlexport2.kml file still has this:
This is running with the current head of the 1.9 branch but I don't see any noteworthy changes in libkml driver recently likely to explain this. Hmm, on review change set r25131 might possible relate. Perhaps you could try after patching this into your tree or building from the head of the 1.9 branch?
+winkey +rouault for comment.