tobinbradley/dirt-simple-postgis-http-api

Issue with non-default geometry column in MVT route

Closed this issue · 2 comments

Expected

I can overwrite the default geometry column geom

Actual

I cannot use a different name for the geometry column than geom (wkb_geometry, the default ingestion by OGR, does not work).

Steps to reproduce

  1. Try to access the MVT route on a database with a geometry column named other than geom -> ERROR 500 "column \"geom\" does not exist"
  2. Rename table to geom
parcels=> ALTER TABLE wallonia_2018 RENAME COLUMN wkb_geometry TO geom;
ALTER TABLE
  1. Try to access the MVT route again -> Works

Screenshots

Screenshot of Swagger with input wkb_geometry

Screenshot of Swagger with input wkb_geometry

Screenshot of Swagger with input geom after renaming column

Screenshot of Swagger with input geom after renaming column

Thanks for providing such a detailed bug report! It made it easy to track down the problem. I had geom hard coded in one part of the SQL call.

Do a git pull or overwrite your routes/mvt.js with the updated one and you should be good to go.

Thanks for letting me know about the problem!

Cool, so you closed this super-quickly in 3ba0121 Thank you!