Adding additional shp files?
Nobody has claimed this yet.
- Dominant language
- CartoCSS
- Stars
- 703
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
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:
-
I downloaded ne_10m_lakes, ne_10m_admin_0_boundary_lines_land and ne_10m_admin_1_states_provinces from Natural earth
-
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"
}, -
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") -
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the added entries in osm-bright.osm2pgsql.mml and configure.py with the existing simplified-land-polygons-complete-3857 and land-polygons-split-3857 layers. Then inspect the stylesheet's .mss files to determine whether the new layers have rendering directives; done means the lake and administrative-boundary layers appear after recompiling and rerendering.
Written by the indexing model from the issue text.
Assessment
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100