Bug 202702 - Not able to load valid kml file
Summary: Not able to load valid kml file
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: 0.8 (KDE 4.3)
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-05 22:18 UTC by Sven Klomp
Modified: 2013-10-20 08:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test kml file (262 bytes, text/plain)
2009-08-05 22:19 UTC, Sven Klomp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Klomp 2009-08-05 22:18:06 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Unlisted Binary Package

Marble complains while loading the simple kml example file from Wikipedia (http://en.wikipedia.org/wiki/Kml):

 adding container: "/net/homes/klomp/tmp/test" true
 starting parser for "/net/homes/klomp/tmp/test"
 No recent Default Placemark Cache File available for  "/net/homes/klomp/tmp/test"
 [GeoParser::read] -> Error occurred: "The file is not a valid KML 2.0 / 2.1 / 2.2 file"
 Could not parse file!
 ContainerSize for "/net/homes/klomp/tmp/test" : 0
 QFSFileEngine::open: No file name specified
 placemarksLoaded
 Containername: "/net/homes/klomp/tmp/test.kml" to be finalized: true 1

However, http://www.kmlvalidator.org says the file is a valid OGC KML 2.2 file.
Comment 1 Sven Klomp 2009-08-05 22:19:17 UTC
Created attachment 35882 [details]
Test kml file
Comment 2 Sven Klomp 2009-08-05 22:21:24 UTC
I'm wondering why "kml" is truncated in the error message (/net/homes/klomp/tmp/test).
Comment 3 Andrew Manson 2009-08-09 12:25:48 UTC
This bug is shown in the new unit test TestGeoDataWriter::countFeatures(New York) . When this bug is fixed that test should PASS. 

The problem is that the parser currently only supports KML documents that are surrounded by <Document> </Document> tags, so the single Placemark in this file is not being picked up.
Comment 4 Dennis Nienhüser 2010-09-07 23:49:19 UTC
SVN commit 1172708 by nienhueser:

Accept kml documents containing a Placemark as root item. Original fix by Thibaut Gridel in rev. 1172705.
BUG: 202702

 M  +4 -0      KmlPlacemarkTagHandler.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1172708