Package ext.plantuml.com.ctreber.acearth
Class MapDataReader
- java.lang.Object
-
- ext.plantuml.com.ctreber.acearth.MapDataReader
-
public class MapDataReader extends java.lang.Object
The map data file is a big array of short (16-bit) ints, as follows: - it is a sequence of closed curves - the first value in a curve is the number of points in the curve - the second value in a curve indicates land/water (1 or -1, respectively) - this is followed by an [x,y,z] triple that indicates a point on the unit sphere (each of x, y, and z has been scaled by 30000), where the x axis points "to the right" (towards 0 N 90 E), the y axis points "up" (towards the north pole), and the z axis points "out of the screen" (towards 0 N 0 E). this is the starting point of the curve. - this is followed by (one less than the number of points in the curve) triples [dx,dy,dz]; the [x,y,z] triple for each successive point in the curve is obtained by adding [dx,dy,dz] onto the previous [x,y,z] values. - the curves are [must be!] non-self-intersecting and traced in a counter-clockwise direction the curves are sampled at a (roughly) a 20 mile resolution.© 2002 Christian Treber, ct@ctreber.com
-
-
Constructor Summary
Constructors Constructor Description MapDataReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Polygon[]
readMapData()
Read map data.
-
-
-
Method Detail
-
readMapData
public static Polygon[] readMapData() throws java.io.IOException
Read map data.
- Returns:
- Array of map polygons.
- Throws:
java.io.IOException
-
-