public void set(Object object, String xpath, Object value, Class target) throws IllegalAttributeException { if (object instanceof Feature) { final Feature f = (Feature) object; GeometryAttribute geom; if (value instanceof GeometryAttribute) { geom = (GeometryAttribute) value; f.setDefaultGeometryProperty(geom); } else if (value instanceof Geometry) { geom = f.getDefaultGeometryProperty(); geom.setValue(value); } else { throw new IllegalArgumentException("Argument is not a geometry: " + value); } } if (object instanceof FeatureType) { throw new IllegalAttributeException(null, "feature type is immutable"); } } }
public void set(Object object, String xpath, Object value, Class target) throws IllegalAttributeException { if (object instanceof Feature) { final Feature f = (Feature) object; GeometryAttribute geom; if (value instanceof GeometryAttribute) { geom = (GeometryAttribute) value; f.setDefaultGeometryProperty(geom); } else if (value instanceof Geometry) { geom = f.getDefaultGeometryProperty(); geom.setValue(value); } else { throw new IllegalArgumentException("Argument is not a geometry: " + value); } } if (object instanceof FeatureType) { throw new IllegalAttributeException("feature type is immutable"); } } }
public void set(Object object, String xpath, Object value, Class target) throws IllegalAttributeException { if (object instanceof Feature) { final Feature f = (Feature) object; GeometryAttribute geom; if (value instanceof GeometryAttribute) { geom = (GeometryAttribute) value; f.setDefaultGeometryProperty(geom); } else if (value instanceof Geometry) { geom = f.getDefaultGeometryProperty(); geom.setValue(value); } else { throw new IllegalArgumentException("Argument is not a geometry: " + value); } } if (object instanceof FeatureType) { throw new IllegalAttributeException(null, "feature type is immutable"); } } }
nearestFeature .getDefaultGeometryProperty() .setValue( geometryFactory.createPoint( new Coordinate(nearestCoords[1].x, nearestCoords[1].y)));
double lrsMeasure = featureFromMeasure + (featureToMeasure - featureFromMeasure) nearestFeature.getDefaultGeometryProperty().setValue( geometryFactory.createPoint(new Coordinate(nearestCoords[1].x, nearestCoords[1].y)));