AshGeo: Tools for using Geo, Topo and PostGIS
\ ឵឵឵:
I’ve noticed some chatter on here from folks working with geospatial, and decided to pull something out from under my umbrella:
ash_geo
.
It provides:
-
All the
st_*
functions that you would get withGeo.PostGIS
for use with Ashexpr
, and more to come -
An
Ash.Type
backed by each ofGeo.JSON
,Geo.WKB
andGeo.WKT
which may be used asargument
types in your Ash actions, and will automatically cast input from GeoJSON, WKT and WKB encodings -
An
Ash.Type
forGeo.PostGIS.Geometry
, for use with resource attributes -
All types may be overridden and narrowed with
use
, allowing you to add stricter constraints and storage types (e.g.geometry(Point,26918)
). -
Validations for
Geo
types (such asis_point_zm(:arg)
for checking that argument:arg
is a instance ofGeo.PointZM
) -
Validations backed by
Topo
, allowing checks of simple constraints such ascontains?
without needing to hit the database
v0.1.0
is released on Hex. Ideas and thoughts welcome! Feel free to open issues/PRs and to reply to this thread 🙂
Much love to the Ash community ♥️
Hoping it comes in handy.
zachdaniel:
woah
zachdaniel:
This is awesome!
zachdaniel:
Going to show this to the team ❤️
zachdaniel:
Very excited about this, may get used on a project soon 😄
\ ឵឵឵:
Awesome, glad to hear it mate!
\ ឵឵឵:
The CI workflow might look a little bit familiar 😇