@Test public void getGeometry() throws Exception { Assert.assertEquals(120.99, featureModel.getGeometry(feature).getCoordinate().x, 0.01); }
@Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geom = (Geometry) asFeature(feature).getDefaultGeometry(); if (geom instanceof MultiLineString && vectorLayerInfo.getLayerType() == LayerType.LINESTRING) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPolygon && vectorLayerInfo.getLayerType() == LayerType.POLYGON) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPoint && vectorLayerInfo.getLayerType() == LayerType.POINT) { return (Geometry) geom.getGeometryN(0).clone(); } return (Geometry) geom.clone(); }
ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geom = (Geometry) asFeature(feature).getDefaultGeometry(); if (geom instanceof MultiLineString && vectorLayerInfo.getLayerType() == LayerType.LINESTRING) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPolygon && vectorLayerInfo.getLayerType() == LayerType.POLYGON) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPoint && vectorLayerInfo.getLayerType() == LayerType.POINT) { return (Geometry) geom.getGeometryN(0).clone(); } return (Geometry) geom.clone(); } }
ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geom = (Geometry) asFeature(feature).getDefaultGeometry(); if (geom instanceof MultiLineString && vectorLayerInfo.getLayerType() == LayerType.LINESTRING) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPolygon && vectorLayerInfo.getLayerType() == LayerType.POLYGON) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPoint && vectorLayerInfo.getLayerType() == LayerType.POINT) { return (Geometry) geom.getGeometryN(0).clone(); } return (Geometry) geom.clone(); } ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); }
ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geom = (Geometry) asFeature(feature).getDefaultGeometry(); if (geom instanceof MultiLineString && vectorLayerInfo.getLayerType() == LayerType.LINESTRING) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPolygon && vectorLayerInfo.getLayerType() == LayerType.POLYGON) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPoint && vectorLayerInfo.getLayerType() == LayerType.POINT) { return (Geometry) geom.getGeometryN(0).clone(); } return (Geometry) geom.clone(); } ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); @Override void setLayerInfo(VectorLayerInfo vectorLayerInfo); @Override Attribute getAttribute(Object feature, String name); @Override Map<String, Attribute> getAttributes(Object feature); @Override int getSrid(); @Override Geometry getGeometry(Object feature); @Override String getId(Object feature); @Override Object newInstance(); @Override Object newInstance(String id); @Override void setGeometry(Object feature, Geometry geometry); @Override boolean canHandle(Object feature); }
ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel { @Override public Geometry getGeometry(Object feature) throws LayerException { Geometry geom = (Geometry) asFeature(feature).getDefaultGeometry(); if (geom instanceof MultiLineString && vectorLayerInfo.getLayerType() == LayerType.LINESTRING) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPolygon && vectorLayerInfo.getLayerType() == LayerType.POLYGON) { return (Geometry) geom.getGeometryN(0).clone(); } else if (geom instanceof MultiPoint && vectorLayerInfo.getLayerType() == LayerType.POINT) { return (Geometry) geom.getGeometryN(0).clone(); } return (Geometry) geom.clone(); } ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, int srid,
			DtoConverterService converterService); @Override void setLayerInfo(VectorLayerInfo vectorLayerInfo); @Override Attribute getAttribute(Object feature, String name); @Override Map<String, Attribute> getAttributes(Object feature); @Override int getSrid(); @Override Geometry getGeometry(Object feature); @Override String getId(Object feature); @Override Object newInstance(); @Override Object newInstance(String id); @Override void setGeometry(Object feature, Geometry geometry); @Override boolean canHandle(Object feature);  }