Skip to main content
I am trying to open the Manitoba Highway Conditions KML and getting an error: 

 

 

XML Parser error: 'Error in input dataset:'file:///C:/Users/lawiebe/AppData/Local/Temp/FME_OGCKML_KMZ_1363808830240_7172/Manitoba Highway Conditions.kml' line:1 column:425975 message:invalid byte 'l' at position 2 of a 2-byte sequence'

 

At that location in the file there is a coordinate:

 

-96.79388,50.18568,94

 

 

the 5 of ,50 is character 425975 in the file...  doe not look like an invalid character, that is why I am wondering if there may be a line length limit?

 

 

The KML opens in ArcGIS Desktop, Server and Google Earth.  I have tried FMW Workbench, Universal Viewer, Data Inspector 2011,2012,2013 and all have the issue.

 

 

The file can be accessed at:

 

http://roaddata.gov.mb.ca/map/gearth/kmz/manitobahighwayconditions_e_kmz.kmz

 

 

Thanks,

 

Larry
Hi Larry!

 

 

Related to limitations of the KML-format is this article:

 

https://groups.google.com/forum/?fromgroups=#!topic/kml-support-getting-started/xVXa3qP4IWY

 


Perhaps not too helpful, but I get that error too in FME 2009 and FME 2013, so it's something fundamental with the file. Removing it from the KMZ also doesn't help. I suggest you contact Safe Support direct to get to a KML expert and see if they can pin the issue down.

 

 

The issue is certainly triggered when the data schema is scanned, because if you disable this in Workbench you can at least get the featuretypes onto the canvas.

 

 

Link at the top of the page for Support...
Hi Larry,

 

 

I downloaded the kmz in question (which redirects to http://roaddata.gov.mb.ca/map/gearth/conditions.aspx?lang=e&format=kmz by the way), extracted the kml file inside and tried to open it in two different text editors. Both stated that there was a problem with badly formed UTF-8. That might perhaps be your problem right there.

 

 

I took the liberty of saving a formatted (and hopefully, repaired) version of the kml here. It would be interesting to hear if you're able to read it successfully using FME.

 

 

Good luck.

 

 

David

 

 


Looking at the changelog for SP1 BETA:

 

http://downloads.safe.com/fme/beta/whatsnew_sp.txt

 

 

There are some lines that might be worth a look:

 

 BUILD 13416  20130131 ========================== 
 
 KML Writer: Improved handling of dynamic feature types (C62488 PR#39679) 
       

 

:

 

 

 

 


Hi Larry,

 

I believe the problem is that the XML header says the document is encoded as UTF-8, but in fact it is not. It is actually ISO-8859-1

 

 

So the workaround here is to download the file and edit the header to "ISO-8859-1". And tell the data provider of course. Incidentally, where do you get the Manitoba roads kml from? Is it publically available?

 

 

Cheers

 

 

Mark
Doh! Well if I read your question properly I'd see a link to the data. Incidentally, the problem item is a piece of text reading "Île-des-Chênes". But once the header matches the encoding it won't be an issue.
Thanks everybody for the quick answers! I leave work and when I get in I have my answer

 

 

Mark, you nailed it, I am now happily reading road conditions.  I will contact some of the people I know at the Province to see if that can be changed in the file.

 

 

Thanks All

 

Case closed.

Reply