prorm API Reference
    Preparing search index...

    Class GEOMETRY

    Geometry - for spatial/geometric data Supports optional geometry type and SRID (Spatial Reference System Identifier)

    // Basic geometry (stored as JSON/text)
    location: DataTypes.GEOMETRY

    // Geometry with specific type
    point: DataTypes.GEOMETRY('POINT')
    line: DataTypes.GEOMETRY('LINESTRING')
    area: DataTypes.GEOMETRY('POLYGON')

    // Geometry with type and SRID (coordinate system)
    geoPoint: DataTypes.GEOMETRY('POINT', 4326)

    Hierarchy (View Summary)

    Index
    key: "GEOMETRY" = ...

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

    srid?: number

    SRID (Spatial Reference System Identifier) for the coordinate system Common values:

    • 4326: WGS 84 (GPS coordinates)
    • 3857: Web Mercator (Google Maps, OpenStreetMap)
    • 326xx: UTM zones (e.g., 32618 for UTM Zone 18N)
    • Serialize a value for storage based on this DataType

      Parameters

      • value: unknown

        The value to serialize

      Returns unknown

      The serialized value

    • Get the geometry type in uppercase

      Returns string | undefined