Uses of Interface
com.google.common.geometry.S2Shape
-
Uses of S2Shape in com.google.common.geometry
Subinterfaces of S2Shape in com.google.common.geometryModifier and TypeInterfaceDescriptioninterfaceA region defined by a collection of zero or more closed loops.interfaceS2LaxPolylineShape represents a polyline.static interfaceChains are closed, that is, there is an implicit edge between the ends of each chain.static interfaceChains are open, that is, there is no implicit edge between the ends of each chain.static interfaceA full S2Shape that mixes together each aspect.Classes in com.google.common.geometry that implement S2ShapeModifier and TypeClassDescriptionfinal classAn abstract directed edge from one S2Point to another S2Point.static classA multi polygon with points referenced from an array.static classA multi polygon with vertices referenced from aList<S2Point>, and cumulative edges referenced from anPrimitiveArrays.Longs.static classA multi polygon with vertex coordinates stored in a double[].static classA multi polygon with vertices at cell ID centers stored in a long[].static classA simple polygon with points referenced from an array.static classstatic classA simple polygon with vertex coordinates stored in a double[].static classA simple polygon with vertices at cell ID centers stored in a long[].static classA multi polyline storing references to previously allocated S2Point instances.static classA multi polyline storing xyz coordinates in a single packed 'double' array.static classA multi polyline storing cell IDs in a single 'long' array.static classA polyline storing references to previously allocated S2Point instances.static classstatic classA polyline storing xyz coordinates in a single packed 'double' array.static classA polyline storing cell IDs in a single 'long' array.final classAn S2Loop represents a simple spherical polygon.static classAn S2Shape representing a list of S2Points.classWrapper class for indexing a polygon viaS2ShapeIndex.final classAn S2Polyline represents a sequence of zero or more vertices connected by straight edges (geodesics).static classA sequence of chains, represented as an array of the first 'edgeId' for each chain.(package private) static classAn array of S2Point references for multiple chains.(package private) static classPacked coordinates for multiple chains.(package private) static classSnapped cell centers for multiple chains.static classA single non-empty chain.(package private) static classA simple chain of S2Point references.(package private) static classA simple chain of packed coordinates.(package private) static classA simple chain of packed cell centers.(package private) static classS2EdgeVectorShape is an S2Shape representing a set of unrelated edges.Fields in com.google.common.geometry declared as S2ShapeModifier and TypeFieldDescriptionprivate final S2Shape[]S2ShapeIndexCoder.EncodedS2ShapeIndex.cachedShapesThe array of not-yet-decoded and decoded shapes.private final S2ShapeS2EdgeQuery.CrossingFilter.shapeprivate final S2ShapeS2ShapeIndex.S2ClippedShape.shapeIf positive, this is the shape ID and the shape does not contain the center of the cell.private static final S2ShapeS2ShapeIndexCoder.EncodedS2ShapeIndex.UNDECODED_SHAPEInternal representation of an undecoded shape, which must be distinguished from a null shape.Fields in com.google.common.geometry with type parameters of type S2ShapeModifier and TypeFieldDescriptionprivate final IdentityHashMap<Class<? extends S2Shape>, Integer> S2TaggedShapeCoder.Builder.classToTypeTagprivate final IdentityHashMap<Class<? extends S2Shape>, Integer> S2TaggedShapeCoder.classToTypeTagstatic final VectorCoder<S2Shape> VectorCoder.COMPACT_SHAPEAn encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.COMPACTencoding.static final VectorCoder<S2Shape> VectorCoder.FAST_SHAPEAn encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.FASTencoding.S2ShapeIndex.pendingRemovalsThe shapes that have been queued for removal but not processed yet (not yet used.)private static final com.google.common.base.Predicate<S2Shape> S2Polygon.REVERSE_HOLESReturns true for S2Loops for whichS2Loop.isHole()is true.private static final com.google.common.base.Predicate<S2Shape> S2Polygon.REVERSE_NONEReturns false for all shapes.private final com.google.common.base.Predicate<S2Shape> S2Polygon.EdgeClipper.reverseEdgesS2ShapeIndex.shapesShapes currently in the index.S2ShapeIndexCoder.shapesS2TaggedShapeCoder.Builder.typeTagToCoderS2TaggedShapeCoder.typeTagToCoderMethods in com.google.common.geometry with type parameters of type S2ShapeModifier and TypeMethodDescription(package private) <T extends S2Shape>
S2TaggedShapeCoder.BuilderAssociatesclazzwith a uniquecoderandtypeTag.(package private) <T extends S2Shape>
S2TaggedShapeCoder.BuilderSame asS2TaggedShapeCoder.Builder.add(Class, S2Coder, int), but associates all elements ofclazzeswith a uniquecoderandtypeTag.private <T extends S2Shape>
voidS2TaggedShapeCoder.Builder.validateClass(Class<? extends T> clazz) Methods in com.google.common.geometry that return S2ShapeModifier and TypeMethodDescriptionS2TaggedShapeCoder.decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor) final S2ShapeS2ShapeIndex.S2ClippedShape.shape()Returns the original shape this clipped shape was clipped from.Methods in com.google.common.geometry that return types with arguments of type S2ShapeModifier and TypeMethodDescriptionS2EdgeQuery.getCandidates(S2Point a, S2Point b) Given a query edge AB, returns a map from the indexed shapes to a superset of the edges for each shape that intersect AB.S2ContainsPointQuery.getContainingShapes(S2Point p) A convenience function that returns all the shapes that containp.S2EdgeQuery.getCrossings(S2Point a, S2Point b) Returns edges for each shape that either crosses AB or shares a vertex with AB.S2ShapeIndex.getShapes()Returns an immutable list view of shapes in the index.S2ShapeUtil.shapeToShapeId(S2ShapeIndex index) Returns a multimap ofS2Shapefromindexto the shape's ID (i.e., its position withinindex.shapes).Methods in com.google.common.geometry with parameters of type S2ShapeModifier and TypeMethodDescriptionvoidAdds the given shape to this index.voidprivate voidS2Polygon.EdgeClipper.addIntersection(S2Point a0, S2Point a1, S2Point b0, S2Point b1, S2Shape bShape, int crossing, List<ParametrizedS2Point> intersections) Given two edges A and B such that robustCrossing(A, B) >= 0, determines if they intersect and adds any intersection point tointersections.voidAdds a shape whose interior should be tracked.static doubleFor shapes of dimension 2, returns the area of the shape on the unit sphere.static S2PointReturns the centroid of shape multiplied by the measure of shape.static booleanS2ShapeUtil.containsBruteForce(S2Shape shape, S2Point point) Returns true if the given shape contains the given point.(package private) static S2ShapeIndex.S2ClippedShape.Contained(package private) static S2ShapeIndex.S2ClippedShapeS2ShapeIndex.S2ClippedShape.create(S2CellId cellId, S2Shape shape, boolean containsCenter, int[] edges) (package private) static S2ShapeIndex.S2ClippedShapeS2ShapeIndex.S2ClippedShape.create(S2CellId cellId, S2Shape shape, boolean containsCenter, int offset, int count) (package private) static S2ShapeIndex.S2ClippedShapeS2ShapeIndex.S2ClippedShape.create(S2CellId cellId, S2Shape shape, boolean containsCenter, List<S2ShapeIndex.ClippedEdge> edges, int start, int end) (package private) static S2ShapeIndex.S2ClippedShape.EdgeRangeS2ShapeIndex.S2ClippedShape.EdgeRange.create(S2CellId cellId, S2Shape shape, boolean containsCenter, int offset, int count) (package private) static S2ShapeIndex.S2ClippedShape.ManyEdgesS2ShapeIndex.S2ClippedShape.ManyEdges.create(S2CellId cellId, S2Shape shape, boolean containsCenter, int[] edges) (package private) static S2ShapeIndex.S2ClippedShape.ManyEdgesS2ShapeIndex.S2ClippedShape.ManyEdges.create(S2CellId cellId, S2Shape shape, boolean containsCenter, List<S2ShapeIndex.ClippedEdge> edges, int start, int end) (package private) static final S2ShapeIndex.S2ClippedShape.OneEdgeS2ShapeIndex.S2ClippedShape.OneEdge.create(S2CellId cellId, S2Shape shape, boolean containsCenter, S2ShapeIndex.ClippedEdge clippedEdge) voidS2TaggedShapeCoder.encode(S2Shape value, OutputStream output) static booleanReturns true if all methods of the two S2Shapes return identical results, except for id() and typeTag().(package private) S2ShapeIndex.S2ClippedShapeS2ShapeIndex.Cell.findClipped(S2Shape shape) Returns the clipped shape corresponding to the given shape ID, or null if the shape does not intersect this cell.private static voidS2ShapeMeasures.forEachChainEdge(S2Shape shape, int chainId, S2ShapeMeasures.BiConsumer<S2Point, S2Point> edgeConsumer) Passes each edge (a, b) in the chain of shape at index chainId to edgeConsumer.S2EdgeQuery.getCandidates(S2Point a, S2Point b, S2Shape shape) Given a query edge AB and a shapeshape, returns a superset of the edges ofshapethat intersect AB.S2EdgeQuery.getCrossings(S2Point a, S2Point b, S2Shape shape) Returns edges from a given shape that either cross AB or share a vertex with AB.static S2Shape.ReferencePointS2ShapeUtil.getReferencePoint(S2Shape shape) This is a helper function for implementing S2Shape.getReferencePoint().private static BooleanS2ShapeUtil.getReferencePointAtVertex(S2Shape shape, S2Point vtest) Returns null if 'vtest' is balanced (see definition above), otherwise 'vtest' is unbalanced and the return value indicates whether it is contained by 'shape'.(package private) static intReturns the index ofshapeinshapesasList.indexOf(Object), but using identity instead of equality to honor the semantics of S2ShapeIndex (where adding two S2Loops that are equal but not the same instance is treated as adding two separate shapes, with distinct shape IDs.)static S1AngleReturns the sum of all polyline lengths on the unit sphere for shapes of dimension 1, orS1Angle.ZEROotherwise.(package private) static doubleReturns the area of the loop interior, i.e.(package private) static S2PointS2ShapeMeasures.loopCentroid(S2Shape shape, int chainId) Returns the true centroid of the loop multiplied by the area of the loop.(package private) static S1AngleS2ShapeMeasures.loopPerimeter(S2Shape shape, int chainId) Returns the perimeter of the loop, orS1Angle.ZEROif the loop has 0 or 1 vertices.static S1AngleReturns the sum of all loop perimeters on the unit sphere for shapes of dimension 2, orS1Angle.ZEROotherwise.(package private) static S2PointS2ShapeMeasures.polylineCentroid(S2Shape shape, int chainId) Returns the true centroid of the polyline multiplied by the length of the polyline.(package private) static S1AngleS2ShapeMeasures.polylineLength(S2Shape shape, int chainId) Returns the length of the polyline, orS1Angle.ZEROif the polyline has fewer than two vertices.voidCurrently not implemented.voidbooleanS2ContainsPointQuery.shapeContains(S2Shape shape, S2Point p) Returns true if the given shape containspunder the specifiedS2ContainsPointQuery.S2VertexModel.private static doubleS2ShapeMeasures.signedLoopArea(S2Shape shape, int chainId) Returns the area of the loop interior, i.e.booleanReturns true if the next edge should be received, or false to terminate early.(package private) static doubleS2ShapeMeasures.turningAngle(S2Shape shape, int chainId) Method parameters in com.google.common.geometry with type arguments of type S2ShapeModifier and TypeMethodDescriptionprivate static S2ShapeIndex.S2ClippedShape[]S2ShapeIndexCoder.decodeClippedShapes(List<S2Shape> shapes, PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor) private static voidS2ShapeIndexCoder.encodeCell(S2ShapeIndex.Cell cell, com.google.common.collect.Multimap<S2Shape, Integer> shapeIds, OutputStream output) static booleanReturns true if the lists 'a' and 'b' have identical shapes according toS2ShapeUtil.equals(S2Shape, S2Shape).(package private) static intReturns the index ofshapeinshapesasList.indexOf(Object), but using identity instead of equality to honor the semantics of S2ShapeIndex (where adding two S2Loops that are equal but not the same instance is treated as adding two separate shapes, with distinct shape IDs.)Constructors in com.google.common.geometry with parameters of type S2ShapeModifierConstructorDescriptionprivate(package private)CrossingFilter(S2Shape shape, S2EdgeQuery.Edges edges, S2Point a0, S2Point a1) privateprivateprivateManyEdges(S2Shape shape, List<S2ShapeIndex.ClippedEdge> edges, int start, int end) privateOneEdge(S2Shape shape, S2ShapeIndex.ClippedEdge clippedEdge) privateS2ClippedShape(S2Shape shape) Constructor parameters in com.google.common.geometry with type arguments of type S2ShapeModifierConstructorDescriptionprivateBuilder(IdentityHashMap<Class<? extends S2Shape>, Integer> classToTypeTag, Map<Integer, S2Coder<? extends S2Shape>> typeTagToCoder) privateBuilder(IdentityHashMap<Class<? extends S2Shape>, Integer> classToTypeTag, Map<Integer, S2Coder<? extends S2Shape>> typeTagToCoder) EdgeClipper(S2ShapeIndex index, boolean addSharedEdges, com.google.common.base.Predicate<S2Shape> reverseEdges) Initialize an EdgeClipper for the given S2ShapeIndex.(package private)EncodedS2ShapeIndex(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor, List<S2Shape> shapeFactory) S2ShapeIndexCoder(List<S2Shape> shapes) Constructs aS2ShapeIndexCoder.privateS2TaggedShapeCoder(IdentityHashMap<Class<? extends S2Shape>, Integer> classToTypeTag, Map<Integer, S2Coder<? extends S2Shape>> typeTagToCoder) privateS2TaggedShapeCoder(IdentityHashMap<Class<? extends S2Shape>, Integer> classToTypeTag, Map<Integer, S2Coder<? extends S2Shape>> typeTagToCoder)