Updated function doc

This commit is contained in:
Bryan Housel
2018-01-14 21:45:25 -05:00
parent 075b85c81d
commit 0382ce7d4b
+14 -10
View File
@@ -63,21 +63,26 @@ export function osmSimpleMultipolygonOuterMember(entity, graph) {
}
// Join `array` into sequences of connecting ways.
//
// Join `toJoin` array into sequences of connecting ways.
// Segments which share identical start/end nodes will, as much as possible,
// be connected with each other.
//
// The return value is a nested array. Each constituent array contains elements
// of `array` which have been determined to connect. Each consitituent array
// also has a `nodes` property whose value is an ordered array of member nodes,
// with appropriate order reversal and start/end coordinate de-duplication.
// of `toJoin` which have been determined to connect.
//
// Members of `array` must have, at minimum, `type` and `id` properties.
// Thus either an array of `osmWay`s or a relation member array may be
// used.
// Each consitituent array also has a `nodes` property whose value is an
// ordered array of member nodes, with appropriate order reversal and
// start/end coordinate de-duplication.
//
// If an member has a `tags` property, its tags will be reversed via
// The returned sequences array also has an `actions` array property, containing
// any reversal actions that should be applied to the graph, should the calling
// code attempt to actually join the given ways.
//
// Members of `toJoin` must have, at minimum, `type` and `id` properties.
// Thus either an array of `osmWay`s or a relation member array may be used.
//
// If an member is an `osmWay`, its tags and childnodes will be reversed via
// `actionReverse` in the output.
//
// Incomplete members (those for which `graph.hasEntity(element.id)` returns
@@ -94,7 +99,6 @@ export function osmJoinWays(toJoin, graph) {
return (which instanceof osmWay) ? action(graph).entity(which.id) : which;
}
// make a copy containing only the ways to join
toJoin = toJoin.filter(function(member) {
return member.type === 'way' && graph.hasEntity(member.id);