hholzgra / ocitysmap

Fork of ocitysmap repository at savannah.nongnu.org
Other
37 stars 13 forks source link

SQL queries with imposm importer #16

Open kaktus40 opened 6 years ago

kaktus40 commented 6 years ago

Hello, first some pieces of information in order to improve your install document. To make ocitysmap working, I needed to install (via pip) these libraries: colour and pluginbase.

Before knowing ocitysmap, I used imposm to import osm database and used the database schema defined in osm-bright. The resulting database is in production and I can't change the schema of it. Also, I identified here, here and here. The schema used for the query is specific to osm2psql. Is it possible to have a schema specific to imposm?

hholzgra commented 6 years ago

first some pieces of information in order to improve your install document. To make ocitysmap working, I needed to install (via pip) these libraries: colour and pluginbase.

yes, I've been lagging in updating that document, having mostly focused on the Vagrant setup sister project, where the list of required packages for both Ocitysmap and Maposmatic (and some more) are in

https://github.com/hholzgra/maposmatic-vagrant/blob/master/inc/install-packages.sh

Before knowing ocitysmap, I used imposm to import osm database and used the database schema defined in osm-bright. The resulting database is in production and I can't change the schema of it. Also, I identified here, here and here. The schema used for the query is specific to osm2psql. Is it possible to have a schema specific to imposm?

I never though of this, neither seem the original authors have, everything seems to assume that all the standard stylesheets use a variant of the osm2pgsql default style.

It would probably be best to keep the current index category queries as default, but to allow to provide alternative queries in the .ocitysmap.conf configuration file?

hholzgra commented 6 years ago

Thinking again I'm not sure how to store multi line text in the conf file, so it may be better to store query text in separate files, and just list the file names in the conf file ...

kaktus40 commented 6 years ago

Well, I think a separate file could be a good idea. With this, any style and any database with geodata could be a source. Like mapnik configuration xml, ocitysmap could define some tags like street, amenity or village and waiting the sql queries (see table parameter here).