prorm API Reference
    Preparing search index...

    Class GEOGRAPHY

    Geography - for geographic/spatial data (uses WGS84 coordinate system) Unlike GEOMETRY, GEOGRAPHY performs calculations using spherical geography

    // Basic geography (defaults to WGS84 - SRID 4326)
    location: DataTypes.GEOGRAPHY

    // Geography with specific type
    point: DataTypes.GEOGRAPHY('POINT')
    area: DataTypes.GEOGRAPHY('POLYGON', 4326)

    // Geography with type and custom SRID
    // 4326 = WGS 84 (most common)
    // 3857 = Web Mercator
    region: DataTypes.GEOGRAPHY('MULTIPOLYGON', 4326)

    Hierarchy (View Summary)

    Index
    key: "GEOGRAPHY" = ...

    The geography type (POINT, LINESTRING, POLYGON, etc.)

    srid?: number

    SRID (Spatial Reference System Identifier) Default is 4326 (WGS 84) Only 4326 (WGS84) is officially supported by PostGIS for geography

    • Serialize a value for storage based on this DataType

      Parameters

      • value: unknown

        The value to serialize

      Returns unknown

      The serialized value

    • Get the geography type in uppercase

      Returns string | undefined