@Test public void testSetGeometry() throws Exception { WKTReader wktReader = new WKTReader(); Point pt = (Point) wktReader.read("POINT (5 5)"); featureModel.setGeometry(feature, pt); Assert.assertEquals(5, featureModel.getGeometry(feature).getCoordinate().x, 0); }
@Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geometry = (Geometry) asFeature(feature).getDefaultGeometry(); geometry.setSRID(srid); return (Geometry) geometry.clone(); }
GeoToolsFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geometry = (Geometry) asFeature(feature).getDefaultGeometry(); geometry.setSRID(srid); return (Geometry) geometry.clone(); } }
GeoToolsFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geometry = (Geometry) asFeature(feature).getDefaultGeometry(); geometry.setSRID(srid); return (Geometry) geometry.clone(); } GeoToolsFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); }
GeoToolsFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geometry = (Geometry) asFeature(feature).getDefaultGeometry(); geometry.setSRID(srid); return (Geometry) geometry.clone(); } GeoToolsFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); @Override Attribute getAttribute(Object feature, String name); @Override Map<String, Attribute> getAttributes(Object feature); @Override Geometry getGeometry(Object feature); @Override String getId(Object feature); @Override int getSrid(); @Override Object newInstance(); @Override Object newInstance(String id); @Override boolean canHandle(Object feature); }
GeoToolsFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geometry = (Geometry) asFeature(feature).getDefaultGeometry(); geometry.setSRID(srid); return (Geometry) geometry.clone(); } GeoToolsFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); @Override Attribute getAttribute(Object feature, String name); @Override Map<String, Attribute> getAttributes(Object feature); @Override Geometry getGeometry(Object feature); @Override String getId(Object feature); @Override int getSrid(); @Override Object newInstance(); @Override Object newInstance(String id); @Override boolean canHandle(Object feature);  }