Skip to content

How can TileMaker be used for generating contour lines tiles? #493

Answered by systemed
adibarda asked this question in Q&A
Discussion options

You must be logged in to vote

It's very doable (and I've done it) but it's a multistep process and you'll need some other tools.

First get your elevation data - usually SRTM tiles.

Use gdal_contour (from the GDAL suite) to make contour shapefiles out of that.

Then write a very brief Lua script - it doesn't need to do much, just set the rank attribute accordingly in shape_function. (I don't know what your Mapbox style expects here, sorry.)

Run tilemaker with this Lua script, a .json pointing to the shapefiles, and the bounding box you want.

One thing to watch - shapefiles have a maximum size of 2GB, so if the area you're generating is larger than that, you'll need to split it up into regions and then merge the results.…

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@adibarda
Comment options

Answer selected by adibarda
Comment options

You must be logged in to vote
1 reply
@adibarda
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@systemed
Comment options

@WingmanImd
Comment options

@systemed
Comment options

@WingmanImd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants