uk.me.parabola.imgfmt.app.map
Class MapReader

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.map.MapReader
All Implemented Interfaces:
java.io.Closeable

public class MapReader
extends java.lang.Object
implements java.io.Closeable

This is a view of a .img file when we are reading it. The Map class is the equivalent for writing.

Author:
Steve Ratcliffe

Constructor Summary
MapReader(java.lang.String filename)
           
 
Method Summary
 void close()
           
 java.util.List<City> getCities()
           
 java.util.List<Country> getCountries()
           
 java.util.List<Region> getRegions()
           
 Area getTreBounds()
           
 java.util.List<Polyline> linesForLevel(int level)
          Get a list of all the lines for a given level.
 java.util.List<Point> pointsForLevel(int level)
          Get a list of all the points for a given level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapReader

public MapReader(java.lang.String filename)
          throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

pointsForLevel

public java.util.List<Point> pointsForLevel(int level)
Get a list of all the points for a given level.

Parameters:
level - The level, lower numbers are the most detailed.

linesForLevel

public java.util.List<Polyline> linesForLevel(int level)
Get a list of all the lines for a given level.

Parameters:
level - The level, lower numbers are the most detailed.

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException

getCities

public java.util.List<City> getCities()

getCountries

public java.util.List<Country> getCountries()

getRegions

public java.util.List<Region> getRegions()

getTreBounds

public Area getTreBounds()