Module org.apache.lucene.spatial3d
Package org.apache.lucene.spatial3d.geom
Class GeoBaseCompositeAreaShape<T extends GeoAreaShape>
java.lang.Object
org.apache.lucene.spatial3d.geom.BasePlanetObject
org.apache.lucene.spatial3d.geom.GeoBaseCompositeShape<T>
org.apache.lucene.spatial3d.geom.GeoBaseCompositeMembershipShape<T>
org.apache.lucene.spatial3d.geom.GeoBaseCompositeAreaShape<T>
- Type Parameters:
T- is the type of GeoAreaShapes of the composite.
- All Implemented Interfaces:
Bounded,GeoArea,GeoAreaShape,GeoBounds,GeoMembershipShape,GeoOutsideDistance,GeoShape,Membership,PlanetObject,SerializableObject
- Direct Known Subclasses:
GeoCompositeAreaShape,GeoCompositePolygon
abstract class GeoBaseCompositeAreaShape<T extends GeoAreaShape>
extends GeoBaseCompositeMembershipShape<T>
implements GeoAreaShape
Base class to create a composite of GeoAreaShapes
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intAll edgepoints inside shapeprotected static final intNo edgepoints inside shapeprotected static final intSome edgepoints inside shapeFields inherited from class org.apache.lucene.spatial3d.geom.GeoBaseCompositeShape
shapesFields inherited from class org.apache.lucene.spatial3d.geom.BasePlanetObject
planetModel -
Constructor Summary
ConstructorsConstructorDescriptionGeoBaseCompositeAreaShape(PlanetModel planetModel) Constructor.GeoBaseCompositeAreaShape(PlanetModel planetModel, InputStream inputStream, Class<T> clazz) Constructor for deserialization. -
Method Summary
Modifier and TypeMethodDescriptionintgetRelationship(GeoShape geoShape) Find the spatial relationship between a shape and the current geo area.booleanintersects(GeoShape geoShape) Assess whether a shape intersects with any of the edges of this shape.protected intisGeoAreaShapeInsideShape(GeoShape geoshape) Determine the relationship between the GeoAreShape's edgepoints and the provided shape.protected intisShapeInsideGeoAreaShape(GeoShape geoShape) Determine the relationship between the GeoAreShape and the shape's edgepoints.Methods inherited from class org.apache.lucene.spatial3d.geom.GeoBaseCompositeMembershipShape
computeOutsideDistance, computeOutsideDistanceMethods inherited from class org.apache.lucene.spatial3d.geom.GeoBaseCompositeShape
addShape, equals, getBounds, getEdgePoints, getShape, getShapes, hashCode, intersects, isWithin, isWithin, size, writeMethods inherited from class org.apache.lucene.spatial3d.geom.BasePlanetObject
getPlanetModelMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.spatial3d.geom.GeoOutsideDistance
computeOutsideDistance, computeOutsideDistanceMethods inherited from interface org.apache.lucene.spatial3d.geom.GeoShape
getEdgePoints, intersectsMethods inherited from interface org.apache.lucene.spatial3d.geom.Membership
isWithin, isWithinMethods inherited from interface org.apache.lucene.spatial3d.geom.PlanetObject
getPlanetModelMethods inherited from interface org.apache.lucene.spatial3d.geom.SerializableObject
write
-
Field Details
-
ALL_INSIDE
protected static final int ALL_INSIDEAll edgepoints inside shape- See Also:
-
SOME_INSIDE
protected static final int SOME_INSIDESome edgepoints inside shape- See Also:
-
NONE_INSIDE
protected static final int NONE_INSIDENo edgepoints inside shape- See Also:
-
-
Constructor Details
-
GeoBaseCompositeAreaShape
Constructor. -
GeoBaseCompositeAreaShape
public GeoBaseCompositeAreaShape(PlanetModel planetModel, InputStream inputStream, Class<T> clazz) throws IOException Constructor for deserialization.- Parameters:
planetModel- is the planet model.inputStream- is the input stream.clazz- is the class of the generic.- Throws:
IOException
-
-
Method Details
-
intersects
Description copied from interface:GeoAreaShapeAssess whether a shape intersects with any of the edges of this shape. Note well that this method must return false if the shape contains or is disjoint with the given shape. It is permissible to return true if the shape is within the specified shape, if it is difficult to compute intersection with edges.- Specified by:
intersectsin interfaceGeoAreaShape- Parameters:
geoShape- is the shape to assess for intersection with this shape's edges.- Returns:
- true if there's such an intersection, false if not.
-
getRelationship
Description copied from interface:GeoAreaFind the spatial relationship between a shape and the current geo area. Note: return value is how the GeoShape relates to the GeoArea, not the other way around. For example, if this GeoArea is entirely within the shape, then CONTAINS should be returned. If the shape is entirely enclosed by this GeoArea, then WITHIN should be returned.It is permissible to return OVERLAPS instead of WITHIN if the shape intersects with the area at even a single point. So, a circle inscribed in a rectangle could return either OVERLAPS or WITHIN, depending on implementation. It is not permissible to return CONTAINS or DISJOINT in this circumstance, however.
Similarly, it is permissible to return OVERLAPS instead of CONTAINS under conditions where the shape consists of multiple independent overlapping subshapes, and the area overlaps one of the subshapes. It is not permissible to return WITHIN or DISJOINT in this circumstance, however.
- Specified by:
getRelationshipin interfaceGeoArea- Parameters:
geoShape- is the shape to consider.- Returns:
- the relationship, from the perspective of the shape.
-
isShapeInsideGeoAreaShape
Determine the relationship between the GeoAreShape and the shape's edgepoints.- Parameters:
geoShape- is the shape.- Returns:
- the relationship.
-
isGeoAreaShapeInsideShape
Determine the relationship between the GeoAreShape's edgepoints and the provided shape.- Parameters:
geoshape- is the shape.- Returns:
- the relationship.
-