Permalink
Browse files

Added a test for the GEOT-4301 fix and made the GML3ParsingUtils work…

… as well
  • Loading branch information...
Gerson Galang
Gerson Galang committed Nov 15, 2012
1 parent fd63ce4 commit 7ca6cfbb0035e5df23b0f037c3207c3b77ffb713
@@ -121,6 +121,8 @@ public static SimpleFeature parseFeature(ElementInstance instance, Node node, Ob
CoordinateReferenceSystem crs = null;
if (node.hasChild("boundedBy") && node.getChild("boundedBy").hasChild("Box")) {
crs = crs(node.getChild("boundedBy").getChild("Box"));
+ } else if (node.hasChild("boundedBy") && node.getChild("boundedBy").hasChild("Envelope")) {
+ crs = crs(node.getChild("boundedBy").getChild("Envelope"));
}
//build from element declaration
@@ -197,6 +199,8 @@ public static SimpleFeatureType featureType(Node node)
} else {
if (node.getChild("boundedBy").hasChild("Box")) {
crs = crs(node.getChild("boundedBy").getChild("Box"));
+ } else if (node.getChild("boundedBy").hasChild("Envelope")) {
+ crs = crs(node.getChild("boundedBy").getChild("Envelope"));
}
}
@@ -268,6 +268,7 @@ public void testParseGetFeature() throws Exception {
SimpleFeatureCollection featureCollection;
featureCollection = (SimpleFeatureCollection) featureCollections.get(0);
assertEquals(5, featureCollection.size());
+ assertNotNull(featureCollection.getBounds().getCoordinateReferenceSystem());
SimpleFeatureIterator features = featureCollection.features();

0 comments on commit 7ca6cfb

Please sign in to comment.