Hi Jody,
Thanks for looking at this.
The test that I have is SRSWfsTest in Geoserver/app-schema-test. At the moment it has a lot of things commented out because some things don't work yet, such as this issue. With the patch, I can uncomment them and the test passes.
- In testGetFeatureContent:
// TODO: Uncomment when
GEOT-2708 is fixed
// assertXpathEvaluatesTo(EPSG_4283, "(//ex:geomContainer)[1]/ex:geom/gml:Polygon/@srsName", doc);
// TODO: Uncomment when
GEOT-2708 is fixed
// assertXpathEvaluatesTo(EPSG_4283,
// "(//ex:geomContainer)[1]/ex:nestedFeature/ex:nestedGeom/ex:geom/gml:Point/@srsName",
// doc);
// TODO: Uncomment when
GEOT-2708 is fixed
// assertXpathEvaluatesTo(EPSG_4283, "(//ex:geomContainer)[2]/ex:geom/gml:Point/@srsName", doc);
// TODO: Uncomment when
GEOT-2708 is fixed
// assertXpathEvaluatesTo(
// EPSG_4283,
// "(//ex:geomContainer)[2]/ex:nestedFeature/ex:nestedGeom/ex:geom/gml:Polygon/@srsName",
// doc);
I hope that's enough? Or do you want me to write a non-app-schema test case in gt-property?
The test uses property file (/gt-app-schema/src/test/resources/test-data/SRSTestPropertyfile.properties).
The encoder gets the CRS from the user data, and I can't see how we can change that at the moment (and it's in XSD module).
In GML2EncodingUtils:
public static CoordinateReferenceSystem getCRS(Geometry g) {
if (g.getUserData() == null) {
return null;
}
if (g.getUserData() instanceof CoordinateReferenceSystem) {
return (CoordinateReferenceSystem) g.getUserData();
}
if (g.getUserData() instanceof Map) {
Map userData = (Map) g.getUserData();
return (CoordinateReferenceSystem) userData.get(CoordinateReferenceSystem.class);
}
return null;
}
http://jira.codehaus.org/browse/GEOS-3445