uk.me.parabola.mkgmap.general
Class MapShape

java.lang.Object
  extended by uk.me.parabola.mkgmap.general.MapElement
      extended by uk.me.parabola.mkgmap.general.MapLine
          extended by uk.me.parabola.mkgmap.general.MapShape

public class MapShape
extends MapLine

A shape or polygon is just the same as a line really as far as I can tell. There are some things that you cannot do with them semantically.

Author:
Steve Ratcliffe.

Constructor Summary
MapShape()
           
 
Method Summary
 boolean contains(Coord co)
          Checks if a point is contained within this shape.
 MapShape copy()
          Provide a copy of this MapElement without geometry.
 int getPoiType()
           
 void setDirection(boolean direction)
           
 void setPoiType(int type)
           
 
Methods inherited from class uk.me.parabola.mkgmap.general.MapLine
getBounds, getLocation, getPoints, insertPointsAtEnd, insertPointsAtStart, isDirection, isRoad, setPoints, testForConsecutivePoints
 
Methods inherited from class uk.me.parabola.mkgmap.general.MapElement
getCity, getCountry, getExtTypeAttributes, getHouseNumber, getIsIn, getMaxResolution, getMinResolution, getName, getPhone, getRef, getRegion, getStreet, getType, getZip, hasExtendedType, isSimilar, setCity, setCountry, setExtTypeAttributes, setHouseNumber, setIsIn, setMaxResolution, setMinResolution, setName, setPhone, setRef, setRegion, setStreet, setType, setZip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapShape

public MapShape()
Method Detail

copy

public MapShape copy()
Description copied from class: MapElement
Provide a copy of this MapElement without geometry. This is used when filtering and clipping to create modified versions.

Overrides:
copy in class MapLine
Returns:
the copy;

setDirection

public void setDirection(boolean direction)
Overrides:
setDirection in class MapLine

setPoiType

public void setPoiType(int type)

getPoiType

public int getPoiType()

contains

public boolean contains(Coord co)
Checks if a point is contained within this shape. Points on the edge of the shape are considered inside.

Parameters:
co - point to check
Returns:
true if point is in shape, false otherwise