public Object getProperty(Object object, QName name) throws Exception { if ("srsName".equals(name.getLocalPart())) { Geometry geometry = (Geometry) object; if (geometry.getUserData() instanceof CoordinateReferenceSystem) { CoordinateReferenceSystem crs = (CoordinateReferenceSystem) geometry.getUserData(); return GML3EncodingUtils.crs(crs); } } return null; } }
public Object getProperty(Object object, QName name) throws Exception { Geometry geometry = (Geometry) object; if ("srsName".equals( name.getLocalPart() ) ) { CoordinateReferenceSystem crs = GML3EncodingUtils.getCRS(geometry); if (crs != null) { return GML3EncodingUtils.crs(crs); } } if (GML.id.equals(name)) { return GML3EncodingUtils.getID(geometry); } if (GML.name.equals(name)) { return GML3EncodingUtils.getName(geometry); } if (GML.description.equals(name)) { return GML3EncodingUtils.getDescription(geometry); } return null; } }
public Object getProperty(Object object, QName name) { Envelope envelope = (Envelope) object; if (envelope.isNull()) { return null; } if (name.getLocalPart().equals("lowerCorner")) { return new DirectPosition2D(envelope.getMinX(), envelope.getMinY()); } if (name.getLocalPart().equals("upperCorner")) { return new DirectPosition2D(envelope.getMaxX(), envelope.getMaxY()); } if (name.getLocalPart().equals("srsName") && envelope instanceof ReferencedEnvelope) { return GML3EncodingUtils.crs(((ReferencedEnvelope) envelope) .getCoordinateReferenceSystem()); } return null; } }
public Object getProperty(Object object, QName name) { Envelope envelope = (Envelope) object; if (envelope.isNull()) { return null; } if (name.getLocalPart().equals("lowerCorner")) { return new DirectPosition2D(envelope.getMinX(), envelope.getMinY()); } if (name.getLocalPart().equals("upperCorner")) { return new DirectPosition2D(envelope.getMaxX(), envelope.getMaxY()); } if (name.getLocalPart().equals("srsName") && envelope instanceof ReferencedEnvelope) { return GML3EncodingUtils.crs(((ReferencedEnvelope) envelope) .getCoordinateReferenceSystem()); } return null; } }