AshGeo.Geometry (AshGeo v0.1.3)

Base geometry type

To create a constrained geometry type, use AshGeo.Geometry accepts several options that may be useful.

Options

  • :storage_type (atom/0) - Column type in the database

    Examples

      use AshGeo.Geometry, storage_type: :"geometry(Point,26918)"
  • :geo_types - Allowed Geo types

    Examples

    use AshGeo.Geometry, geo_types: :point
    use AshGeo.Geometry, geo_types: [:point, :point_z, :point_zm]
    use AshGeo.Geometry, geo_types: [:point, Geo.PointZ, :point_zm]

    See also

Constraints:

  • :geo_types - Allowed Geo types

    Examples

    use AshGeo.Geometry, geo_types: :point
    use AshGeo.Geometry, geo_types: [:point, :point_z, :point_zm]
    use AshGeo.Geometry, geo_types: [:point, Geo.PointZ, :point_zm]

    See also

defmodule App.GeometryPoint26918 do
  use AshGeo.Geometry,
    storage_type: :"geometry(Point,26918)",
    geo_types: :point
end