Hello,
I am using the following code to open a KML File:
stream = new FileInputStream(aFilename);
Parser parser = new Parser(new KMLConfiguration());
SimpleFeature doc = (SimpleFeature) parser.parse(stream);
On one of the KML file I received, the program generates a few messages in
the eclipse console:
Feb 01, 2016 5:13:48 PM org.geotools.xml.impl.HTTPURIHandler getConnection
INFO: http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd
Feb 01, 2016 5:13:50 PM org.geotools.xml.impl.HTTPURIHandler getConnection
INFO: http://code.google.com/apis/kml/schema/kml22gx.xsd
Feb 01, 2016 5:13:50 PM org.geotools.xml.impl.ParserHandler startElement
WARNING: Error parsing: http://code.google.com/apis/kml/schema/kml22gx.xsd
Feb 01, 2016 5:13:50 PM org.geotools.xml.Schemas getImports
INFO: Schema import wasn't resolved: http://www.w3.org/2005/Atom declared
locati
on: atom-author-link.xsd
Feb 01, 2016 5:13:50 PM org.geotools.xml.Schemas getImports
INFO: Schema import wasn't resolved:
urn:oasis:names:tc:ciq:xsdschema:xAL:2.0 de
clared location: http://docs.oasis-open.org/election/external/xAL.xsd
java.lang.ClassCastException: java.util.HashMap cannot be cast to
org.opengis.fe
ature.simple.SimpleFeature
Is hashmap a valid returned map, or is there something wrong with the KML
file.
Thank you very much with any help,
Norman
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users