|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kaboum.util.KaboumMapServerTools
public class KaboumMapServerTools
Cette classe s'occupe de traduire les requètes de l'applet sous une forme compréhensible par mapserver.
Field Summary | |
---|---|
boolean |
displayInline
If true display Inline Feature |
boolean |
displayItemQueryMap
tells if applet is in ITEM_QUERYMAP mode. |
KaboumExtent |
extent
Spatial extent of current map (i.e. |
java.util.Vector |
historyArray
History array |
java.awt.Point |
img
Image click point |
static java.lang.String |
K_MODE_BROWSE
|
static java.lang.String |
K_MODE_ITEM_NQUERYMAP
|
static java.lang.String |
K_MODE_ITEM_QUERYMAP
|
static java.lang.String |
K_MODE_MAP
Public constant |
static java.lang.String |
K_MODE_NQUERY
|
static java.lang.String |
K_MODE_QUERY
|
static java.lang.String |
K_MODE_REFERENCE
|
static java.lang.String |
K_TYPE_IMAGE_JPEG
|
java.lang.String |
layersList
Layers (cf: mapserver) |
java.lang.String |
mapPath
Chemin absolu du map file (cf: mapserver) |
java.lang.String |
mapserverURL
Chemin relatif à mapserver (cf: mapserver) |
int |
maxWinSize
Max Window Size (cf: EGIS add-on from terraSIP project) |
KaboumPrecisionModel |
pm
Precision Model |
KaboumExtent |
previousExtent
Spatial extent of previous map (i.e. |
java.lang.String |
queryLayersList
Query layers (cf: mapserver) |
KaboumExtent |
realExtent
Spatial adjusted extent of current map (i.e. real extent) |
KaboumExtent |
referenceExtent
Spatial extent of reference map (i.e. initial extent) |
int |
scale
Current scale |
Constructor Summary | |
---|---|
KaboumMapServerTools(java.lang.String _mapserverURL,
java.lang.String _mapPath,
int _historyMaxSize,
KaboumPrecisionModel _pm,
java.lang.String _layersList,
java.lang.String _queryLayersList,
KaboumExtent _restrictedExtent,
int _maxScale,
boolean _useCache,
KaboumExtent _referenceExtent,
java.awt.Dimension _screenSize,
KaboumGGDIndex _GGDIndex)
Constructeur |
Method Summary | |
---|---|
void |
boxToMapExtent(double x1,
double y1,
double x2,
double y2)
Calculate map coordinate from a dragged box. |
void |
centerMapExtent(KaboumCoordinate internal)
Calculate new extent center on a map coordinates |
double |
getDistance(KaboumCoordinate coordA,
KaboumCoordinate coordB)
Return the distance between two points |
KaboumExtent |
getExtent()
Return the uncorrected spatial extent |
java.lang.String |
getItemQueryMapString()
Return the item query map string |
java.lang.String |
getMapCoordString(int x,
int y)
Return the string equivalence of mouse position in either map coordinates and mouse coordinates |
java.lang.String |
getMapString()
Return the mapserver URL string to draw the map |
KaboumExtent |
getPreviousExtent()
Return the previous extent |
java.lang.String |
getPrintURL(int w,
int h)
Mapserver URL for printing |
java.lang.String |
getQueryString()
Return the mapserver URL string to query a layer |
KaboumExtent |
getRealExtent()
Return the current spatial extent |
java.lang.String |
getReferenceString()
Return the reference map URL string |
int |
getScale()
Return the current map scale. |
java.lang.String |
getUniqueMapString()
Return a unique map String to mapserver by appending a time stamp to the last parameter |
KaboumExtent |
getValidExtent(KaboumExtent e)
Return a valid extent depending on zoomOutRestriction status and maxScale restriction. |
void |
historyAddExtent(java.lang.String extent)
Add a new extent in history array |
java.lang.String |
historyNextExtent()
Return the next extent in history |
java.lang.String |
historyPrevExtent()
Return the previous extent in history |
int |
internalToMouseX(double x)
Cette méthode renvois la coordonnée x souris d'un point d'abscisse x dans le repère de la carte |
java.awt.Point |
internalToMouseXY(KaboumCoordinate internal)
Return the Point(x,y) equivalence of an internal coordinate |
int |
internalToMouseY(double y)
Cette méthode renvois la coordonnée y souris d'un point d'abscisse y dans le repère de la carte |
java.awt.Polygon |
internalToPolygon(KaboumCoordinate[] internals)
Convert an array of internal coordinates into a java.awt.Polygon |
double |
mouseXToInternal(double x)
Cette méthode renvois la coordonnée x carte d'un point d'abscisse x dans le repère de la zone d'affichage de la carte (haut pixel) |
KaboumCoordinate |
mouseXYToInternal(int x,
int y)
Return the internal coordinate corresponding to the mouse position |
double |
mouseYToInternal(double y)
Cette méthode renvois la coordonnée y carte d'un point d'ordonnée y dans le repère de la zone d'affichage de la carte (haut pixel) |
void |
setAdjustedCoordinates()
Compute the spatial extent containing the whole image |
void |
setExtent(KaboumExtent e)
Set the current spatial extent |
void |
setImageQuality(int i)
Set the image quality |
void |
setImageType(java.lang.String str)
Set the image type |
void |
setInlineFeatureString(java.lang.String layer,
java.lang.String points,
java.lang.String text)
Set the inline feature string |
void |
setItemQueryMapString(java.lang.String mode,
java.lang.String layer,
java.lang.String[] qitem,
java.lang.String qstring,
java.lang.String extraParams)
Set the item query map string |
void |
setLayersList(java.lang.String str)
Layers initialisation |
void |
setQueryLayersList(java.lang.String str)
Query layers initialisation. |
double |
setScale(int scale)
Set the map scale |
void |
zoomToMapExtent(double x1,
double y1,
double factor)
Calculate map coordinates centered on a mouse click |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String K_MODE_MAP
public static final java.lang.String K_MODE_QUERY
public static final java.lang.String K_MODE_NQUERY
public static final java.lang.String K_MODE_ITEM_QUERYMAP
public static final java.lang.String K_MODE_ITEM_NQUERYMAP
public static final java.lang.String K_MODE_REFERENCE
public static final java.lang.String K_MODE_BROWSE
public static final java.lang.String K_TYPE_IMAGE_JPEG
public KaboumExtent extent
public KaboumExtent realExtent
public KaboumExtent referenceExtent
public KaboumExtent previousExtent
public KaboumPrecisionModel pm
public java.lang.String layersList
public java.lang.String queryLayersList
public java.lang.String mapPath
public java.lang.String mapserverURL
public java.awt.Point img
public java.util.Vector historyArray
public int scale
public int maxWinSize
public boolean displayInline
public boolean displayItemQueryMap
property
Constructor Detail |
---|
public KaboumMapServerTools(java.lang.String _mapserverURL, java.lang.String _mapPath, int _historyMaxSize, KaboumPrecisionModel _pm, java.lang.String _layersList, java.lang.String _queryLayersList, KaboumExtent _restrictedExtent, int _maxScale, boolean _useCache, KaboumExtent _referenceExtent, java.awt.Dimension _screenSize, KaboumGGDIndex _GGDIndex)
mapserverURL
- MapServer cgi URL (ex: http:://132.149.92.10/cgi-bin/mapserver.cgi)mapPath
- Absolute path to the map filehistoryMaxSize
- Size of history arrayprecisionModel
- Precision ModellayersList
- Initial layers listqueryLayersList
- Initial query layersrestrictedExtent
- Set the maximum valid extentmaxScale
- Maximum scale allow in zoom innoCache
- Images are cached by http server (FALSE) or noreferenceExtent
- Initial map extentscreenSize
- Size of the window applet_GGDIndex
- GGDIndex referenceMethod Detail |
---|
public KaboumCoordinate mouseXYToInternal(int x, int y)
x
- Mouse x positiony
- Mouse y positionpublic double mouseXToInternal(double x)
public double mouseYToInternal(double y)
public int internalToMouseX(double x)
public int internalToMouseY(double y)
public java.awt.Point internalToMouseXY(KaboumCoordinate internal)
public java.awt.Polygon internalToPolygon(KaboumCoordinate[] internals)
public void setImageType(java.lang.String str)
imageType
- Type of imagepublic void setImageQuality(int i)
imageType
- Type of imagepublic void setExtent(KaboumExtent e)
e
- New extentpublic void setLayersList(java.lang.String str)
str
- Layers list. The layers list is a string
in which each layer name is separated with a ","public void setQueryLayersList(java.lang.String str)
str
- Query layer list. Query layers list is
a string in which each layer name is separated with
a ","public KaboumExtent getRealExtent()
public KaboumExtent getExtent()
public KaboumExtent getPreviousExtent()
public java.lang.String getMapString()
public java.lang.String getUniqueMapString()
public java.lang.String getItemQueryMapString()
public void setInlineFeatureString(java.lang.String layer, java.lang.String points, java.lang.String text)
public void setItemQueryMapString(java.lang.String mode, java.lang.String layer, java.lang.String[] qitem, java.lang.String qstring, java.lang.String extraParams)
mode:
- the mapserver mode, either itemquerymap or itemnquerymap, according to the received kaboumCommand stringlayer:
- the name of the layer on which the attribute query is performed (currently, only one layer is supported.qitem:
- an array of items (=layer's attribute) on which the search is performedextraParams:
- a string containing extra mapserver parameters to pass for this query. theses
parameters are treated as they are passed, without any processing.qstring:
- the mapserver query string, pertinent to the current layer (postgis, dbf, etc.public java.lang.String getQueryString()
public java.lang.String getReferenceString()
public java.lang.String getPrintURL(int w, int h)
w
- Width of the new map to printh
- Height of the new map to printpublic java.lang.String getMapCoordString(int x, int y)
x
- Coordonnées x du pointeur sourisy
- Coordonnées y du pointeur sourispublic double getDistance(KaboumCoordinate coordA, KaboumCoordinate coordB)
coordA
- Coordinate A (internal representation)coordB
- Coordinate B (internal representation)public int getScale()
public double setScale(int scale)
public void boxToMapExtent(double x1, double y1, double x2, double y2)
x1
- ULX mouse coordinatey1
- ULY mouse coordinatex1
- LRX mouse coordinatey2
- LRY mouse coordinatepublic void zoomToMapExtent(double x1, double y1, double factor)
x1
- X mouse coordinatey1
- Y mouse coordinatefactor
- Zoom factor (Ex: 0.5 = zoom x-2; 1 = pan; 2 = zoom x2; etc...)public void centerMapExtent(KaboumCoordinate internal)
internal
- Internal coordinatepublic KaboumExtent getValidExtent(KaboumExtent e)
e
- Extentpublic void setAdjustedCoordinates()
public void historyAddExtent(java.lang.String extent)
public java.lang.String historyPrevExtent()
public java.lang.String historyNextExtent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |