Uses of Class
com.google.common.geometry.S2ShapeIndex
-
Uses of S2ShapeIndex in com.google.common.geometry
Subclasses of S2ShapeIndex in com.google.common.geometryFields in com.google.common.geometry declared as S2ShapeIndexModifier and TypeFieldDescriptionprivate final S2ShapeIndex
S2EdgeQuery.index
(package private) S2ShapeIndex
S2Loop.index
Spatial index for this loop.(package private) S2ShapeIndex
S2Polygon.index
The spatial index for this S2Polygon.Methods in com.google.common.geometry that return S2ShapeIndexModifier and TypeMethodDescriptionS2ShapeIndexCoder.decode
(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor) S2Polygon.index()
Returns the index of this polygon.static S2ShapeIndex
As above, but does not CHECK-fail on invalid input.static S2ShapeIndex
S2TextFormat.makeIndexOrDie
(String str) Returns a S2ShapeIndex containing the points, polylines, and loops (in the form of a single polygon) described by the following format:Methods in com.google.common.geometry with parameters of type S2ShapeIndexModifier and TypeMethodDescriptionstatic double
S2ShapeIndexMeasures.area
(S2ShapeIndex shapeIndex) Returns the total area of all polygons in shapeIndex.static void
S2Polygon.breakEdgesAndAddToBuilder
(S2ShapeIndex index, S2PolygonBuilder builder) Takes a set of possibly intersecting edges, stored in the S2ShapeIndex, and breaks the edges into small pieces so that there is no intersection anymore, and adds all these edges to the builder.static S2Point
S2ShapeIndexMeasures.centroid
(S2ShapeIndex shapeIndex) Returns the centroid of all shapes whose dimension is maximal within shapeIndex, multiplied by the measure of those shapes.static int
S2ShapeIndexMeasures.dimension
(S2ShapeIndex shapeIndex) Returns the maximum dimension of any shape in shapeIndex, or -1 if shapeIndex has no shapes.void
S2ShapeIndexCoder.encode
(S2ShapeIndex value, OutputStream output) static boolean
S2ShapeUtil.equals
(S2ShapeIndex a, S2ShapeIndex b) Returns true if all methods of the two S2ShapeIndex values return identical results, including all the S2Shapes in both indexes.(package private) static boolean
S2ShapeUtil.findAnyCrossing
(S2ShapeIndex index, List<S2Loop> loops, S2Error error) Given an S2ShapeIndex containing a set of loops, return true if any loop has a self-intersection (including duplicate vertices) or crosses any other loop (including vertex crossings and duplicate edges) and set "error" to a human-readable error message.(package private) static boolean
S2ShapeUtil.findSelfIntersection
(S2ShapeIndex index, S2Loop loop, S2Error error) Given an S2ShapeIndex containing a single loop, return true if the loop has a self-intersection (including duplicate vertices) and set "error" to a human-readable error message.static S1Angle
S2ShapeIndexMeasures.length
(S2ShapeIndex shapeIndex) Returns the total length of all polylines in shapeIndex, orS1Angle.ZERO
if shapeIndex contains no polylines.static S1Angle
S2ShapeIndexMeasures.perimeter
(S2ShapeIndex shapeIndex) Returns the total perimeter of all polygons in shapeIndex (including both "shells" and "holes"), orS1Angle.ZERO
shapeIndex contains no polygons.S2ShapeUtil.shapeToShapeId
(S2ShapeIndex index) Returns a multimap ofS2Shape
fromindex
to the shape's ID (i.e., its position withinindex.shapes
).static String
S2TextFormat.toString
(S2ShapeIndex index) Convert an S2CellUnion to the S2TextFormat string representation documented above.Constructors in com.google.common.geometry with parameters of type S2ShapeIndexModifierConstructorDescriptionEdgeClipper
(S2ShapeIndex index, boolean addSharedEdges, com.google.common.base.Predicate<S2Shape> reverseEdges) Initialize an EdgeClipper for the given S2ShapeIndex.RangeIterator
(S2ShapeIndex index) S2ContainsPointQuery
(S2ShapeIndex index) Constructs a semi-open contains-point query from the given iterator.S2ContainsPointQuery
(S2ShapeIndex index, S2ContainsPointQuery.Options options) Constructs a contains-point query from the given iterator, with the specified options.S2EdgeQuery
(S2ShapeIndex index) Constructor from anS2ShapeIndex
.S2ShapeIndexRegion
(S2ShapeIndex index) Creates a new region with the given index, and asemi-open
vertex model.S2ShapeIndexRegion
(S2ShapeIndex index, S2ContainsPointQuery.S2VertexModel model) Creates a new region with the given index, and a givenS2ContainsPointQuery.S2VertexModel
.