Expand description
Common geometry tools
Structs§
- Clip
Line Result - After clipping a line, return the altered line, the offset the new line starts at, and if the line is ccw
- Clip
Line Result WithB Box - Ensuring
vec_bboxexists - Inter
Point Lookup - Intersection Lookup for chunks
- Intersection
- An intersection of two segments
- Intersection
OfSegments - An intersection of two segments u and t are where the intersection occurs
- Intersection
OfSegments Robust - An intersection of two segments including displacement vectors u and t are where the intersection occurs
- Intersection
Point - Intersection Point
- Next
Ring Chunk - The next poly chunk
- Poly
Path - Reconstructing a poly line that interacts with intersections
- Ring
Chunk - A path/piece/chunk from a polygon
- Ring
Intersection - Local Intersection to a [poly_index][ring_index]
- Segment
- A segment in a polygon
Enums§
- Distance
Method - The method to use to calculate the distance
- Inside
Result - The result of a point being inside, outside, or on the boundary
Traits§
- Along
- Given a linestring in degrees and a distance, create a Point along the line
- Area
- Get the area of the polygon. Lines return 0 if not closed. Other geometries return 0.
- Average
OfPoints - Get the average of a collection of
VectorPoint. - Center
OfPoints - Get the center of a bounding box from a collection of
VectorPoint - ClampWG
S84Point - Trait to ensure a WGS84 point is valid
- Inside
- Check if a point is inside a geometry.
- Length
OfLines - Get the total euclidean distance of a line or lines
- Nearest
Point - Get the nearest of a collection of
VectorPoint. - Simplify
Vector Geometry - Functions to simplify a vector geometry
- ToLines
- Given a Geometry, attempt to Return a VectorMultiLineString.
- ToPoints
- Convert any geometry shape to a
VectorMultiPoint
Functions§
- along_
line - Given a linestring in degrees and a distance, create a Point along the line
- bearing
- Get the bearing in degrees between two points
- build_
paths_ and_ chunks - Build the PolyPaths and PolyChunks
- build_
polygon_ segments - Build all segments
- build_
polygon_ segments_ ref - Build all segments
- build_
sq_ dists - build sqdistances for line vector data
- clamp_
wgs84_ point - Updates the WGS84 point’s x and y values as needed to be valid WGS84
- clean_
linestring - Removes superfluous/collinear points from a linestring
- clean_
linestrings - Removes superfluous/collinear points from a collection of linestrings
- clean_
polygon - Ensures the polygon ring order is correct, removes duplicate points, and runs a dekink to be thorough.
- clean_
polygons - Ensures the collection of polygon ring order is correct, removes duplicate points, and runs a dekink to be thorough.
- clip_
features - Internal clip function for a collection of VectorFeatures
- clip_
line - clip an input line to a bounding box Data should always be in a 0->1 coordinate system to use this clip function
- clip_
line_ string - Clip a LineString to an axis and range
- clip_
multi_ line_ string - Clip a MultiLineString geometry to an axis and range
- clip_
multi_ point - Clip a MultiPoint to an axis and range
- clip_
multi_ polygon - Clip a MultiPolygon geometry to an axis and range
- clip_
point - Clip a point to an axis and range
- clip_
polygon - Clip a Polygon geometry to an axis and range
- convert
- Given an input data, convert it to a vector of VectorFeature
- dekink_
polygon - Given a polygon, if the polygon is kinked, dekink it
- dekink_
polygons - Given a collection of polygons, if any of the polygons are kinked, dekink them
- destination
- Get the destination given a start point, bearing, and distance
- euclidean_
distance - Find the euclidean distance between two points
- find_
polygon_ intersection - Find the intersection of two segments if it exists
- haversine_
distance - Assuming two points are on the surface of the earth as Lon-Lat coordinates, find the distance between them using the haversine formula. Returns the distance in degrees.
- intersection_
of_ segments - Find the intersection of two segments
- intersection_
of_ segments_ robust - Find the intersection of two segments. A more robust approach that uses predicates to ensure no false positives/negatives
- merge_
intersection_ pairs - Given an of intersection, find the best way to connect the from->to chunks
- point_
in_ polygon - A Robust point in polygon test
- point_
in_ polyline - A Robust point in polygon test
- point_
on_ line - Check to see if a point is on a line. Uses predicates to ensure the point is truly on the line
- point_
to_ line_ distance - Check to see how far away the point is from the line. Supports both Euclidean and Haversine methods
- polygons_
intersections - Find all intersections within a collection of polygons
- polygons_
intersections_ lookup - Run through the vector_polygons and Builds the ring intersection lookup
- polygons_
intersections_ ref - Find all intersections within a collection of polygons where each polygon is their own ref.
- polygons_
union - Given a collection of polygons, if any of the polygons interact/overlap eachother, merge them.
- polyline_
in_ polyline - Check if a polyline/hole is inside another polyline/outer ring
- rewind
- In place adjust the ring if necessary
- ring_
area - Calculate the approximate area of the polygon were it projected onto the planet. Note that this area will be positive if ring is oriented counter-clockwise, otherwise it will be negative.
- simplify
- Simplify a vector geometry
Type Aliases§
- Intersection
Point Ref - A reference to a IntersectionPoint wrapped in an RC & RefCell
- Poly
Path Ref - A reference to a PolyPath wrapped in an RC & RefCell
- Ring
Chunk Ref - A reference to a RingChunk wrapped in an RC & RefCell
- Ring
Intersection Lookup - [poly_index][ring_index] -> Intersections