-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connecting your own PostGIS database #29
Comments
Which database are you wanting to use? Tiler comes with a database inside the Docker container itself. If you're running PostGIS on your host machine, and you want to connect to that, that should be possible. You probably need to set DB_HOST to the IP address of the host machine. See this question on StackOverflow: https://stackoverflow.com/questions/31249112/allow-docker-container-to-connect-to-a-local-host-postgres-database Regarding creating Shapefiles, you could use ogr2ogr which is a command line tool, and a less likely to crash than QGIS. |
Thanks James, I'll check that out. I guess I can just connect to the Tiler DB and put my data in there for the job... with ogr2ogr, will that be able to create a shapefile from all the rows in my source CSV? |
I don't know the internals of GDAL supporting formats, but from the docs it sounds promising: http://www.gdal.org/drv_csv.html Specifically: "When reading a field named "WKT" is assumed to contain WKT geometry, but also is treated as a regular field." |
Hi, I'm a little unclear how to read from a Postgis database. Is that a DB that's running on my localhost? I've tried setting environment variables for DB_HOST, DB_USER etc, and specifying a query in my project.tiler.json file, but it can't find these variables.
I'm trying to create tiles for 1.5million linestrings.. and having issues because my source data is in WKT in a CSV, and the only way I know to create the shapefile is with QGIS, which crashes...
The text was updated successfully, but these errors were encountered: