|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcourselog.maputils.TiledMap
public class TiledMap
A virtual map made of several calibrated maps in a given directory.
Field Summary | |
---|---|
static double |
DEFSCALERANGE
Default scale range == 100.0d |
double |
dScAveragePixelOnMeters
Map average scaling factor. |
double |
dScPixelOnMeters
Map scaling factor. |
MapReferencePoint |
gpAverageCenter
Map average Center position |
MapReferencePoint |
gpCenter
Map Center position |
protected ewe.fx.ImageData |
imageDataMap
Image data representation of the map that is used. |
protected ewe.fx.IImage |
imageMap
Bitmap representation of the map that is used. |
double |
maxLat
Map upper left corner latitude. |
double |
maxLon
Map lower right corner longitude. |
static int |
MAXUSAGECOUNT
Maximum usage count == 32767 |
double |
minLat
Map lower right corner latitude. |
double |
minLon
Map upper left corner longitude. |
java.lang.String |
myDirMapsFileName
Directory name of the calibrated image files. |
ewe.util.Vector |
myMaps2Use
Vector of maps. |
double |
myMaxLat
Maps Max latitude. |
double |
myMaxLon
Maps Max longitude. |
double |
myMaxSc
Maps Max scale. |
double |
myMinLat
Maps Min latitude. |
double |
myMinLon
Maps Min longitude. |
double |
myMinSc
Maps Min scale. |
int[] |
myNumberOfUsage
Array of the number of usage for a map. |
CalibratedMap[] |
myTiledMaps
Array of the used calibrated maps |
MapReferencePoint |
tmpMRP
Computation Map point. |
protected ewe.fx.Rect |
tmpRC
Computation rectangle. |
GeoDirection |
vpEast
Center east direction |
GeoDirection |
vpNorth
Center north direction |
Constructor Summary | |
---|---|
TiledMap(java.lang.String imageDirFileName)
Creates a new instance from the map name |
Method Summary | |
---|---|
void |
drawIn(ewe.fx.Graphics g,
ewe.fx.Rect r,
ewe.fx.Color bgC)
Draws the computed image of this map into a graphic rectangle. |
double |
findCenterCloserScale()
Find the closer scale at the current map center. |
double |
findCenterMaxScale()
Find the maximum scale at the current map center. |
double |
findCenterMinScale()
Find the smaller scale at the current map center. |
ewe.util.Vector |
findVisibleTiles(ewe.fx.Rect rD,
double scaleRange)
Compute a vector of maps which are partially visible into a graphic rectangle. |
void |
free()
Free image data |
ewe.fx.Point |
getMapPointFromPosition(GeoPoint pos,
GeoDirection tmp,
ewe.fx.Point pt)
Compute X and Y on map from geo position. |
GeoPoint |
getPointFromMap(int xx,
int yy,
GeoPoint dest)
Compute lat and long from position on map. |
ewe.fx.Point |
moveCenterLimited(ewe.fx.Point ptMove,
ewe.fx.Rect rFrame)
Limit displacement of the center of map, in a given rectangle. |
void |
releaseUnusedMaps()
Release maps which are not used. |
void |
setMapCenter(MapReferencePoint gp)
Set the geo reference point to be used as this map center. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEFSCALERANGE
public static final int MAXUSAGECOUNT
public ewe.util.Vector myMaps2Use
public CalibratedMap[] myTiledMaps
public int[] myNumberOfUsage
protected ewe.fx.IImage imageMap
protected ewe.fx.ImageData imageDataMap
public double myMinLat
public double myMaxLat
public double myMinLon
public double myMaxLon
public double myMinSc
public double myMaxSc
public java.lang.String myDirMapsFileName
public MapReferencePoint gpCenter
public MapReferencePoint gpAverageCenter
public GeoDirection vpNorth
public GeoDirection vpEast
public double dScPixelOnMeters
public double dScAveragePixelOnMeters
public double maxLat
public double minLon
public double minLat
public double maxLon
public MapReferencePoint tmpMRP
protected ewe.fx.Rect tmpRC
Constructor Detail |
---|
public TiledMap(java.lang.String imageDirFileName)
Method Detail |
---|
public void setMapCenter(MapReferencePoint gp)
public ewe.util.Vector findVisibleTiles(ewe.fx.Rect rD, double scaleRange)
rD
- Rectangle to display.scaleRange
- Limit visibility to a scale ratio of scaleRange which
shall be >1. If 0<=scaleRange<1, all maps are taken.
If scaleRange<0, maps are sorted in ascending scale order
public void releaseUnusedMaps()
public double findCenterMaxScale()
public double findCenterCloserScale()
public double findCenterMinScale()
public ewe.fx.Point moveCenterLimited(ewe.fx.Point ptMove, ewe.fx.Rect rFrame)
public void free()
public GeoPoint getPointFromMap(int xx, int yy, GeoPoint dest)
getPointFromMap
in interface GeoGraphable
public ewe.fx.Point getMapPointFromPosition(GeoPoint pos, GeoDirection tmp, ewe.fx.Point pt)
getMapPointFromPosition
in interface GeoGraphable
pos
- geo position to transpose.tmp
- GeoDirection reference to compute intermediate direction.
If null a new object is allocated.pt
- point on bitmap image to compute.
If null a new Point object is allocated.
public void drawIn(ewe.fx.Graphics g, ewe.fx.Rect r, ewe.fx.Color bgC)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |