Potlatch 1/Point array

From OpenStreetMap Wiki
< Potlatch 1(Redirected from Potlatch/Point array)
Jump to navigation Jump to search

Potlatch treats a way as an ordered list of points. This ordered list is stored within Potlatch (both the SWF client and the Ruby AMF server script) as an array. Each element of the array represents one point.

A point 'p', in turn, comprises the following:

  • p[0]=x co-ordinate (projected)
  • p[1]=y co-ordinate (projected)
  • p[2]=node ID
  • p[3]=not currently used
  • p[4]=hash of node keys/values

So to get the node ID of the fourth element (i.e. subscript 3) in a way, you would use the following ActionScript:

  • way.path[3][2]