GeoSQL.SpatialLite.TypeExtension (GeoSQL v0.1.0)

View Source

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

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

  config :ecto_sqlite3,
    extensions: [GeoSQL.SpatialLite.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 SpatialLite features are available.

Summary

Functions

decode_geometry(data)

encode_geometry(geometry)