Skip to content

Trying to make multipolygon from type=boundary #504

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

You must be logged in to vote

I doubt that'll work like that. tilemaker has special handling for multipolygon relations (i.e. type=multipolygon). It looks like boundary relations probably need to be processed that way, rather than with relation_scan_function.

I imagine you could get some way towards this by patching read_pbf.cpp:

(in PbfReader::ScanRelations)

	int typeKey = findStringPosition(pb, "type");
	int mpKey   = findStringPosition(pb, "multipolygon");
	int boundaryKey = findStringPosition(pb, "boundary");

	for (int j=0; j<pg.relations_size(); j++) {
		Relation pbfRelation = pg.relations(j);
		bool isMultiPolygon = (find(pbfRelation.keys().begin(), pbfRelation.keys().end(), typeKey) != pbfRelation.keys().end()…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@sn4k3ch4rm3r
Comment options

@systemed
Comment options

Answer selected by sn4k3ch4rm3r
Comment options

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

@systemed
Comment options

@BenOnTrack
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