|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.geodata.maputil.CoordHelper
public final class CoordHelper
| Field Summary | |
|---|---|
static double |
defaultNoCoord
|
int |
defaultZoom
|
static int |
DPI
|
int |
envFactor
|
int |
iconOffsetHeigth
|
int |
iconOffsetWidth
|
static int |
iconOverlapOffsetHeigth
|
static int |
iconOverlapOffsetWidth
|
static int |
iconPxSizeHeigth
|
static int |
iconPxSizeWidth
|
int |
imgHeight
|
double |
imgMeterSize
|
int |
imgWidth
|
double |
mapCenterCoordX
|
double |
mapCenterCoordY
|
int |
mapCenterPxX
|
int |
mapCenterPxY
|
double |
maxX
|
double |
maxY
|
static double |
METERS_PR_INCH
|
double |
minX
|
double |
minY
|
static double |
panFactor
|
static double |
pixelSize
|
static long |
zoom_1
|
static long |
zoom_2
|
static long |
zoom_3
|
static long |
zoom_4
|
static long |
zoom_5
|
static long |
zoom_6
|
static long |
zoom_7
|
static int |
zoomCount
|
static double |
zoomFactor
|
| Constructor Summary | |
|---|---|
CoordHelper()
Creates a new instance of CoordHelper |
|
| Method Summary | |
|---|---|
boolean |
checkCoords(List<ResultItem> companies)
lopper igjennom listetreffet for å sjekke om noen av treffene inneholder koordinater |
ArrayList |
convertToPixelCoord(MapEnvelope me,
Vector vMapPoints,
boolean init)
Converts real world coordinates to imagepixel coordinates. |
double |
getDefaultNoCoord()
|
String |
getDefaultNoCoordString()
|
String |
getDefaultZoom()
|
int |
getDefaultZoomlevel()
|
MapEnvelope |
getEnvelope()
Returns MapEnvelope from given vector of company objects containing x and y coordinates. |
MapEnvelope |
getEnvelope(BasicResultItem item)
Returns MapEnvelope from given company object containing x and y coordinate. |
MapEnvelope |
getEnvelope(List companies)
Returns MapEnvelope from given list of company objects and converts coords to pixCoords |
MapEnvelope |
getEnvelope(List companies,
int zoomlevel)
Returns MapEnvelope from given list of company objects and converts coodrs to pixCoords. |
double |
getEnvFactor()
|
double |
getIconOffsetHeigth()
|
double |
getIconOffsetWidth()
|
double |
getIconOverlapOffsetHeigth()
|
double |
getIconOverlapOffsetWidth()
|
double |
getIconPxSizeHeigth()
|
double |
getIconPxSizeWidth()
|
int |
getImgHeight()
|
double |
getImgMeterSize()
|
int |
getImgWidth()
|
double |
getMapCenterCoordX()
|
double |
getMapCenterCoordY()
|
double |
getMapCenterPxX()
|
double |
getMapCenterPxY()
|
ArrayList |
getMapPoints(List companies,
MapEnvelope me)
Returns Arraylist of MapPoints including pix coordinates. |
double |
getPanFactor()
|
double |
getPixelsize()
|
int |
getZoomCount()
|
double |
getZoomFactor()
|
int |
getZoomLevel(MapEnvelope me)
Returns zoomlevel for given zoomscale |
ArrayList |
getZoomLevels()
Returns ArrayList containing all defined zoomlevels |
long |
getZoomScale(int zoom)
Returns zoomscale for given zoomfactor |
long |
getZoomScale(MapEnvelope me)
Returns zoomscale for given mapenvelope |
int |
getZoomScaleInt(MapEnvelope me)
|
MapEnvelope |
makeEnvelope(double x,
double y,
int zoom)
Generates MapEnvelope from given point, scale, imgwidth and imgheight |
MapEnvelope |
makeEnvelope(Vector vMapPoints)
Generates MapEnvelope from a vector of points, imgwidth and imgheight. |
MapEnvelope |
makeEnvelope(Vector vMapPoints,
int zoomlevel)
Generates MapEnvelope from a vector of points, imgwidth and imgheight. |
Vector |
parseCoordString(String sCoord)
|
void |
setDefaultZoomlevel(int defaultZoom)
|
void |
setEnvFactor(int env)
|
void |
setIconOffsetHeigth(int iconOffsetHeigth)
|
void |
setIconOffsetWidth(int iconOffsetWidth)
|
void |
setImgHeight(int imgHeigth)
|
void |
setImgWidth(int imgWidth)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long zoom_1
public static final long zoom_2
public static final long zoom_3
public static final long zoom_4
public static final long zoom_5
public static final long zoom_6
public static final long zoom_7
public static final int zoomCount
public int defaultZoom
public int imgWidth
public int imgHeight
public int envFactor
public static final int iconPxSizeHeigth
public static final int iconPxSizeWidth
public int iconOffsetHeigth
public int iconOffsetWidth
public static final int iconOverlapOffsetWidth
public static final int iconOverlapOffsetHeigth
public int mapCenterPxX
public int mapCenterPxY
public static final double panFactor
public static final double zoomFactor
public static final double defaultNoCoord
public double maxX
public double minX
public double maxY
public double minY
public double mapCenterCoordX
public double mapCenterCoordY
public static final double METERS_PR_INCH
public static final int DPI
public static final double pixelSize
public double imgMeterSize
| Constructor Detail |
|---|
public CoordHelper()
| Method Detail |
|---|
public void setDefaultZoomlevel(int defaultZoom)
public int getDefaultZoomlevel()
public Vector parseCoordString(String sCoord)
sCoord - Coordinate string, x1,y1;x2,y2;x3,y3;x4,y4...osv.
public MapEnvelope makeEnvelope(double x,
double y,
int zoom)
mp - MapPoint, centerpoint in map
public MapEnvelope getEnvelope(BasicResultItem item)
public MapEnvelope getEnvelope(List companies,
int zoomlevel)
companies - List of companieszoomLevel - Minimum zoomlevel to use
public MapEnvelope getEnvelope(List companies)
companies -
public boolean checkCoords(List<ResultItem> companies)
public ArrayList getMapPoints(List companies,
MapEnvelope me)
companies - companies - public MapEnvelope getEnvelope()
public MapEnvelope makeEnvelope(Vector vMapPoints)
vMapPoints - list of pints
public MapEnvelope makeEnvelope(Vector vMapPoints,
int zoomlevel)
vMapPoints - vector containg MapPoints
public ArrayList convertToPixelCoord(MapEnvelope me,
Vector vMapPoints,
boolean init)
vMapPoints - Vector of real world map point coordinatesme - init - public long getZoomScale(MapEnvelope me)
me -
public int getZoomScaleInt(MapEnvelope me)
public int getZoomLevel(MapEnvelope me)
public long getZoomScale(int zoom)
zoom -
public ArrayList getZoomLevels()
public String getDefaultZoom()
public int getImgWidth()
public int getImgHeight()
public void setImgWidth(int imgWidth)
public void setImgHeight(int imgHeigth)
public double getEnvFactor()
public void setEnvFactor(int env)
public int getZoomCount()
public double getPanFactor()
public double getZoomFactor()
public double getImgMeterSize()
public double getMapCenterPxX()
public double getMapCenterPxY()
public double getMapCenterCoordX()
public double getMapCenterCoordY()
public double getDefaultNoCoord()
public String getDefaultNoCoordString()
public double getPixelsize()
public double getIconPxSizeHeigth()
public double getIconPxSizeWidth()
public double getIconOffsetHeigth()
public void setIconOffsetHeigth(int iconOffsetHeigth)
public double getIconOffsetWidth()
public void setIconOffsetWidth(int iconOffsetWidth)
public double getIconOverlapOffsetWidth()
public double getIconOverlapOffsetHeigth()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||