locana-co / PGRestAPI

Node.js REST API for PostGres Spatial Entities. AKA: SpatialServer
Apache License 2.0
436 stars 75 forks source link

Can't load dynamic tile endopints error #149

Open nibygro opened 7 years ago

nibygro commented 7 years ago

Hi. I have a next error:

Error in reading spatial tables from DB. Can't load dynamic tile endopints. Message is: undefined Error in reading spatial tables from DB. Can't load dynamic tile endopints. Message is: undefined { [error: relation "geometry_columns" does not exist] name: 'error', length: 115, severity: 'ERROR', code: '42P01', detail: undefined, hint: undefined, position: '15', internalPosition: undefined, internalQuery: undefined, where: undefined, file: 'parse_relation.c', line: '1160', routine: 'parserOpenTable' }

But PostGIS extension is sucessfully installed ond works.

postgres=# CREATE EXTENSION postgis; ERROR: extension "postgis" already exists

postgres=# select * from geometry_columns DBNAME; 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 | edges | the_geom | 2 | 4269 | MULTILINESTRING postgres | tiger | addrfeat | the_geom | 2 | 4269 | LINESTRING postgres | tiger | faces | the_geom | 2 | 4269 | MULTIPOLYGON postgres | tiger | zcta5 | the_geom | 2 | 4269 | MULTIPOLYGON postgres | tiger | tract | the_geom | 2 | 4269 | MULTIPOLYGON postgres | tiger | tabblock | the_geom | 2 | 4269 | MULTIPOLYGON postgres | tiger | bg | the_geom | 2 | 4269 | MULTIPOLYGON (11 rows)

What it can be?

nibygro commented 7 years ago

Sorry, I enabled PostGIS extension for the database once again and now it works (no error message).

But, I can't use Dynamic Vector Tile Endpoint, and I don't know why. I tried to reaserch and found that some PGRestAPI doesn't return any row.

dbname=# select * from geometry_columns where f_table_catalog = 'dbname'; f_table_catalog | f_table_schema | f_table_name | f_geometry_column | coord_dimension | srid | type -----------------+----------------+--------------+-------------------+-----------------+------+------ (0 rows)

So what problem it could be?

apollolm commented 7 years ago

Hi - This project is no longer being actively developed. The versions of Node and PostGIS/PostGreSQL that this was developed against are now 3 or 4 years out of date. However, one issue that comes to mind is that PGRestAPI only reads tables out of the public schema. If your data is in a 'tiger' schema, then it probably won't work.

Good luck!