Closed umbertooo closed 4 years ago
Looks like this is an issue (or on purpose) on the postgis image postgis/docker-postgis#206
Hi @umbertooo, there can be workaround through ogr2ogr
docker-compose up -d postgres
name.shp
into folder data
docker-compose run --rm openmaptiles-tools sh -c 'ogr2ogr -f "PostgreSQL" PG:"dbname=openmaptiles user=openmaptiles password=openmaptiles host=postgres port=5432" "./data/name.shp" -s_srs EPSG:3857 -t_srs EPSG:3857 -lco OVERWRITE=YES -lco GEOMETRY_NAME=geometry -overwrite -nln "name" -nlt GEOMETRY --config PG_USE_COPY YES'
Hi @TomPohys Thanks for looking into this so quickly. It works.
I'm using this article (https://openmaptiles.org/docs/generate/custom-vector-from-postgis/) to prepare custom vector tiles. My local clone of the OpenMapTiles repository is on commit 1356d724d4d077f1d9c7db037542262ebb113eef. Thus the docker-compose.yml file uses
openmaptiles/postgis:5.2
as Docker image for thepostgres
service (instead of tag 2.3 as mentioned in the article).On the step "Import the data into PostGIS" I set up and enter the database container
Next step according to the guide is importing my ShapeFile into the database using
shp2pgsql
. This command is missing in the container:However it exists in current
postgis/postgis
docker images.Is this tool missing on purpose and how would I perform the import instead?