myRelation := &element.Relation{ ID: 123, Tags: map[string]string{ "type": "multipolygon", }, }
nodeMember := element.Member{ ID: 456, Type: element.TypeNode, } wayMember := element.Member{ ID: 789, Type: element.TypeWay, } myRelation.Members = []element.Member{nodeMember, wayMember}
if value, ok := myRelation.Tags["type"]; ok { // do something with the "type" tag }Overall, the github.com.omniscale.imposm3.element package library is a great tool for working with OpenStreetMap data in Go, and the Relation type specifically is useful for handling relations between elements.