Module org.apache.jena.geosparql
Class GeometryWrapper
java.lang.Object
org.apache.jena.geosparql.implementation.GeometryWrapper
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGeometryWrapper(String srsURI, String geometryDatatypeURI) Empty geometry with specified parameters.GeometryWrapper(GeometryWrapper geometryWrapper) Copy GeometryWrapper.GeometryWrapper(CustomCoordinateSequence pointCoordinateSequence, String geometryDatatypeURI, String srsURI) Point geometry with specified SRS.GeometryWrapper(org.locationtech.jts.geom.Geometry geometry, String geometryDatatypeURI) Default to WGS84 geometry and XY coordinate dimensions.GeometryWrapper(org.locationtech.jts.geom.Geometry geometry, String srsURI, String geometryDatatypeURI) Default to XY coordinate dimensions.GeometryWrapper(org.locationtech.jts.geom.Geometry geometry, String srsURI, String geometryDatatypeURI, DimensionInfo dimensionInfo) GeometryWrapper(org.locationtech.jts.geom.Geometry geometry, String srsURI, String geometryDatatypeURI, DimensionInfo dimensionInfo, String geometryLiteral) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.rdf.model.Literalorg.apache.jena.rdf.model.Literalorg.apache.jena.rdf.model.LiteralasLiteral(GeometryDatatype datatype) org.apache.jena.graph.NodeasNode()org.apache.jena.sparql.expr.NodeValueboundary()Transformations between SRS and Units will increase the inaccuracy of the results.checkTransformSRS(GeometryWrapper targetGeometryWrapper) Transforms, if necessary, the provided target GeometryWrapper according to this GeometryWrapper SRS_URI.booleancontains(GeometryWrapper targetGeometry) convertSRS(String srsURI) Returns this geometry wrapper converted to the SRS_URI URI.booleancrosses(GeometryWrapper targetGeometry) difference(GeometryWrapper targetGeometry) booleandisjoint(GeometryWrapper targetGeometry) doubledistance(GeometryWrapper targetGeometry) Distance (Euclidean or Great Circle depending on Geometry SRS URI) defaulting to metres.doubledistance(GeometryWrapper targetGeometry, String targetDistanceUnitsURI) Distance (Euclidean or Great Circle depending on Geometry SRS URI) in the Units of Measure stated in URI.doubledistance(GeometryWrapper targetGeometry, UnitsOfMeasure unitsOfMeasure) Distance (Euclidean or Great Circle depending on Geometry SRS URI) in the Units of Measure.doubledistanceEuclidean(GeometryWrapper targetGeometry) Distance (Euclidean) defaulting to metres.doubledistanceEuclidean(GeometryWrapper targetGeometry, String targetDistanceUnitsURI) Distance (Euclidean) in the Units of Measure stated in URI.doubledistanceEuclidean(GeometryWrapper targetGeometry, UnitsOfMeasure unitsOfMeasure) Distance (Euclidean) in the Units of Measure.doubledistanceGreatCircle(GeometryWrapper targetGeometry) Distance (Great Circle) defaulting to metres.doubledistanceGreatCircle(GeometryWrapper targetGeometry, String targetDistanceUnitsURI) Distance (Great Circle) in the Units of Measure stated in URI.doubledistanceGreatCircle(GeometryWrapper targetGeometry, UnitsOfMeasure unitsOfMeasure) Distance (Great Circle) in the Units of Measure.envelope()Envelope of GeometryWrapper with original coordinate order.booleanbooleanequalsExact(GeometryWrapper targetGeometry) booleanequalsExact(GeometryWrapper targetGeometry, double tolerance) booleanequalsTopo(GeometryWrapper targetGeometry) static GeometryWrapperExtract Geometry Wrapper from Geometry Literal.static GeometryWrapperextract(String lexicalForm, String datatypeURI, GeometryLiteralIndex.GeometryIndex targetIndex) Extract Geometry Wrapper from Geometry Literal.static final GeometryWrapperextract(org.apache.jena.graph.Node geometryLiteral) Extract Geometry Wrapper from Geometry Literal.static final GeometryWrapperextract(org.apache.jena.graph.Node geometryLiteral, GeometryLiteralIndex.GeometryIndex targetIndex) Extract Geometry Wrapper from Geometry Literal.static final GeometryWrapperextract(org.apache.jena.rdf.model.Literal geometryLiteral) Extract Geometry Wrapper from Geometry Literal.static final GeometryWrapperextract(org.apache.jena.rdf.model.Literal geometryLiteral, GeometryLiteralIndex.GeometryIndex targetIndex) Extract Geometry Wrapper from Geometry Literal.static final GeometryWrapperextract(org.apache.jena.sparql.expr.NodeValue geometryLiteral) Extract Geometry Wrapper from Geometry Literal.static final GeometryWrapperextract(org.apache.jena.sparql.expr.NodeValue geometryLiteral, GeometryLiteralIndex.GeometryIndex targetIndex) Extract Geometry Wrapper from Geometry Literal.static final GeometryWrapperBuilds a WKT Point of Geometry Wrapper.
This method does not use the GeometryLiteralIndex and so is best used for one of Geometry Wrappers.intorg.opengis.referencing.crs.CoordinateReferenceSystemgetCRS()static final GeometryWrapperstatic final GeometryWrapperorg.locationtech.jts.geom.EnvelopeEnvelope of GeometryWrapper in XY order.Latitude if Geographic SRS or in WGS84.
Used to convert between linear and non-linear units of measure.org.locationtech.jts.geom.GeometryintgetSRID()intorg.locationtech.jts.geom.GeometryinthashCode()intersection(GeometryWrapper targetGeometry) booleanintersects(GeometryWrapper targetGeometry) booleanisEmpty()booleanisSimple()booleanisValid()booleanoverlaps(GeometryWrapper targetGeometry) org.locationtech.jts.geom.IntersectionMatrixrelate(GeometryWrapper targetGeometry) booleanrelate(GeometryWrapper targetGeometry, String intersectionPattern) symDifference(GeometryWrapper targetGeometry) toString()booleantouches(GeometryWrapper targetGeometry) Transform the GeometryWrapper into another spatial reference system.Transform the GeometryWrapper into another spatial reference system.org.locationtech.jts.geom.GeometryXY geometry translated by the domain range of the SRS, if a Geographic SRS.
Returns XY geometry if not a Geographic SRS.union(GeometryWrapper targetGeometry) booleanwithin(GeometryWrapper targetGeometry)
-
Constructor Details
-
GeometryWrapper
public GeometryWrapper(org.locationtech.jts.geom.Geometry geometry, String srsURI, String geometryDatatypeURI, DimensionInfo dimensionInfo) - Parameters:
geometry- In X/Y or Y/X coordinate order of the SRS URI.srsURI-geometryDatatypeURI-dimensionInfo-
-
GeometryWrapper
public GeometryWrapper(org.locationtech.jts.geom.Geometry geometry, String srsURI, String geometryDatatypeURI, DimensionInfo dimensionInfo, String geometryLiteral) - Parameters:
geometry- In X/Y or Y/X coordinate order of the SRS URI.srsURI-geometryDatatypeURI-dimensionInfo-geometryLiteral-
-
GeometryWrapper
Default to WGS84 geometry and XY coordinate dimensions.- Parameters:
geometry- In X/Y or Y/X coordinate order of WGS84.geometryDatatypeURI-
-
GeometryWrapper
public GeometryWrapper(org.locationtech.jts.geom.Geometry geometry, String srsURI, String geometryDatatypeURI) Default to XY coordinate dimensions.- Parameters:
geometry- In X/Y or Y/X coordinate order of the SRS URI.srsURI-geometryDatatypeURI-
-
GeometryWrapper
Empty geometry with specified parameters.- Parameters:
srsURI-geometryDatatypeURI-
-
GeometryWrapper
public GeometryWrapper(CustomCoordinateSequence pointCoordinateSequence, String geometryDatatypeURI, String srsURI) Point geometry with specified SRS.- Parameters:
pointCoordinateSequence-geometryDatatypeURI-srsURI-
-
GeometryWrapper
Copy GeometryWrapper.- Parameters:
geometryWrapper-
-
-
Method Details
-
checkTransformSRS
public GeometryWrapper checkTransformSRS(GeometryWrapper targetGeometryWrapper) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException Transforms, if necessary, the provided target GeometryWrapper according to this GeometryWrapper SRS_URI.- Parameters:
targetGeometryWrapper-- Returns:
- GeometryWrapper after transformation.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.geometry.MismatchedDimensionExceptionorg.opengis.referencing.operation.TransformException
-
transform
public GeometryWrapper transform(String srsURI) throws org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, org.opengis.util.FactoryException Transform the GeometryWrapper into another spatial reference system.- Parameters:
srsURI-- Returns:
- New GeometryWrapper after transformation, or this GeometryWrapper if no transformation.
- Throws:
org.opengis.geometry.MismatchedDimensionExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.util.FactoryException
-
transform
public GeometryWrapper transform(SRSInfo srsInfo) throws org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, org.opengis.util.FactoryException Transform the GeometryWrapper into another spatial reference system.- Parameters:
srsInfo-- Returns:
- New GeometryWrapper after transformation, or this GeometryWrapper if no transformation.
- Throws:
org.opengis.geometry.MismatchedDimensionExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.util.FactoryException
-
convertSRS
public GeometryWrapper convertSRS(String srsURI) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException Returns this geometry wrapper converted to the SRS_URI URI.- Parameters:
srsURI-- Returns:
- GeometryWrapper after conversion.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.geometry.MismatchedDimensionExceptionorg.opengis.referencing.operation.TransformException
-
getCRS
public org.opengis.referencing.crs.CoordinateReferenceSystem getCRS()- Returns:
- Coordinate/Spatial reference system of the GeometryWrapper.
-
getXYGeometry
public org.locationtech.jts.geom.Geometry getXYGeometry()- Returns:
- Geometry with coordinates in x,y order, regardless of SRS_URI.
-
getParsingGeometry
public org.locationtech.jts.geom.Geometry getParsingGeometry()- Returns:
- Geometry with coordinates as originally provided.
-
translateXYGeometry
public org.locationtech.jts.geom.Geometry translateXYGeometry()XY geometry translated by the domain range of the SRS, if a Geographic SRS.
Returns XY geometry if not a Geographic SRS.- Returns:
- Geometry after translation in X direction.
-
getSrsURI
- Returns:
- Coordinate/Spatial reference system URI.
-
getSRID
- Returns:
- getSRID used in GeoSPARQL Standard page 22 to refer to srsURI. i.e. getSrsURI and getSRID are the same.
-
getSrsInfo
- Returns:
- SRS information that the Geometry Wrapper is using.
-
isSRSRecognised
- Returns:
- Whether the SRS URI has been recognised. Operations may fail or not perform correctly when false.
-
getGeometryDatatypeURI
- Returns:
- Datatype URI of the literal.
-
getGeometryType
- Returns:
- The name of the parsing Geometry's actual class.
-
getGeometryDatatype
- Returns:
- GeometryDatatype of the literal.
-
buffer
public GeometryWrapper buffer(double distance, String targetDistanceUnitsURI) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Transformations between SRS and Units will increase the inaccuracy of the results.- Parameters:
distance-targetDistanceUnitsURI-- Returns:
- Buffer around GeometryWrapper according the provided distance.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.geometry.MismatchedDimensionExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionException
-
getUTMZoneURI
public String getUTMZoneURI() throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException- Returns:
- URI of the GeometryWrapper's UTM zone
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.geometry.MismatchedDimensionExceptionorg.opengis.referencing.operation.TransformException
-
getLatitude
public Double getLatitude() throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformExceptionLatitude if Geographic SRS or in WGS84.
Used to convert between linear and non-linear units of measure.- Returns:
- Latitude of Geometry.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
distanceEuclidean
public double distanceEuclidean(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Euclidean) defaulting to metres.- Parameters:
targetGeometry-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
distanceEuclidean
public double distanceEuclidean(GeometryWrapper targetGeometry, UnitsOfMeasure unitsOfMeasure) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Euclidean) in the Units of Measure.- Parameters:
targetGeometry-unitsOfMeasure-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
distanceEuclidean
public double distanceEuclidean(GeometryWrapper targetGeometry, String targetDistanceUnitsURI) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Euclidean) in the Units of Measure stated in URI.- Parameters:
targetGeometry-targetDistanceUnitsURI-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
distanceGreatCircle
public double distanceGreatCircle(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Great Circle) defaulting to metres.- Parameters:
targetGeometry-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
distanceGreatCircle
public double distanceGreatCircle(GeometryWrapper targetGeometry, UnitsOfMeasure unitsOfMeasure) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Great Circle) in the Units of Measure.- Parameters:
targetGeometry-unitsOfMeasure-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
distanceGreatCircle
public double distanceGreatCircle(GeometryWrapper targetGeometry, String targetDistanceUnitsURI) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Great Circle) in the Units of Measure stated in URI.- Parameters:
targetGeometry-targetDistanceUnitsURI-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
distance
public double distance(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Euclidean or Great Circle depending on Geometry SRS URI) defaulting to metres.- Parameters:
targetGeometry-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
distance
public double distance(GeometryWrapper targetGeometry, UnitsOfMeasure unitsOfMeasure) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Euclidean or Great Circle depending on Geometry SRS URI) in the Units of Measure.- Parameters:
targetGeometry-unitsOfMeasure-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
distance
public double distance(GeometryWrapper targetGeometry, String targetDistanceUnitsURI) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException, UnitsConversionException Distance (Euclidean or Great Circle depending on Geometry SRS URI) in the Units of Measure stated in URI.- Parameters:
targetGeometry-targetDistanceUnitsURI-- Returns:
- Distance
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionUnitsConversionExceptionorg.opengis.geometry.MismatchedDimensionException
-
boundary
- Returns:
- Boundary of GeometryWrapper
-
convexHull
- Returns:
- Convex Hull of GeometryWrapper
-
difference
public GeometryWrapper difference(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- Difference of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
envelope
Envelope of GeometryWrapper with original coordinate order.- Returns:
- Envelope of GeometryWrapper
-
getEnvelope
public org.locationtech.jts.geom.Envelope getEnvelope()Envelope of GeometryWrapper in XY order.- Returns:
- Envelope of GeometryWrapper
-
intersection
public GeometryWrapper intersection(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- Intersection of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
relate
public org.locationtech.jts.geom.IntersectionMatrix relate(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- Intersection Matrix of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
relate
public boolean relate(GeometryWrapper targetGeometry, String intersectionPattern) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-intersectionPattern-- Returns:
- Relation of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
symDifference
public GeometryWrapper symDifference(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- Symmetric Difference of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
union
public GeometryWrapper union(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- Union of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
contains
public boolean contains(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- sfContains of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
crosses
public boolean crosses(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- sfCrosses of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
disjoint
public boolean disjoint(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- sfDisjoint of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
equalsTopo
public boolean equalsTopo(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- Topology equals of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
equalsExact
public boolean equalsExact(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- Equals exactly of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
equalsExact
public boolean equalsExact(GeometryWrapper targetGeometry, double tolerance) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-tolerance-- Returns:
- Equals exactly of GeometryWrapper with target using provided tolerance.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
intersects
public boolean intersects(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- sfIntersects of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
overlaps
public boolean overlaps(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- sfOverlaps of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
touches
public boolean touches(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- sfTouches of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
within
public boolean within(GeometryWrapper targetGeometry) throws org.opengis.util.FactoryException, org.opengis.geometry.MismatchedDimensionException, org.opengis.referencing.operation.TransformException - Parameters:
targetGeometry-- Returns:
- sfWithin of GeometryWrapper with target.
- Throws:
org.opengis.util.FactoryExceptionorg.opengis.referencing.operation.TransformExceptionorg.opengis.geometry.MismatchedDimensionException
-
asNodeValue
public org.apache.jena.sparql.expr.NodeValue asNodeValue() throws org.apache.jena.datatypes.DatatypeFormatException- Returns:
- GeometryWrapper as NodeValue
- Throws:
org.apache.jena.datatypes.DatatypeFormatException
-
asNode
public org.apache.jena.graph.Node asNode() throws org.apache.jena.datatypes.DatatypeFormatException- Returns:
- GeometryWrapper as Node
- Throws:
org.apache.jena.datatypes.DatatypeFormatException
-
asLiteral
public org.apache.jena.rdf.model.Literal asLiteral() throws org.apache.jena.datatypes.DatatypeFormatException- Returns:
- GeometryWrapper as Literal
- Throws:
org.apache.jena.datatypes.DatatypeFormatException
-
asLiteral
public org.apache.jena.rdf.model.Literal asLiteral(String outputGeometryDatatypeURI) throws org.apache.jena.datatypes.DatatypeFormatException - Parameters:
outputGeometryDatatypeURI-- Returns:
- GeometryWrapper as Literal in datatype form.
- Throws:
org.apache.jena.datatypes.DatatypeFormatException
-
asLiteral
- Parameters:
datatype-- Returns:
- GeometryWrapper as Literal
-
getCoordinateDimension
public int getCoordinateDimension()- Returns:
- Coordinate dimension, i.e. 2 (x,y), 3 (x,y,z or x,y,m) or 4 (x,y,z,m)
-
getSpatialDimension
public int getSpatialDimension()- Returns:
- Spatial dimension, i.e. 2 or 3
-
getTopologicalDimension
public int getTopologicalDimension()- Returns:
- Topological dimension, i.e. 0, 1 or 2
-
getCoordinateSequenceDimensions
- Returns:
- Enum of coordinate dimensions.
-
getUnitsOfMeasure
- Returns:
- Units of Measure for the GeometryWrapper SRS.
-
getDimensionInfo
- Returns:
- GeometryWrapper's coordinate, spatial and topological dimensions.
-
getLexicalForm
- Returns:
- String literal of Geometry Wrapper.
-
isEmpty
public boolean isEmpty()- Returns:
- Geometry is empty of coordinates.
-
isSimple
public boolean isSimple()- Returns:
- Geometry is in simple form.
-
isValid
public boolean isValid()- Returns:
- Geometry is topologically valid.
-
extract
public static final GeometryWrapper extract(org.apache.jena.sparql.expr.NodeValue geometryLiteral, GeometryLiteralIndex.GeometryIndex targetIndex) Extract Geometry Wrapper from Geometry Literal.- Parameters:
geometryLiteral-targetIndex-- Returns:
- Geometry Wrapper of the Geometry Literal.
-
extract
public static final GeometryWrapper extract(org.apache.jena.graph.Node geometryLiteral, GeometryLiteralIndex.GeometryIndex targetIndex) throws org.apache.jena.datatypes.DatatypeFormatException Extract Geometry Wrapper from Geometry Literal.- Parameters:
geometryLiteral-targetIndex-- Returns:
- Geometry Wrapper of the Geometry Literal.
- Throws:
org.apache.jena.datatypes.DatatypeFormatException
-
extract
Extract Geometry Wrapper from Geometry Literal.- Parameters:
geometryLiteral-- Returns:
- Geometry Wrapper of the Geometry Literal.
-
extract
Extract Geometry Wrapper from Geometry Literal.- Parameters:
geometryLiteral-- Returns:
- Geometry Wrapper of the Geometry Literal.
-
extract
public static final GeometryWrapper extract(org.apache.jena.rdf.model.Literal geometryLiteral, GeometryLiteralIndex.GeometryIndex targetIndex) Extract Geometry Wrapper from Geometry Literal. Returns null if invalid literal provided.- Parameters:
geometryLiteral-targetIndex-- Returns:
- Geometry Wrapper of the Geometry Literal.
-
extract
Extract Geometry Wrapper from Geometry Literal.- Parameters:
geometryLiteral-- Returns:
- Geometry Wrapper of the Geometry Literal.
-
extract
Extract Geometry Wrapper from Geometry Literal.- Parameters:
lexicalForm-datatypeURI-- Returns:
- Geometry Wrapper of the Geometry Literal.
-
extract
public static GeometryWrapper extract(String lexicalForm, String datatypeURI, GeometryLiteralIndex.GeometryIndex targetIndex) throws org.apache.jena.datatypes.DatatypeFormatException Extract Geometry Wrapper from Geometry Literal.- Parameters:
lexicalForm-datatypeURI-targetIndex-- Returns:
- Geometry Wrapper of the Geometry Literal.
- Throws:
org.apache.jena.datatypes.DatatypeFormatException
-
fromPoint
Builds a WKT Point of Geometry Wrapper.
This method does not use the GeometryLiteralIndex and so is best used for one of Geometry Wrappers.- Parameters:
x-y-srsURI-- Returns:
- Geometry Wrapper of WKT Point.
-
getEmptyWKT
- Returns:
- Empty GeometryWrapper in WKT datatype.
-
getEmptyGML
- Returns:
- Empty GeometryWrapper in GML datatype.
-
hashCode
public int hashCode() -
equals
-
toString
-