-
Notifications
You must be signed in to change notification settings - Fork 171
Description
I loaded TIGER 2024 using the latest PostGIS and official instructions. From the SQL side the geometry works and I can do geographic searches as expected. Yet pg_tileserv fails to discover tables I need and there is no documented way to force it. I expected that tiger.state, tiger.county, tiger.cousub, tiger.place would be surfaced, in fact only empty tiger.tabblock20 is listed as visible.
As per instructions I ran (slightly modified) snippet:
SELECT
nspname AS SCHEMA,
relname AS TABLE,
attname AS geometry_column,
postgis_typmod_srid (atttypmod) AS srid,
postgis_typmod_type (atttypmod) AS geometry_type
FROM
pg_class c
JOIN pg_namespace n ON (c.relnamespace = n.oid)
JOIN pg_attribute a ON (a.attrelid = c.oid)
JOIN pg_type t ON (a.atttypid = t.oid)
WHERE
relkind IN('r', 'v', 'm')
AND typname = 'geometry';It does show the problem (excerpt):
| schema | table | geometry_column | srid | geometry_type |
|---|---|---|---|---|
| tiger | county | the_geom | 0 | Geometry |
| tiger | state | the_geom | 0 | Geometry |
| tiger | place | the_geom | 0 | Geometry |
| tiger | cousub | the_geom | 0 | Geometry |
| tiger | tabblock20 | the_geom | 4269 | MultiPolygon |
Notice that srid is 0 for all data but tabblock20 for no apparent reasons.
All troubleshooting steps didn't work for me.
Yet looking at geometry_columns I see (excerpt):
| f_table_catalog | f_table_schema | f_table_name | f_geometry_column | coord_dimension | srid | type |
|---|---|---|---|---|---|---|
| postgres | tiger | county | the_geom | 2 | 4269 | MULTIPOLYGON |
| postgres | tiger | state | the_geom | 2 | 4269 | MULTIPOLYGON |
| postgres | tiger | place | the_geom | 2 | 4269 | MULTIPOLYGON |
| postgres | tiger | cousub | the_geom | 2 | 4269 | MULTIPOLYGON |
| postgres | tiger | tabblock20 | the_geom | 2 | 4269 | MULTIPOLYGON |
The troubleshooting steps usually about changing this table and updating data. As you can see everything looks fine in this department. Maybe the detection step should be different.
Just to be thorough I tried Martin and it does show correctly 4 tables I actually need and granted permissions for: state, county, cousub, place. So it is possible to do and works with the same security settings.
It would be nice if the plain vanilla TIGER data worked immediately out of the box.
Please let me know, if I can help to fix this problem and improve the overall DX.