I’m playing around with the geo_postgis module, I’ve already successfully worked with it ~2y ago and for new prototype using the elixir 1.15.5, OTP 26.0.2, phoenix 1.7.7, … I’ve got the following error:
== Compilation error in file lib/hello_gis/geom/geom_check.ex ==
** (ArgumentError) unknown type Geo.PostGIS.Geometry for field :geom
(ecto 3.10.3) lib/ecto/schema.ex:2318: Ecto.Schema.check_field_type!/4
(ecto 3.10.3) lib/ecto/schema.ex:1931: Ecto.Schema.__field__/4
lib/hello_gis/geom/geom_check.ex:7: (module)
Haven’t tried this, but there appears to be a line missing from your config; the example under “use with Ecto” on the Felt repo has an extra types line:
#Add extensions to your repo config
config :thanks, Repo,
database: "geo_postgrex_test",
username: "postgres",
password: "postgres",
hostname: "localhost",
adapter: Ecto.Adapters.Postgres,
types: MyApp.PostgresTypes # <=========== this one
Hi @al2o3cr! I’ve just published v3.4.4, which should fix the compatibility issue with Elixir 1.15. The changelog has the backstory of what went wrong, but the long and short of it is that after updating to v3.4.4, you’ll need to run:
mix deps.clean geo_postgis ecto && mix deps.get
(And if you switch back and forth between branches on 3.4.4 versus an older version, you’ll need to run that each time you switch.)
Sweet serendipity, I only just got an openstreetmap data dump up and running on Monday with postgis and a Python tile server. Can’t wait to give this a spin.