Hi,
I have my own instance of nominatim setup for geocoding. Now i want to setup openmaptiles tileserver (which requires postgres).
Is it possible to use my existing postgres server(setup with nominatim) for openmaptiles too?
Now i want to setup openmaptiles tileserver (which requires postgres).
Can you give more information - about your use case?
You don't have to set up your own - postgres/postgis server.
see: https://github.com/openmaptiles/openmaptiles/blob/master/QUICKSTART.md tutorial
The docker-compose.yml service includes all (server) requirements and this is preconfigured for an average use case.
see:
see this lines:
services:
postgres:
image: "openmaptiles/postgis:2.9"
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- postgres_conn
ports:
- "5432"
env_file: .env
Is it possible to use my existing postgres server(setup with nominatim) for openmaptiles too?
We don't have a support/tutorial - for this case ... ( sorry )
If you are an experienced "hacker" - then you can find the "openmaptiles/postgis:2.9" - docker image source code here: https://github.com/openmaptiles/postgis
Now ( Today ) the minimal requirements:
We are facing a similar issue.
I wonder if anybody has tried to run vector tiles generation using directly any PostgreSQL OSM import (in either of common schemas - pgsnapshot, osm2pgsql, etc.) - not from the *.pbf dump. Or perhaps you have some ideas on how to do it. I will be happy to hear any ideas.
We have a PostgreSQL server running in a Docker container. It contains a DB with an OSM import in the pgsnapshot schema (wiki, schema). It is being imported and updated using the osmosis tool. We use this OSM import instance for our geodata processing. We aggregate realty advertising and parse/geocode its geodata. Then we show those advertisings on a map - like Nestoria, or StreetEasy. We also have some geodata collected and edited by us and we heavily rely on it.
It is important for us to keep the data integrity - OSM data used for geodata processing should be the same as the OSM data used to render a map. We also want to be able to apply our map edits ASAP (but with a possibility to contribute them back to the OSM in the future) - our OSM instance will have some diff to the geofabrik's dumps. So, we can't just take a single *.pbf from the geofabrik and use it in both processes to ensure the data integrity. And it would be more cost-effective to share a single DB instance for both.
It seems to me that @Rajavelu also wanted not only to share a single DBMS instance between nominatim and openmaptiles (with both having a separate own DB). I think that @Rajavelu was also looking how to use an already running OSM import instance (in the osm2pgsql/nominatim schema in their case) to render/generate map tiles with openmaptiles directly from this OSM DB instance they already have.
AFAIK, openmaptiles use custom PostgreSQL schema suited for the map layers rendering. The schema is defined in the mapping.yaml files. That mapping is being applied by the imposm3 when reading the *.pbf OSM dump. The only straightforward way I see - is to generate a *.pbf extract from our OSM import and then to feed that extract to the openmaptiles. It requires no changes to the openmaptiles, but it looks not optimal and excessive.
Related discussion can also be seen in the imposm mailing list.
For those using OSM DB instances in the osm2pgsql schema - @jmckenna kindly shared his example of porting the imposm mapping import behavior with PostgreSQL views on top of the osm2pgsql schema:
I implemented such a thing for the MapServer community, which you can find at:
https://github.com/mapserver/basemaps/blob/master/contrib/osm2pgsql-to-imposm-schema.sql
which is a part of the process at:
https://github.com/mapserver/mapserver/wiki/RenderingOsmDataWindows-jeff
Most helpful comment
Related discussion can also be seen in the
imposmmailing list.For those using OSM DB instances in the
osm2pgsqlschema - @jmckenna kindly shared his example of porting theimposmmapping import behavior with PostgreSQL views on top of theosm2pgsqlschema: