Read from KML not working

Hi dear KNIMers,

I´m trying the spatial processing notes and try to read an KML-File but it is not working and the error is not really helpful.

WARN  Read from KML        5:11       there was already a property named "name; we will rename this one name(2)
WARN  Read from KML        5:11       there was already a property named "description; we will rename this one description(2)
WARN  Read from KML        5:11       ignoring a feature which has no geometry: SimpleFeatureImpl:folder=[SimpleFeatureImpl.Attribute: name<name id=fid-7399baf_17db97e34cd_-7ff6>=Test_Gasleitung, SimpleFeatureImpl.Attribute: visibility<visibility id=fid-7399baf_17db97e34cd_-7ff6>=true, SimpleFeatureImpl.Attribute: open<open id=fid-7399baf_17db97e34cd_-7ff6>=true, SimpleFeatureImpl.Attribute: address<address id=fid-7399baf_17db97e34cd_-7ff6>=null, SimpleFeatureImpl.Attribute: phoneNumber<phoneNumber id=fid-7399baf_17db97e34cd_-7ff6>=null, SimpleFeatureImpl.Attribute: description<description id=fid-7399baf_17db97e34cd_-7ff6>=null, SimpleFeatureImpl.Attribute: LookAt<LookAt id=fid-7399baf_17db97e34cd_-7ff6>=null, SimpleFeatureImpl.Attribute: Style<Style id=fid-7399baf_17db97e34cd_-7ff6>=null, SimpleFeatureImpl.Attribute: Region<Region id=fid-7399baf_17db97e34cd_-7ff6>=null, SimpleFeatureImpl.Attribute: name<name id=fid-7399baf_17db97e34cd_-7ff6>=Test_Gasleitung, SimpleFeatureImpl.Attribute: description<description id=fid-7399baf_17db97e34cd_-7ff6>=null, SimpleFeatureImpl.Attribute: Feature<Feature id=fid-7399baf_17db97e34cd_-7ff6>=[SimpleFeatureImpl:placemark=[SimpleFeatureImpl.Attribute: name<name id=fid-7399baf_17db97e34cd_-7ff7>=kml_2, SimpleFeatureImpl.Attribute: visibility<visibility id=fid-7399baf_17db97e34cd_-7ff7>=true, SimpleFeatureImpl.Attribute: open<open id=fid-7399baf_17db97e34cd_-7ff7>=true, SimpleFeatureImpl.Attribute: address<address id=fid-7399baf_17db97e34cd_-7ff7>=null, SimpleFeatureImpl.Attribute: phoneNumber<phoneNumber id=fid-7399baf_17db97e34cd_-7ff7>=null, SimpleFeatureImpl.Attribute: description<description id=fid-7399baf_17db97e34cd_-7ff7>=null, SimpleFeatureImpl.Attribute: LookAt<LookAt id=fid-7399baf_17db97e34cd_-7ff7>=null, SimpleFeatureImpl.Attribute: Style<Style id=fid-7399baf_17db97e34cd_-7ff7>=null, SimpleFeatureImpl.Attribute: Region<Region id=fid-7399baf_17db97e34cd_-7ff7>=null, SimpleFeatureImpl.Attribute: fid<fid id=fid-7399baf_17db97e34cd_-7ff7>=Gasleitung.0, SimpleFeatureImpl.Attribute: id<id id=fid-7399baf_17db97e34cd_-7ff7>=74719373, SimpleFeatureImpl.Attribute: it_gew_auslegungsdruckstufe<it_gew_auslegungsdruckstufe id=fid-7399baf_17db97e34cd_-7ff7>=ND, SimpleFeatureImpl.Attribute: it_re_prioritaet<it_re_prioritaet id=fid-7399baf_17db97e34cd_-7ff7>=3, SimpleFeatureImpl.Attribute: Geometry<Geometry id=fid-7399baf_17db97e34cd_-7ff7>=LINESTRING (6.90638877827605 50.9597791077431, 6.90662353579851 50.9600015517045, 6.90665897249426 50.9600720778825, 6.90686249784896 50.9602664223422, 6.90694163103016 50.960346986425, 6.9070749508274 50.9604827004504)]]]
WARN  Read from KML        5:11       Node created an empty data table.

mini2.xml (1.2 KB)

Note: You must rename the attached file to mini.kml, because the forum doesn’t allow upload of .kml files

When I convert the file to a gml file, it works to read with the note “read from gml”, but then I can’t continue because when I use notes like “View Geometries as Map” I get another error:

ERROR View Geometries as Map 5:8 Execute failed: the input table 1 contains spatial data but no Coordinate Reference System

Can someone give me a pointer whats going wrong?

I`m using Knime 4.5

Best Regards,

Paul

Ok I did some testing and the problem is the the SimpleData stuff. Apparently KNIME can’t read these, even so that the underlining geotools can (what I figured from the documentation). When I remove the SimpleData Extentsions it works.
The problem with the glm file is that knime does not recognize the EPSG System and does not fill the properties (crs WKT and crs code), I had to inject them myself.
So I worked around the problem, but to be honest to work with kml or gml files in knime is a pain in the but…

We can close this topic, maybe my findings help out some future users.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.