Class NumberRangePrefixTree.SpanUnitsNRShape
java.lang.Object
org.apache.lucene.spatial.prefix.tree.NumberRangePrefixTree.SpanUnitsNRShape
- All Implemented Interfaces:
Cloneable
,NumberRangePrefixTree.NRShape
,org.locationtech.spatial4j.shape.Shape
- Enclosing class:
- NumberRangePrefixTree
public class NumberRangePrefixTree.SpanUnitsNRShape
extends Object
implements NumberRangePrefixTree.NRShape
A range Shape; based on a pair of
NumberRangePrefixTree.UnitNRShape
. Spatially speaking,
it's analogous to a Rectangle but 1D. It might have been named with Range in the name but it
may be confusing since even the NumberRangePrefixTree.UnitNRShape
is in some sense a
range.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Method Summary
Modifier and TypeMethodDescriptionclone()
A deep clone.boolean
double
getArea
(org.locationtech.spatial4j.context.SpatialContext spatialContext) org.locationtech.spatial4j.shape.Rectangle
org.locationtech.spatial4j.shape.Shape
getBuffered
(double v, org.locationtech.spatial4j.context.SpatialContext spatialContext) org.locationtech.spatial4j.shape.Point
org.locationtech.spatial4j.context.SpatialContext
boolean
hasArea()
int
hashCode()
boolean
isEmpty()
org.locationtech.spatial4j.shape.SpatialRelation
org.locationtech.spatial4j.shape.SpatialRelation
relate
(org.locationtech.spatial4j.shape.Shape shape) roundToLevel
(int targetLevel) Returns this shape rounded to the target level.toString()
The result should be parseable byNumberRangePrefixTree.parseShape(String)
.
-
Method Details
-
getContext
public org.locationtech.spatial4j.context.SpatialContext getContext()- Specified by:
getContext
in interfaceorg.locationtech.spatial4j.shape.Shape
-
getMinUnit
-
getMaxUnit
-
roundToLevel
Description copied from interface:NumberRangePrefixTree.NRShape
Returns this shape rounded to the target level. If we are already more course than the level then the shape is simply returned. The result may refer to internal state of the argument so you may want to clone it.- Specified by:
roundToLevel
in interfaceNumberRangePrefixTree.NRShape
-
relate
public org.locationtech.spatial4j.shape.SpatialRelation relate(org.locationtech.spatial4j.shape.Shape shape) - Specified by:
relate
in interfaceorg.locationtech.spatial4j.shape.Shape
-
relate
public org.locationtech.spatial4j.shape.SpatialRelation relate(NumberRangePrefixTree.SpanUnitsNRShape ext) -
getBoundingBox
public org.locationtech.spatial4j.shape.Rectangle getBoundingBox()- Specified by:
getBoundingBox
in interfaceorg.locationtech.spatial4j.shape.Shape
-
hasArea
public boolean hasArea()- Specified by:
hasArea
in interfaceorg.locationtech.spatial4j.shape.Shape
-
getArea
public double getArea(org.locationtech.spatial4j.context.SpatialContext spatialContext) - Specified by:
getArea
in interfaceorg.locationtech.spatial4j.shape.Shape
-
getCenter
public org.locationtech.spatial4j.shape.Point getCenter()- Specified by:
getCenter
in interfaceorg.locationtech.spatial4j.shape.Shape
-
getBuffered
public org.locationtech.spatial4j.shape.Shape getBuffered(double v, org.locationtech.spatial4j.context.SpatialContext spatialContext) - Specified by:
getBuffered
in interfaceorg.locationtech.spatial4j.shape.Shape
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceorg.locationtech.spatial4j.shape.Shape
-
clone
A deep clone. -
toString
Description copied from interface:NumberRangePrefixTree.NRShape
The result should be parseable byNumberRangePrefixTree.parseShape(String)
.- Specified by:
toString
in interfaceNumberRangePrefixTree.NRShape
- Overrides:
toString
in classObject
-
equals
-
hashCode
public int hashCode()
-