Skip to content
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

Adding additional shp files? #127

Open
exlibris opened this issue Jan 9, 2018 · 1 comment
Open

Adding additional shp files? #127

exlibris opened this issue Jan 9, 2018 · 1 comment

Comments

@exlibris
Copy link

exlibris commented Jan 9, 2018

I have an OSM server setup using osm-bring and it is successfully rendering tiles for an extract of North America. I would like to add additional Natural Earth shp layers (lakes and administrative boundaries) to the whole planet, to better provide orientation for users when they scale out. I followed the pattern used for simplified-land-polygons-complete-3857 and land-polygons-split-3857 but can't get (for example) ne_10m_lakes to show. I am hoping somebody can let me know what critical step I missed out of this workflow:

  1. I downloaded ne_10m_lakes, ne_10m_admin_0_boundary_lines_land and ne_10m_admin_1_states_provinces from Natural earth

  2. I updated the osm-bright.osm2pgsql.mml to include the new shapefiles. For example:
    {
    "Datasource": {
    "file": "/usr/local/share/maps/style/osm-bright-master/shp/ne_10m_lakes/ne_10m_lakes.shp",
    "type": "shape"
    },
    "class": "shp",
    "geometry": "polygon",
    "id": "ne_10m_lakes",
    "name": "ne_10m_lakes",
    "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
    "srs-name": "900913",
    "status": "on"
    },

  3. I edited configure.py to have an entry for each new layer:
    config["ne_10m_lakes"] = path.join(getcwd(),"shp/ne_10m_lakes/ne_10m_lakes.shp")

  4. I recompiled the stylesheet, wiped out my old tile cache, and then rerenderd the tiles.

However, no lakes show…

What am I missing? Do I need to create or update a .mss file to include directives on what color to render the lakes (and boundaries)?

Many thanks for helping a newcomer to the OSM world.

@ajashton
Copy link
Member

ajashton commented Jan 17, 2018

Do I need to create or update a .mss file to include directives on what color to render the lakes (and boundaries)?

Yes, this sounds like the issue. Something like: #ne_10m_lakes { polygon-fill: @water; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants