GeoSQL.SpatiaLite.TypeExtension (GeoSQL v1.3.0)

View Source

A type extension for ecto_sqlite3 that implements storage and retrieval of geo structs for Spatialite databases.

To activate the extension, add this to your config.exs:

  config :ecto_sqlite3,
    extensions: [GeoSQL.Spatialite.TypeExtension]

Also be sure to add load_extensions: ["mod_spatialite"] to the config of Ecto.Repos which use the Ecto.Adapters.SQLite3 adapter to ensure Spatialite features are available.

Summary

Functions

decode_geometry(data)

decode_geopackage_geometry(data)

encode_geometry(geometry)

encode_geopackage_geometry(geometry)