GeoSQL (GeoSQL v1.1.0)
View SourceGeoSQL provides access to GIS functions in SQL databases via Ecto. PostGIS 3.x and Spatialite are currently supported.
SQL functions are sorted into modules by their appearance in standards (e.g. SQL/MM2 vs SQL/MM3), category or topic (such as topological and 3D functions), as well as their availability in specific implementations. This includes the following modules:
GeoSQL.MM2
: functions from the SQL/MM v2 standardGeoSQL.MM3
: functions from the SQL/MM v3 standardGeoSQL.Common
: non-standard functions that are widely availableGeoSQL.PostGIS
: functions only found in PostGIS
This makes usage of feature sets self-documenting in the code, allowing developers to adopt or avoid functions that are not available in the databases the application uses.
Where there are subtle differences between implementations of the same functions, GeoSQL strives to hide those differences behind single function calls.
The GeoSQL.Geometry
module provides access to geometric types in Ecto schemas.
Summary
Types
@type fragment() :: term()
@type geometry_input() :: GeoSQL.Geometry.t() | fragment()
@type init_options() :: [init_option()]
Functions
@spec init(Ecto.Repo.t(), init_options()) :: :ok
Performs runtime setup of an Ecto repo for use with GeoSQL. This can be done in the repo's
init/2
callback, or any time after it has been started. This function is idempotent.
If using additional type extensions, pass those modules in via the type_extensions
option.