CRS not set when parsing GML documents
--------------------------------------
Key: GEOT-3962
URL: https://jira.codehaus.org/browse/GEOT-3962
Project: GeoTools
Issue Type: Bug
Components: xml
Affects Versions: 8.0-M3
Environment: ubuntu 11.10 64 bit
$ java -version
java version "1.7.0_147-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.0) (7~b147-2.0-0ubuntu0.11.10.1)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)
Reporter: Ákos Maróy
Attachments: Quickstart.java, test3.gml, test3.xsd
I'm trying to go through the code samples privded here:
http://docs.geotools.org/latest/userguide/library/xml/geometry.html
in particular, the GML3 parsing code sample, and when running the code,
I get the following warnings, during the call to
gml.decodeFeatureCollection():
Nov 25, 2011 1:01:30 PM
org.geotools.feature.simple.SimpleFeatureTypeBuilder add
WARNING: Creating location with null CoordinateReferenceSystem - did you
mean to setCRS?
Nov 25, 2011 1:01:30 PM
org.geotools.feature.simple.SimpleFeatureTypeBuilder add
WARNING: Creating geom with null CoordinateReferenceSystem - did you
mean to setCRS?
this is despite the fact that I have called
gml.setCoordinateReferenceSystem() earlier - see the complete code
sample at the end of the e-mail.
looking at the source code of GML.decodeFeatureCollection() in the
geotools-8.0-M3 codebase, I find that indeed, the while
gml.setCoordinateReferenceSystem() sets the crs property in the GML
object, the decodeFeatureCollection() call does not use the crs property.
am I doing something wrong here? what would be the proper way to parse a
GML file?
the code I used was the following, based on the code in the
documentation page:
File file = ...
InputStream xml = new FileInputStream(file);
GML gml = new GML(Version.GML3);
gml.setCoordinateReferenceSystem(DefaultGeographicCRS.WGS84);
simpleFeatureCollection fc = gml.decodeFeatureCollection(xml);
the test data I used is the three point test GML3 data found in the
documentation page
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel