Skip to main content

Hello all,

This question has been asked before, but despite an example found here i still can't manage to get the description-attribute from the following kml-file: . Somehow FME sees the values for the kml_description (and kml_description_raw_text and kml_description_text) attribute as missing. I know for sure there is a description as i see it when opening the kml-file in Notepad++.

What i do see, when sending the data to an inspector is three attributes:

- kml_description_b (with Value Onderwerp:)

- kml_description_b{1} (with Value Status:)

- kml_description_b{2} (with Value Nummer:)

So the field name has become a value and the original value is lost.

I hope someone can help me with this. I've also been trying this with the Esri ArcGIS tool 'KML to layer'. Then i do get the description in a feature class, but somehow all locations are placed at the same coordinate.

Greetings,

Antoon van Ham

City of Eindhoven, Netherlands

i tried it, with same results. Empty discription fields. (wich are stuffed in a list)

But if u use a xml reader and choose to read the description schema, it will show the data (i just tried that) In a single description attribute, concatenated with a space as separator.

Maybe the colon is messin it up?


OK, so I checked with our developer and it is 50% our problem and 50% your problem!

Your part of the problem is that HTML content inside the description tag should be wrapped inside a CDATA element. Your descriptions aren't. If they were, then FME would be able to read it correctly. Not that it really matters, but where was this KML generated?

Our part of the problem is that, even without that element, we should be able to read that as a string of HTML. That problem is already filed with our developers as PR#39694 and I've added this question as a reference so we are informed when it is fixed.

I think, additionally, your tags are written with < and > symbols,
whereas KML usually has < and > - if they were formatted
like that then FME does appear to be able to read the data as a string. So you could do a global replace of < with < and > with > (but if you were doing that you might as well do a global replace to add the CDATA element)

Hope this helps

Mark


Thank you both for your answers!

The xml reader did the trick to get the description field from this kml-file. Now i'm able to extract the 'nummer'-value from this field and merge/join it with an excel-sheet that contains additional information to the locations. Combined these are the output of an app (BuitenBeter) that people can use to inform the city about all kinds of things in public space, like not working streetlights, damaged pavement, graffiti, etc.

Both the kml- en excel-file are outputs off a software-program that a collegue uses and that i know nothing about. So adding a CDATA element or replacement of symbols (they look the same to me) are not for me to implement. But i understand that in a future release the string should be read from this file what will be an improvement.

For now i can already use the xml reader and that certainly helps me out. Thanks again!

Greetings, Antoon


Reply