Skip to content

Class/subclass issue when adding GeoJSON to tilemaker. #646

Answered by cldellow
rebrancher asked this question in Q&A
Discussion options

You must be logged in to vote

You probably want to tweak your attribute_function. It gets called when processing GeoJSON/shapefiles - you receive the layer name and the attributes, and decide which attributes you want to write out.

The openmaptiles profile defaults to ocean, so I'm guessing you've maybe started from that file:

-- Remap coastlines
function attribute_function(attr,layer)
if attr["featurecla"]=="Glaciated areas" then
return { subclass="glacier" }
elseif attr["featurecla"]=="Antarctic Ice Shelf" then
return { subclass="ice_shelf" }
elseif attr["featurecla"]=="Urban area" then
return { class

Replies: 2 comments 1 reply

Comment options

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

Answer selected by rebrancher
Comment options

You must be logged in to vote
0 replies
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