pg_tileserv icon indicating copy to clipboard operation
pg_tileserv copied to clipboard

Support geography columns

Open pramsey opened this issue 5 years ago • 4 comments

Geography columns are not automatically discovered in the catalog query, and may require special handling in the tile generation queries as well.

pramsey avatar Jun 26 '20 03:06 pramsey

I could submit a PR to solve this in a basic way by letting the table query discover geography columns and then casting to geometry before generating the tiles, but is that too simple? Would a linestring stored as geography have to be visualized as a great arc in order to be consistent with calculations using that same linestring?

stephenhillier avatar Jun 27 '20 08:06 stephenhillier

Hm... the tiles themselves are planar (3857) ... I think the main downside of casting agressively is that if the tables are using spatial indexes on geography you're getting no benefit out of them.

pramsey avatar Jun 27 '20 18:06 pramsey

Is this planned?

joleeee avatar Sep 22 '24 02:09 joleeee

It's not on a schedule or anything. It's a reasonable feature request, so I'm not closing it out. Patches accepted! It'll be kind of a big patch, I think unfortunately, since the SQL necessary to efficiently generate tiles from geography will be a bit different from that required for the pure geometry case.

pramsey avatar Sep 30 '24 21:09 pramsey