locana-co / PGRestAPI

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

app.js error in Windows #145

Open piedmontlong opened 7 years ago

piedmontlong commented 7 years ago

Hello everyone,

When I ran >node app.js got the following error, do you know what wrong it is? Thanks!

Created vector tile service: /services/shapefile/kenya_coverage/vector-tiles/:z/:x/:y. Created vector tile service: /services/shapefile/Ken_CountyWithWater/vector-tiles/:z/:x/:y. SpatialServer listening on port 3001 Created PBF .mbtiles service: /services/vector-tiles/KenyaCounties/:z/:x/:y.pbf Executing query: select from geometry_columns where f_table_catalog = $1, test Executing query: select from geometry_columns where f_table_catalog = $1, test 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: '1159', routine: 'parserOpenTable' }

apollolm commented 7 years ago

Perhaps you don't have the PostGIS extension installed? http://www.postgis.net/

piedmontlong commented 7 years ago

Thank you! The PostGIS was installed but was not enabled. After enabling PostGIS extension, the error has gone. But it didn't show any results after the line: Executing query: select * from geometry_columns where f_table_catalog = $1, test Is it correct?

apollolm commented 7 years ago

Yes, I was just logging SQL queries that were being executed, not necessarily the results. Are you able to browse your public schema tables at http://localhost:3001 ?

piedmontlong commented 7 years ago

Yes, it works. Thank you! It seems to take long time to create vector tiles after I copied new shapefile to the shapefiles folder...