boolean library

Classes

BBox
Please make sure, you arrange your parameters like this: Longitude 1, Latitude 1, Altitude 1 (optional), Longitude 2, Latitude 2, Altitude 2 (optional) You can either specify 4 or 6 parameters If you are using the default constructor with two dimensional positions (lng + lat only), please use the constructor like this: BBox(lng1, lat1, lng2, lat2);
CoordinateType
Coordinate types, following https://tools.ietf.org/html/rfc7946#section-4
Feature<T extends GeometryObject>
Feature, as specified here https://tools.ietf.org/html/rfc7946#section-3.2
FeatureCollection<T extends GeometryObject>
FeatureCollection, as specified here https://tools.ietf.org/html/rfc7946#section-3.3
GeoJSONObject
GeometryCollection
GeometryCollection, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.8
GeometryObject
GeometryType<T>
LineString
LineString, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.4
MultiLineString
MultiLineString, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.5
MultiPoint
MultiPoint, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.3
MultiPolygon
MultiPolygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.7
Point
Point, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.2
Polygon
Polygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.6
Position
Please make sure, you arrange your parameters like this:

Enums

BoundaryType
Returns true if a point is on a line. Accepts an optional parameter to ignore the start and end vertices of the LineString. The ignoreEndVertices=false controls whether to ignore the start and end vertices. epsilon is the Fractional number to compare with the cross product result. It's useful for dealing with floating points in lng/lat example:
GeoJSONObjectType

Functions

booleanClockwise(LineString line) bool
Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise. Takes a Feature<LineString> orLineString or a List<Position> to be evaluated. example:
booleanConcave(Polygon polygon) bool
Takes a Polygon and returns true or false as to whether it is concave or not. example:
booleanContains(GeoJSONObject feature1, GeoJSONObject feature2) bool
booleanContains returns true if the second geometry is completely contained by the first geometry. The interiors of both geometries must intersect and, the interior and boundary of the secondary must not intersect the exterior of the primary. booleanContains returns the exact opposite result of the booleanWithin. example:
booleanCrosses(GeoJSONObject feature1, GeoJSONObject feature2) bool
booleanCrosses returns true if the intersection results in a geometry whose dimension is one less than the maximum dimension of the two source geometries and the intersection set is interior to both source geometries. booleanCrosses returns true for only MultiPoint/Polygon, MultiPoint/LineString, LineString/LineString, LineString/Polygon, and LineString/MultiPolygon comparisons. Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results. example:
booleanDisjoint(GeoJSONObject feature1, GeoJSONObject feature2) bool
Returns true if the intersection of the two geometries is an empty set. example:
booleanEqual(GeoJSONObject feature1, GeoJSONObject feature2, {int precision = 6, bool direction = false, bool shiftedPolygon = false}) bool
Determine whether two geometries of the same type have identical X,Y coordinate values. See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm precision=6 sets decimal precision to use when comparing coordinates. With direction set to true, even if the LineStrings are reverse versions of each other but they have similar Positions, they will be considered the same. If shiftedPolygon is true, two Polygons with shifted Positions are considered the same. Returns true if the objects are equal, false otherwise example:
booleanIntersects(GeoJSONObject feature1, GeoJSONObject feature2) bool
Returns true when two geometries intersect. Takes feature1 & feature2 parameters of type GeoJSONObject which can be a Feature or GeometryType. example
booleanOverlap(Feature<GeometryObject> firstFeature, Feature<GeometryObject> secondFeature) bool
Takes two geometries firstFeature and secondFeature and checks if they share an common area but are not completely contained by each other.
booleanParallel(LineString line1, LineString line2) bool
Returns true if each segment of line1 is parallel to the correspondent segment of line2 example:
booleanPointInPolygon(Position point, GeoJSONObject polygon, {bool ignoreBoundary = false}) bool
Takes a Point, and a Polygon or MultiPolygonand determines if the Point resides within the Polygon. The Polygon can be convex or concave. The function accounts for holes. By taking a Feature<Polygon> or a Feature<MultiPolygon>. ignoreBoundary=false should be set to true if Polygon's boundary should be ignored when determining if the Point is inside the Polygon, otherwise, false. example:
booleanPointOnLine(Point pt, LineString line, {bool ignoreEndVertices = false, num? epsilon}) bool
booleanTouches(GeoJSONObject feature1, GeoJSONObject feature2) bool
Boolean-touches true if none of the Points common to both geometries intersect the interiors of both geometries. example
booleanValid(GeoJSONObject feature) bool
booleanValid checks if the geometry is a valid according to the OGC Simple Feature Specification. Take a Feature or a GeometryType example
booleanWithin(GeoJSONObject feature1, GeoJSONObject feature2) bool
Returns true if the first GeoJSONObject is completely within the second GeoJSONObject. The interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a) must not intersect the exterior of the secondary (geometry b). booleanWithin returns the exact opposite result of booleanContains.
isPointOnLineEnd(Point point, LineString line) bool
isPointOnLineSegmentCleanCoordsVariant(Position start, Position end, Position point) bool
Returns if point is on the segment between start and end. Borrowed from booleanPointOnLine to speed up the evaluation (instead of using the module as dependency). start is the coord pair of start of line, end is the coord pair of end of line, and point is the coord pair of point to check.
isPointOnLineSegmentCrossesVariant(Position start, Position end, Position pt, bool incEnd) bool
Only takes into account outer rings See http://stackoverflow.com/a/4833823/1979085 lineSegmentStart Position of start of line lineSegmentEnd Position of end of line pt Position of point to check incEnd controls whether the Point is allowed to fall on the line ends