uk.me.parabola.mkgmap.reader.osm
Class Way

java.lang.Object
  extended by uk.me.parabola.mkgmap.reader.osm.Element
      extended by uk.me.parabola.mkgmap.reader.osm.Way
All Implemented Interfaces:
java.lang.Iterable<java.lang.String>
Direct Known Subclasses:
CoastlineFileLoader.CoastlineWay

public class Way
extends Element

Represent a OSM way in the 0.5 api. A way consists of an ordered list of nodes.

Author:
Steve Ratcliffe

Constructor Summary
Way(long id)
           
Way(long id, java.util.List<Coord> points)
           
 
Method Summary
 void addPoint(Coord co)
           
 void addPointIfNotEqualToLastPoint(Coord co)
           
 boolean clockwise()
           
 boolean containsPointsOf(Way other)
           
 Way copy()
           
 Coord getCofG()
           
 java.util.List<Coord> getPoints()
          Get the points that make up the way.
 boolean isBoolTag(java.lang.String s)
           
 boolean isClosed()
           
 boolean isNotBoolTag(java.lang.String s)
           
 java.lang.String kind()
           
 void reverse()
           
 java.lang.String toString()
          A simple representation of this way.
 
Methods inherited from class uk.me.parabola.mkgmap.reader.osm.Element
addTag, copyTags, deleteTag, getEntryIteratable, getId, getName, getTag, getTagsWithPrefix, iterator, removeAllTags, setId, setName, toBrowseURL, toTagString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Way

public Way(long id)

Way

public Way(long id,
           java.util.List<Coord> points)
Method Detail

copy

public Way copy()
Overrides:
copy in class Element

getPoints

public java.util.List<Coord> getPoints()
Get the points that make up the way. We attempt to re-order the segments and return a list of points that traces the route of the way.

Returns:
A simple list of points that form a line.

isBoolTag

public boolean isBoolTag(java.lang.String s)

isNotBoolTag

public boolean isNotBoolTag(java.lang.String s)

addPoint

public void addPoint(Coord co)

addPointIfNotEqualToLastPoint

public void addPointIfNotEqualToLastPoint(Coord co)

reverse

public void reverse()

isClosed

public boolean isClosed()

toString

public java.lang.String toString()
A simple representation of this way.

Overrides:
toString in class java.lang.Object
Returns:
A string with the name and start point

getCofG

public Coord getCofG()

kind

public java.lang.String kind()
Overrides:
kind in class Element

clockwise

public boolean clockwise()

containsPointsOf

public boolean containsPointsOf(Way other)