Hi,

I just created my own tile server using the script in http://opentileserver.org/

Installation worked and now i am able to serve the map of a country.

I would like to offer a clean map focussing on cultural heritage, so i would like to filter some information that shows in the tiles, like restaurants, bars, shops, etc...

Is it possible?

Thanks!

asked 22 Feb '17, 17:45

liborio's gravatar image

liborio
31112
accept rate: 0%


It is, but the base style Carto-CSS is very complex. You could change what get's rendered in two ways:

  • Alter the SQL statements which pull data from PostGIS
  • Change styling rules

However, probably the easiest way is to do this with a LUA script. An example is that of SomeoneElse. This is quite involved but has a good number of useful examples.

Osmfilter may also be of some use if your requirements are fairly simple.

The advantage of using a pre-processing step is that then there is no need to try & keep synchronising with changes to the main CartoCSS repository.

permanent link

answered 23 Feb '17, 12:26

SK53's gravatar image

SK53 ♦
22.0k45228345
accept rate: 20%

Thanks SK53,

I have been reading this morning about it and checking the files in openstreetmap-carto.

Whas checking the database SELECTs included in "project.mml" (was thinking to make more restrictive the SELECT that use INCLUDE from amenities and shops).

Alsho checked the "amenity-points.mss" and the filter based in "zoom". Had the doubt if could be possible to change some filters for zoom>20 (so they will never validate) or even just remove the style (dont know if that would work).

If i change de SELECTs and run again the "osm2pgsql" would it replace my current tiles? Or would be better a clean install?

Thanks!

(23 Feb '17, 12:39) liborio

Both should work & changing either mml or mss means you use the same DB schema. I would recommend forking he project on github and maintain your changes in your forked repository.

(23 Feb '17, 17:19) SK53 ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×150
×97
×14

question asked: 22 Feb '17, 17:45

question was seen: 1,607 times

last updated: 23 Feb '17, 17:19

powered by OSQA