Some javascript/style in this post has been disabled (
why?)
Hi list,
I'm trying to
make a GML parser with geotools 2.2.2,
Here is my code,
URI gmlFile = new
File("/test.gml").toURI();
FileGMLDataStore
store = new FileGMLDataStore(gmlFile, 10, 10000);
String[] TypeName
= store.getTypeNames();
FeatureSource fs
= store.getFeatureSource(TypeName[0]);
FeatureCollection
fc = fs.getFeatures(); FeatureIterator I = fc.features();
FeatureReader fr
= fc.reader();
while(I.hasNext()){
Feature
f = (Feature)I.next();
System.out.println(f.getBounds().toString());
}
The execution
fails during the creation of the “FeatureSource” :
java.io.IOException: org.xml.sax.SAXException: Could not find element handler for
http://mapserver.gis.umn.edu/mapserver : features as a child of
FeatureAssociationType.
Here is my gml
code from “test.gml”,
<wfs:FeatureCollection
xmlns:wfs="http://www.opengis.net/wfs">
<gml:featureMember
xmlns:gml="http://www.opengis.net/gml">
<feature:features
xmlns:feature="http://mapserver.gis.umn.edu/mapserver" fid="3170">
<feature:geometry>
<gml:Point>
<gml:coordinates
decimal="." cs="," ts="
">804316.07294304,263309.52589873</gml:coordinates>
</gml:Point>
</feature:geometry>
</feature:features>
</gml:featureMember>
</wfs:FeatureCollection>
I don’t
understand why it fails,
Is Someone have already
make an GML parser with geotools 2.2.2 ?
Sorry for the duplicate
post,
Thanks,
Viv
------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users