Package com.google.common.geometry
package com.google.common.geometry
-
ClassDescriptionUtilities for encoding and decoding integers.Simple utility for reading little endian primitives from a stream.Simple utility for writing little endian primitives to a stream.An S2Point that also has a parameter associated with it, which corresponds to a time-like order on the points.A set of interfaces for describing primitive arrays.An array of
bytes.A cursor storing a position and a limit.An R1Interval represents a closed, bounded interval on the real line.An R2Rect represents a closed axis-aligned rectangle in the (x,y) plane.Valid axes.R2Vector represents a vector in the two-dimensional space.A builder ofS1Angleinstances.S1ChordAngle represents the angle subtended by a chord (i.e., the straight 3D Cartesian line segment connecting two points on the unit sphere).An S1Interval represents a closed interval on a unit circle (also known as a 1-dimensional sphere).Defines an area or a length cell metric.The area of an interior, i.e. the region on the left side of an odd number of loops and optionally a centroid.S2Cap represents a disc-shaped region defined by a center and radius.An S2Cell is an S2Region object that represents a cell.An S2CellId is a 64-bit unsigned integer that uniquely identifies a cell in the S2 cell decomposition.A collection of (cellId, label) pairs.A function that is called with each (cellId, label) pair to be visited.A set of labels that can be grown byS2CellIndex.getIntersectingLabels(S2CellUnion, Labels)and shrunk viaS2CellIndex.Labels.clear()orS2CellIndex.Labels.normalize().An S2CellUnion is a region consisting of cells of various sizes.Given a set of points stored in an S2PointIndex, S2ClosestPointQuery provides methods that find the closest point(s) to a given query point.A query result paired with the distance to the query target.S2Coder<T>An interface for encoding and decoding values.A query for whether one or more shapes in anS2ShapeIndexcontain a given S2Point.The options for building an S2ContainsPointQuery.A rule for whether shapes are considered to contain their vertices.This class determines whether a polygon contains one of its vertices given the edges incident to that vertex.S2ConvexHullQuery builds the convex hull of any collection of points, polylines, loops, and polygons.An abstract directed edge from one S2Point to another S2Point.An iterator on data edges that may cross a query edge (a,b).S2EdgeQuery is used to find edges or shapes that are crossed by an edge.An iterator over the sorted unique edge IDs of a shape that may intersect some query edge.AnEdgesthat contains all the edges of a shape with the given number of edges.This class contains various utility functions related to edges.Used to efficiently test a fixed edge AB against an edge chain.The purpose of this class is to find edges that intersect a given longitude interval.This class computes a bounding rectangle that contains all edges defined by a vertex chain v0, v1, v2, ...Returns true if wedge A contains wedge B.Returns true if wedge A intersects wedge B.Wedge processors are used to determine the local relationship between two polygons that share a common vertex.The purpose of this class is to find edges that intersect a given XYZ bounding box.An error code and text string describing the first error encountered during a validation process.A simple class that generates "Koch snowflake" fractals (see Wikipedia for an introduction).S2Iterator<T extends S2Iterator.Entry>A random access iterator that provides low-level access to entries sorted by cell ID.An interface to provide the cell ID for an element in a sorted list.This class represents a point on the unit sphere as a pair of latitude-longitude coordinates.S2LatLngRect represents a latitude-longitude rectangle.This class is a builder for S2LatLngRect instances.Base class for methods shared between the immutableS2LatLngRectand the mutableS2LatLngRect.Builder.A region defined by a collection of zero or more closed loops.An encoder/decoder ofS2LaxPolygonShapes.A multi polygon with points referenced from an array.A multi polygon with vertex coordinates stored in a double[].A multi polygon with vertices at cell ID centers stored in a long[].A simple polygon with points referenced from an array.A simple polygon with vertex coordinates stored in a double[].A simple polygon with vertices at cell ID centers stored in a long[].S2LaxPolylineShape represents a polyline.An encoder/decoder ofS2LaxPolylineShapes.A multi polyline storing references to previously allocated S2Point instances.A multi polyline storing xyz coordinates in a single packed 'double' array.A multi polyline storing cell IDs in a single 'long' array.A polyline storing references to previously allocated S2Point instances.A polyline storing xyz coordinates in a single packed 'double' array.A polyline storing cell IDs in a single 'long' array.An S2Loop represents a simple spherical polygon.S2PaddedCell represents an S2Cell whose (u,v)-range has been expanded on all sides by a given amount of "padding".An S2Point represents a point on the unit sphere as a 3D vector.A builder ofS2Pointinstances.An S2Shape representing a list of S2Points.An encoder/decoder ofS2Point.Shapes.S2PointIndex<Data>S2PointIndex maintains an index of points sorted by leaf S2CellId.S2PointIndex.Entry<Data>An S2Iterator-compatible pair of S2Point with associated client data of a given type.An S2PointRegion is a region that contains a single point.An S2Polygon is an S2Region object that represents a polygon.Indexing structure for anS2Polygon.This is a simple class for assembling polygons out of edges.Options for initializing aS2PolygonBuilder.Builder class forS2PolygonBuilder.Options.An S2Polyline represents a sequence of zero or more vertices connected by straight edges (geodesics).A collection of geometric predicates core to the robustness of the S2 library.Given two sites A and B that form the center of caps of radius 'r', this indicates which sites are irrelevant to the Voronoi diagram relative to an edge PQ.Tests of whether three points represent a left turn (+1), right turn (-1), or neither (0).This class specifies the coordinate systems and transforms used to project points from the sphere to the unit cube to anS2CellId.A transform from 3D cartesian coordinates to the 2D coordinates of a face.An S2Region represents a two-dimensional region over the unit sphere.An S2RegionCoverer is a class that allows arbitrary regions to be approximated as unions of cells (S2CellUnion).A Build to construct aS2RegionCovererwith options.An S2RegionIntersection represents an intersection of overlapping regions.An S2RegionUnion represents a union of possibly overlapping regions.S2Shape is an abstract base class that defines a shape.A simple receiver for the endpoints of an edge.A point with a known containment relationship.This class contains the set of clipped shapes within a particular index cell, sorted in increasing order of shape id.The possible relationships between a "target" cell and the cells of the S2ShapeIndex.Options that affect construction of the S2ShapeIndex.RangeIterator is a wrapper over CellIterator that is specialized for merging shape indices.S2ClippedShape represents the part of a shape that intersects an S2Cell.An encoder/decoder ofS2ShapeIndexs.Defines various angle and area measures forS2ShapeIndexobjects.This class wraps an S2ShapeIndex object with the additional methods needed to implement the S2Region API, in order to allow S2RegionCoverer to compute S2CellId coverings of arbitrary collections of geometry.Utilities for working with S2Shape.A collector of both combined area and centroid values.A collector of the steradian area.A collector of the center of mass.A filter of indexes.A consumer of triangles.An encoder/decoder of taggedS2Shapes.A builder for creatingS2TaggedShapeCoderinstances.S2TextFormat contains a collection of functions for converting geometry to and from a human- readable format.VectorCoder<T>