-
Notifications
You must be signed in to change notification settings - Fork 46
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
contour style rework #567
base: master
Are you sure you want to change the base?
contour style rework #567
Conversation
@quasart Thanks! I really like it. It would be really nice to have an example in a dense area such as the Alps. Regarding the contours, you might be interested in https://pub.phyks.me/osm/cyclosm/ (see https://github.com/cyclosm/cyclosm-cartocss-style/blob/master/CONTRIBUTING.md#kosmtik). If you cannot make this work, I can output some renders. Waiting for @Florimondable advice on this one as well :) |
Hi, thanks for the work
I prefer the previous colors. Did you try the ones from opentopomap ? They seems very good.
Need example if possible, not sure it's a good idea in terms of performance.
These seems good. Like, Phyks if you can provide more examples. |
i like opentopomap colors too but it’s not that easy : in cyclosm there are brown ways in conflict with contour lines. And opentopomap forests color is more yellow-green than here |
I don’t understand what bother you. The change I propose look pretty subtle. Current style is ok but it has a big issue i’m trying to solve : it’s slightly too strong, especially when background is white. this is taking too much focus over ways. About IGN topo maps, forest shade is very light, and brown color is not in conflict with other elements of the map. Anyway paths are definitely bolder than contour lines, and that is what I’m expecting in cyclosm. |
Thanks for this PR, I really like where we are going with contour lines here. However, I think we could probably dim them even further. See screenshots: https://www.cyclosm.org/#map=15/48.8470/1.9968/cyclosm (contour lines are still very strong here) https://www.cyclosm.org/#map=14/48.8603/1.8948/cyclosm (same) https://www.cyclosm.org/#map=13/45.0226/5.5694/cyclosm (much lighter in the Alps, but still a bit too present, isn't it?) I can provide contour lines extracts of the db if it can help you @quasart, let me know. |
thank you for your help i managed to load this into my db, but I could not render coutour lines Same thing with hillshade, i managed to generate shade file, but I could not make it visible Would your db extract work with unchanged project.mml ? i like your screenshots by the way |
Indeed, these "getting started data" got out of sync with the production ones. For the sake of reusing previously built data, we adapted the SQL queries to a database that pre-existed on our production server: https://github.com/cyclosm/cyclosm-cartocss-style/blob/master/project.mml#L205-L211. You could use a view such as to seamlessly use them with current codebase (not tested on my side, I don't have my laptop at hand to give it a try): DROP VIEW IF EXISTS contours;
CREATE VIEW contours AS
(
SELECT
way AS geometry, ele AS height
FROM planet_osm_line
) AS data; I'll update the doc accordingly. Also note that contours lines are disabled by default so you should opt-in through a Kosmtik localconfig (latest code sample from https://github.com/cyclosm/cyclosm-cartocss-style/blob/master/docs/INSTALL.md#create-the-contour-lines-database).
Same for hillshades, we reused previously built tiff tiles for hillshades. They should be usable by loading only one version (https://pub.phyks.me/osm/cyclosm/hillshade-90.tif for the higher available resolution for instance) and building a Note that here again, hillshades are optional so you should opt-in by using a Kosmtik localconfig. Let me know if you need any more infos, I'm happy to double check everything works fine and as intended here and update the doc which might have slipped out of sync with the codebase. |
Even with your help I could not make it work... I enabled hillshades and contours rendering. I had to patch I loaded contours db this way :
When I replace a geometry value with a way linestring extracted from osm db, it's well rendered.
About hillshade, here is what I run, but nothing displayed, I have no clue :
|
Regarding the hillshades, when you run
you get an empty tif image. Starting from the tif images from pub.phyks.me (hillshade-1000.tif), I think you just have to:
and then build a VRT, enable the layer in project.mml and get the render. |
Regarding contours, from our production database, we have lines such as
They are supposed to be in Mercator projection, so you should be able to project them to WGS84 (lat/lon) with ST_Transform http://www.postgis.net/docs/ST_Transform.html. |
Hello,
Here is my try to improve contour lines style (#534) :
I didn't manage to download elevation data, I simply drawn some lines by hand in JOSM for testing purpose...