|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.mkgmap.build.MapArea
public class MapArea
A sub area of the map. We have to divide the map up into areas to meet the format of the Garmin map. This class holds all the map elements that belong to a particular area and provides a way of splitting areas into smaller ones. It also acts as a map data source so that we can derive lower level areas from it.
Field Summary | |
---|---|
static int |
LINE_KIND
|
static int |
NUM_KINDS
|
static int |
POINT_KIND
|
static int |
SHAPE_KIND
|
static int |
XT_LINE_KIND
|
static int |
XT_POINT_KIND
|
static int |
XT_SHAPE_KIND
|
Constructor Summary | |
---|---|
MapArea(MapDataSource src,
int resolution)
Create a map area from the given map data source. |
Method Summary | |
---|---|
Area |
getBounds()
Get the initial bounds of this area. |
int[] |
getEstimatedSizes()
Get an estimate of the size of the RGN space that will be required to hold the elements |
Area |
getFullBounds()
Get the full bounds of this area. |
java.util.List<MapLine> |
getLines()
Get a list of all the lines. |
int |
getNumLines()
Return number of lines in this area. |
int |
getNumPoints()
Return number of points in this area. |
int |
getNumShapes()
Return number of shapes in this area. |
java.util.List<Overview> |
getOverviews()
This is not used for areas. |
java.util.List<MapPoint> |
getPoints()
Get a list of all the points. |
RoadNetwork |
getRoadNetwork()
Get the high level view of the road network. |
java.util.List<MapShape> |
getShapes()
Get a list of all the shapes. |
boolean |
hasIndPoints()
True if there are active indexed points in the area. |
boolean |
hasLines()
True if there are any 'active' points in this area. |
boolean |
hasPoints()
True if there are any 'active' points in this area. |
boolean |
hasShapes()
True if there are any 'active' points in this area. |
MapArea[] |
split(int nx,
int ny,
int resolution)
Split this area into several pieces. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int POINT_KIND
public static final int LINE_KIND
public static final int SHAPE_KIND
public static final int XT_POINT_KIND
public static final int XT_LINE_KIND
public static final int XT_SHAPE_KIND
public static final int NUM_KINDS
Constructor Detail |
---|
public MapArea(MapDataSource src, int resolution)
src
- The map data source to initialise this area with.resolution
- The resolution of this area.Method Detail |
---|
public MapArea[] split(int nx, int ny, int resolution)
nx
- The number of pieces in the x (longitude) direction.ny
- The number of pieces in the y direction.resolution
- The resolution of the level.
public Area getFullBounds()
public int[] getEstimatedSizes()
public Area getBounds()
getBounds
in interface MapDataSource
getFullBounds()
public java.util.List<MapPoint> getPoints()
getPoints
in interface MapDataSource
public java.util.List<MapLine> getLines()
getLines
in interface MapDataSource
public java.util.List<MapShape> getShapes()
getShapes
in interface MapDataSource
public RoadNetwork getRoadNetwork()
MapDataSource
getRoadNetwork
in interface MapDataSource
RoadNetwork
object with all the connections between
roads. If this returns null, then the NET and NOD sections should
not be written.public java.util.List<Overview> getOverviews()
getOverviews
in interface MapDataSource
public boolean hasPoints()
public boolean hasIndPoints()
public boolean hasLines()
public int getNumLines()
public int getNumShapes()
public int getNumPoints()
public boolean hasShapes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |