GeographyPolygon class
Represents a geographic polygon (exterior ring + optional holes) for PostGIS.
- Implemented types
- Available extensions
Constructors
-
GeographyPolygon({required List<
GeographyPoint> exteriorRing, List<List< holes = const [], int srid = Geography.defaultSrid})GeographyPoint> > -
Creates a new GeographyPolygon.
const
- GeographyPolygon.fromBinary(Uint8List bytes)
-
Creates a GeographyPolygon from its EWKB binary representation
as returned by PostgreSQL for geography columns.
factory
Properties
-
exteriorRing
→ List<
GeographyPoint> -
Exterior ring — ordered list of points that close the polygon.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
-
holes
→ List<
List< GeographyPoint> > -
Interior rings (holes), each a closed list of points.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- srid → int
-
Spatial reference system identifier. Defaults to WGS 84 (EPSG:4326).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toEwkt(
) → String -
Returns the EWKT representation for PostGIS, e.g.
SRID=4326;POINT(-0.12 51.5).override -
toJson(
) → String -
Available on GeographyPolygon, provided by the GeographyPolygonJsonExtension extension
Returns the EWKT representation as a String. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override