line_to_polygon 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:

Functions

lineStringToPolygon(GeoJSONObject line, bool autoComplete, bool orderCoords, {Map<String, dynamic>? properties}) Feature<Polygon>
Converts LineString to Polygon Takes a optional boolean autoComplete that auto completes LineStrings Takes an optional orderCoords that sorts LineStrings to place outer ring at the first Position of the coordinates.
lineToPolygon(GeoJSONObject lines, {Map<String, dynamic>? properties, bool autoComplete = true, bool orderCoords = true, bool mutate = false}) Feature<GeometryObject>
Converts LineStrings & MultiLineString to Polygon or MultiPolygon. Takes an optional boolean autoComplete that auto completes LineStrings (matches first & last coordinates). Takes an optional orderCoords that sorts LineStrings to place outer ring at the first Position of the coordinates. Takes an optional mutate that mutates the original LineString using autoComplete (matches first & last coordinates. Returns Feature<Polygon> or Feature<MultiPolygon> converted to Polygons. example: