com.ontimize.util.gis.client.utils
Class GisViewerUtilities

java.lang.Object
  extended by com.ontimize.util.gis.client.utils.GisViewerUtilities

public class GisViewerUtilities
extends java.lang.Object

Static methods useful for the gis map viewer


Field Summary
static java.util.HashMap<java.lang.String,java.awt.Cursor> cursorsMap
          Static map used to store the cursor for the application GIS panels
 
Constructor Summary
GisViewerUtilities()
           
 
Method Summary
static org.opengis.filter.Filter buildAndFilter(org.opengis.filter.Filter filterA, org.opengis.filter.Filter filterB)
          Build an AND operation filter using the given filters
static org.jdesktop.animation.timing.Animator buildAnimator(org.jdesktop.animation.timing.TimingTarget target, int time, int resolution, float acceleration, float deceleration)
           
static java.lang.Object buildFilterForLayer(int filterType, java.lang.String[] filteredFields, java.lang.Object[] filteredValues)
          Build a filter instance
static org.opengis.filter.Filter buildOrFilter(org.opengis.filter.Filter filterA, org.opengis.filter.Filter filterB)
          Build an OR operation filter using the given filters
static double calculateMaxExpansion(java.util.List<IGisLayer> layers, double pixelSize)
          Calculates the maximum expansion for the given layers in order to improve the GIS panel repaint methods
static double calculateMaxExpansionForLayer(IGisLayer layer, double pixelSize)
          Calculates the maximum expansion for the given layer in order to improve the GIS panel repaint methods
static boolean checkIfRecordIsInCurrentData(java.util.Hashtable recordToInsert, java.util.List<java.util.Hashtable> actualData)
           
static com.vividsolutions.jts.geom.Envelope configureMapArea(java.awt.Rectangle oldRect, java.awt.Rectangle newRect, com.vividsolutions.jts.geom.Envelope boundingBox)
          Get the map area corresponding to the new map panel bounds
static java.awt.image.BufferedImage convertGrayScaleToColor(java.awt.image.BufferedImage image)
           
static int countTotalObjects(java.util.Hashtable<java.lang.String,java.util.List> data)
          Count the total elements overlapped on the same point
static java.awt.image.BufferedImage createBuffer(java.awt.image.BufferedImage buffImage)
          Create an opaque buffered image with the same dimension as the buffImage parameters
static java.awt.image.BufferedImage createBuffer(java.awt.Dimension dimension)
          Create an opaque buffered image with the same size as the given dimension parameter
static java.awt.image.BufferedImage createBuffer(int width, int height)
          Create an opaque buffered image with the given dimension
static java.awt.image.BufferedImage createBuffer(java.awt.Rectangle rectangle)
          Create an opaque buffered image with the same size as the given rectangle parameter
static java.awt.image.VolatileImage createVolatile(int width, int height)
          Create a volatile image with the given dimension
static java.util.Hashtable<java.lang.String,java.util.List> deleteDuplicateValues(java.util.Hashtable<java.lang.String,java.util.List> selectedData)
          Delete duplicate values from the given selected data
static void drawRectangle(java.awt.Graphics2D g2d, java.awt.Color rectColor, float alpha, int x, int y, int width, int height)
           
static void drawRectangle(java.awt.Graphics2D g2d, java.awt.Color rectColor, float alpha, java.awt.Rectangle bounds)
           
static void drawSelectorCenterElement(java.awt.Graphics2D g2d, float alpha, java.awt.Color fillColor, java.awt.Color borderColor, float strokeWidth, int[] location, int radius)
           
static void drawSelectorElement(java.awt.Graphics2D g2d, float alpha, java.awt.Color fillColor, java.awt.Color borderColor, float strokeWidth, int[] location, int radius)
           
static void drawSelectorTipText(java.awt.Graphics2D g2d, java.lang.String tipText, java.awt.Color haloColor, java.awt.Color textColor, float strokeWidth, int[] location, double radius, double angle, int textSize)
           
static boolean evaluateFilter(org.opengis.filter.Filter filter, java.util.Map<java.lang.String,java.lang.Object> recordValues)
          Evaluate the filter with the given data
static boolean evaluateFilterArray(org.opengis.filter.Filter[] filterArray, java.util.Map<java.lang.String,java.lang.Object> recordValues)
          Check if the given values pass the defined filter array
static boolean evaluateFilters(IGisLayer layer, java.util.Hashtable<java.lang.String,java.lang.Object> recordValues)
          Evaluate the layer defined filters for the given data
static java.util.List<java.util.Hashtable> expandSelectionByDistance(java.util.List<java.util.Hashtable> layerData, java.util.List<java.util.Hashtable> selectedData, IGisLayer selectionLayer, double distance)
           
static void fillGraphics(java.awt.Graphics2D g2d, java.awt.Color fillColor, float alpha, int width, int height)
           
static void fillGraphics(java.awt.Graphics2D g2d, java.awt.Color fillColor, int width, int height)
           
static java.awt.Graphics2D fillImageAndGetGraphics(java.awt.image.BufferedImage buffImage, java.awt.Color fillColor)
           
static java.awt.Graphics2D fillImageAndGetGraphics(java.awt.image.BufferedImage buffImage, java.awt.Color fillColor, int width, int height)
           
static com.vividsolutions.jts.geom.Envelope fixAspectRatio(java.awt.Rectangle r, com.vividsolutions.jts.geom.Envelope mapArea)
          Adjusts the given bounding box area to the given panel aspect ratio
static java.awt.Cursor getAddCursor()
          Get the "add" cursor
static int[] getBBoxLowerRightCoordinate(java.awt.Rectangle r, com.vividsolutions.jts.geom.Envelope panelBBox, com.vividsolutions.jts.geom.Envelope dataBBox)
          Gets the lower right coordinate of a given data bounding box in screen coordinates
static java.awt.Rectangle getBBoxRectangle(java.awt.Rectangle r, com.vividsolutions.jts.geom.Envelope panelBBox, com.vividsolutions.jts.geom.Envelope dataBBox)
          Gets the rectangle related to a given data bounding box in screen coordinates
static int[] getBBoxUpperLeftCoordinate(java.awt.Rectangle r, com.vividsolutions.jts.geom.Envelope panelBBox, com.vividsolutions.jts.geom.Envelope dataBBox)
          Gets the upper left coordinate of a given data bounding box in screen coordinates
static java.awt.Rectangle getClipBoundsForEnvelope(com.vividsolutions.jts.geom.Envelope geomBBox, com.vividsolutions.jts.geom.Envelope boundingBox, java.awt.Rectangle panelRect)
          Get the clip bounds for the given area inside the map viewer component
static java.awt.Cursor getClosedHandCursor()
          Get the "closed hand" cursor
static com.vividsolutions.jts.geom.Envelope getEnvelopeForObject(int actualId, int totalObjects, com.vividsolutions.jts.geom.Envelope prevBBox, double radius, double pixelSize, double initAngle)
          Get translated envelope in order to paint the given element in the desired location of the multiple elements selector
static com.vividsolutions.jts.geom.Envelope getEnvelopeToCenterView(com.vividsolutions.jts.geom.Envelope panelBounds, java.awt.Rectangle viewerBounds)
          Get the adjusted envelope for the map viewer panel with the given dimension and the new map area
static com.vividsolutions.jts.geom.Envelope getEnvelopeToCenterView(java.awt.Rectangle panelBounds, com.vividsolutions.jts.geom.Envelope boundingBox)
          Get the new panel area obtained after applying the new bounds from parameter panelBounds
static com.vividsolutions.jts.geom.Envelope getLayersBoundingBox(java.util.List<IGisLayer> layers, int index)
           
static java.util.List<java.util.Hashtable> getMapAreaLayerData(java.lang.String layerAttribute, com.vividsolutions.jts.geom.Envelope boundingBox, java.util.Map viewerData)
          Get the data from the given layer that is inside or overlapped wth the given map area
static int[] getPanelLocation(double[] geoLocation, com.vividsolutions.jts.geom.Envelope mapArea, java.awt.Rectangle panelBounds)
          Get the screen location corresponding to the given geographic location and map area
static com.vividsolutions.jts.geom.Envelope getPanEnvelope(double stX, double endX, double stY, double endY, com.vividsolutions.jts.geom.Envelope boundingBox)
           
static java.util.Map getSmallerRasterMapCopy(java.util.Hashtable<java.lang.String,java.lang.Object> dataHT)
           
static java.awt.Cursor getViewerCursor(int viewerState)
          Get the actual cursor for the map viewer
static com.vividsolutions.jts.geom.Envelope getZoomOutEnvelope(double stX, double endX, double stY, double endY, com.vividsolutions.jts.geom.Envelope boundingBox)
           
static java.awt.image.VolatileImage paintVZoomIn(int[] mousePos, float fraction, java.awt.image.VolatileImage tempImage)
          Paint zoom in effect corners for the given volatile image
static java.awt.image.VolatileImage paintVZoomOut(int[] mousePos, float fraction, java.awt.image.VolatileImage tempImage)
          Paint zoom out effect corners for the given volatile image
static java.awt.image.BufferedImage paintZoomIn(int[] mousePos, float fraction, java.awt.image.BufferedImage tempImage)
          Paint zoom in effect corners for the given buffered image
static java.awt.image.BufferedImage paintZoomOut(int[] mousePos, float fraction, java.awt.image.BufferedImage tempImage)
          Paint zoom out effect corners for the given buffered image
static java.util.List<IGisLayer> reorderLayersToPreference(java.lang.String[] layersOrder, java.util.List<IGisLayer> layers)
          Adjust the actual gis viewer layers list order to the order saved on remote preferences
static void saveLayersOrderPreference(IGisViewer gisViewer)
          Save actual gis viewer layers order on remote preferences
static void saveVisibleLayersPreference(IGisViewer gisViewer)
          Save actual gis viewer visible layers on remote preferences
static java.util.List<IGisLayer> setVisibleLayersByPreferences(java.lang.String[] layersVisible, java.lang.String[] layersNotVisible, java.util.List<IGisLayer> layers)
          Adjust the actual gis viewer visible layers to the list saved on remote preferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cursorsMap

public static java.util.HashMap<java.lang.String,java.awt.Cursor> cursorsMap
Static map used to store the cursor for the application GIS panels

Constructor Detail

GisViewerUtilities

public GisViewerUtilities()
Method Detail

getEnvelopeToCenterView

public static com.vividsolutions.jts.geom.Envelope getEnvelopeToCenterView(com.vividsolutions.jts.geom.Envelope panelBounds,
                                                                           java.awt.Rectangle viewerBounds)
Get the adjusted envelope for the map viewer panel with the given dimension and the new map area

Parameters:
panelBounds - New map viewer bounding box
viewerBounds - Actual map viewer component dimension
Returns:
Map area adjusted to the viewer component dimension

getEnvelopeToCenterView

public static com.vividsolutions.jts.geom.Envelope getEnvelopeToCenterView(java.awt.Rectangle panelBounds,
                                                                           com.vividsolutions.jts.geom.Envelope boundingBox)
Get the new panel area obtained after applying the new bounds from parameter panelBounds

Parameters:
panelBounds - New panel bounds
boundingBox - Map panel actual area
Returns:
New map panel area

getMapAreaLayerData

public static java.util.List<java.util.Hashtable> getMapAreaLayerData(java.lang.String layerAttribute,
                                                                      com.vividsolutions.jts.geom.Envelope boundingBox,
                                                                      java.util.Map viewerData)
Get the data from the given layer that is inside or overlapped wth the given map area

Parameters:
layerAttribute - Layer attribute
boundingBox - Map area to obtain data
viewerData - All data contained on the map viewer
Returns:
Interest data

createBuffer

public static java.awt.image.BufferedImage createBuffer(java.awt.image.BufferedImage buffImage)
Create an opaque buffered image with the same dimension as the buffImage parameters

Parameters:
buffImage - Image used to set new image dimension
Returns:
Image

createBuffer

public static java.awt.image.BufferedImage createBuffer(java.awt.Rectangle rectangle)
Create an opaque buffered image with the same size as the given rectangle parameter

Parameters:
rectangle - Rectangle to indicate the desired image size
Returns:
Image

createBuffer

public static java.awt.image.BufferedImage createBuffer(java.awt.Dimension dimension)
Create an opaque buffered image with the same size as the given dimension parameter

Parameters:
dimension - Dimension to indicate the desired image size
Returns:
Buffered image

createBuffer

public static java.awt.image.BufferedImage createBuffer(int width,
                                                        int height)
Create an opaque buffered image with the given dimension

Parameters:
width - Image width
height - Image height
Returns:
Image

createVolatile

public static java.awt.image.VolatileImage createVolatile(int width,
                                                          int height)
Create a volatile image with the given dimension

Parameters:
width - Image width
height - Image height
Returns:
Image

paintZoomIn

public static java.awt.image.BufferedImage paintZoomIn(int[] mousePos,
                                                       float fraction,
                                                       java.awt.image.BufferedImage tempImage)
Paint zoom in effect corners for the given buffered image

Parameters:
mousePos - Mouse position on zooming in event action
fraction - Fraction of the current zoom animation
tempImage - Image to paint on
Returns:
Modified image

paintVZoomIn

public static java.awt.image.VolatileImage paintVZoomIn(int[] mousePos,
                                                        float fraction,
                                                        java.awt.image.VolatileImage tempImage)
Paint zoom in effect corners for the given volatile image

Parameters:
mousePos - Mouse position on zooming in event action
fraction - Fraction of the current zoom animation
tempImage - Image to paint on
Returns:
Modified image

paintZoomOut

public static java.awt.image.BufferedImage paintZoomOut(int[] mousePos,
                                                        float fraction,
                                                        java.awt.image.BufferedImage tempImage)
Paint zoom out effect corners for the given buffered image

Parameters:
mousePos - Mouse position on zooming out event action
fraction - Fraction of the current zoom animation
tempImage - Image to paint on
Returns:
Modified image

paintVZoomOut

public static java.awt.image.VolatileImage paintVZoomOut(int[] mousePos,
                                                         float fraction,
                                                         java.awt.image.VolatileImage tempImage)
Paint zoom out effect corners for the given volatile image

Parameters:
mousePos - Mouse position on zooming out event action
fraction - Fraction of the current zoom animation
tempImage - Image to paint on
Returns:
Modified image

configureMapArea

public static com.vividsolutions.jts.geom.Envelope configureMapArea(java.awt.Rectangle oldRect,
                                                                    java.awt.Rectangle newRect,
                                                                    com.vividsolutions.jts.geom.Envelope boundingBox)
Get the map area corresponding to the new map panel bounds

Parameters:
oldRect - Previous panel bounds
newRect - New panel bounds
boundingBox - Previous panel map bounding box
Returns:
New panel map bounding box

evaluateFilters

public static boolean evaluateFilters(IGisLayer layer,
                                      java.util.Hashtable<java.lang.String,java.lang.Object> recordValues)
Evaluate the layer defined filters for the given data

Parameters:
layer - Gis layer instance
recordValues - Data to validate
Returns:
Validation result

evaluateFilter

public static boolean evaluateFilter(org.opengis.filter.Filter filter,
                                     java.util.Map<java.lang.String,java.lang.Object> recordValues)
Evaluate the filter with the given data

Parameters:
filter - Filter instance
recordValues - Data to validate
Returns:
Validation result

evaluateFilterArray

public static boolean evaluateFilterArray(org.opengis.filter.Filter[] filterArray,
                                          java.util.Map<java.lang.String,java.lang.Object> recordValues)
Check if the given values pass the defined filter array

Parameters:
filterArray - Filter array
recordValues - Record to evaluate
Returns:
Filtering value

buildAndFilter

public static org.opengis.filter.Filter buildAndFilter(org.opengis.filter.Filter filterA,
                                                       org.opengis.filter.Filter filterB)
Build an AND operation filter using the given filters

Parameters:
filterA - Left filter for the AND operation
filterB - Right filter for the AND operation
Returns:
AND operation filter

buildOrFilter

public static org.opengis.filter.Filter buildOrFilter(org.opengis.filter.Filter filterA,
                                                      org.opengis.filter.Filter filterB)
Build an OR operation filter using the given filters

Parameters:
filterA - Left filter for the OR operation
filterB - Right filter for the OR operation
Returns:
OR operation filter

buildFilterForLayer

public static java.lang.Object buildFilterForLayer(int filterType,
                                                   java.lang.String[] filteredFields,
                                                   java.lang.Object[] filteredValues)
Build a filter instance

Parameters:
filterType - Filter type
filteredFields - Layer fields to filters
filteredValues - Values for filter creation
Returns:
Created filter

fixAspectRatio

public static com.vividsolutions.jts.geom.Envelope fixAspectRatio(java.awt.Rectangle r,
                                                                  com.vividsolutions.jts.geom.Envelope mapArea)
Adjusts the given bounding box area to the given panel aspect ratio

Parameters:
r - Bounds of the panel
mapArea - Bounding box to adjust
Returns:
Adjusted bounding box

getBBoxUpperLeftCoordinate

public static int[] getBBoxUpperLeftCoordinate(java.awt.Rectangle r,
                                               com.vividsolutions.jts.geom.Envelope panelBBox,
                                               com.vividsolutions.jts.geom.Envelope dataBBox)
Gets the upper left coordinate of a given data bounding box in screen coordinates

Parameters:
r - Bounds of the map panel
panelBBox - Panel bounding box
dataBBox - Data bounding box
Returns:
Upper left corner of the data bounding box in screen coordinates

getBBoxLowerRightCoordinate

public static int[] getBBoxLowerRightCoordinate(java.awt.Rectangle r,
                                                com.vividsolutions.jts.geom.Envelope panelBBox,
                                                com.vividsolutions.jts.geom.Envelope dataBBox)
Gets the lower right coordinate of a given data bounding box in screen coordinates

Parameters:
r - Bounds of the map panel
panelBBox - Panel bounding box
dataBBox - Data bounding box
Returns:
Lower right corner of the data bounding box in screen coordinates

getBBoxRectangle

public static java.awt.Rectangle getBBoxRectangle(java.awt.Rectangle r,
                                                  com.vividsolutions.jts.geom.Envelope panelBBox,
                                                  com.vividsolutions.jts.geom.Envelope dataBBox)
Gets the rectangle related to a given data bounding box in screen coordinates

Parameters:
r - Bounds of the map panel
panelBBox - Panel bounding box
dataBBox - Data bounding box
Returns:
Bounds of the data bounding box in screen coordinates

getPanelLocation

public static int[] getPanelLocation(double[] geoLocation,
                                     com.vividsolutions.jts.geom.Envelope mapArea,
                                     java.awt.Rectangle panelBounds)
Get the screen location corresponding to the given geographic location and map area

Parameters:
geoLocation - Interest geographic location
mapArea - Map bounds of the panel
panelBounds - Size of the panel
Returns:
Position of the given location inside the interest panel

saveLayersOrderPreference

public static void saveLayersOrderPreference(IGisViewer gisViewer)
Save actual gis viewer layers order on remote preferences

Parameters:
gisViewer - Gis viewer

saveVisibleLayersPreference

public static void saveVisibleLayersPreference(IGisViewer gisViewer)
Save actual gis viewer visible layers on remote preferences

Parameters:
gisViewer - Gis viewer

reorderLayersToPreference

public static java.util.List<IGisLayer> reorderLayersToPreference(java.lang.String[] layersOrder,
                                                                  java.util.List<IGisLayer> layers)
Adjust the actual gis viewer layers list order to the order saved on remote preferences

Parameters:
layersOrder - Layers order obtained from remote preferences
layers - Actual gis viewer layer list
Returns:
Rearranged layers list

setVisibleLayersByPreferences

public static java.util.List<IGisLayer> setVisibleLayersByPreferences(java.lang.String[] layersVisible,
                                                                      java.lang.String[] layersNotVisible,
                                                                      java.util.List<IGisLayer> layers)
Adjust the actual gis viewer visible layers to the list saved on remote preferences

Parameters:
layersVisible - Visible layers obtained from remote preferences
layers - Actual gis viewer layer list
Returns:
Readjusted layers list

getClosedHandCursor

public static java.awt.Cursor getClosedHandCursor()
Get the "closed hand" cursor

Returns:
Requested cursor

getAddCursor

public static java.awt.Cursor getAddCursor()
Get the "add" cursor

Returns:
Requested cursor

getViewerCursor

public static java.awt.Cursor getViewerCursor(int viewerState)
Get the actual cursor for the map viewer

Parameters:
viewerState - New state of the viewer
Returns:
Cursor for the map viewer

getClipBoundsForEnvelope

public static java.awt.Rectangle getClipBoundsForEnvelope(com.vividsolutions.jts.geom.Envelope geomBBox,
                                                          com.vividsolutions.jts.geom.Envelope boundingBox,
                                                          java.awt.Rectangle panelRect)
Get the clip bounds for the given area inside the map viewer component

Parameters:
geomBBox - Interest area
boundingBox - Map viewer area
panelRect - Map viewer panel dimension
Returns:
Clip bounds for the interest area

expandSelectionByDistance

public static java.util.List<java.util.Hashtable> expandSelectionByDistance(java.util.List<java.util.Hashtable> layerData,
                                                                            java.util.List<java.util.Hashtable> selectedData,
                                                                            IGisLayer selectionLayer,
                                                                            double distance)

getEnvelopeForObject

public static com.vividsolutions.jts.geom.Envelope getEnvelopeForObject(int actualId,
                                                                        int totalObjects,
                                                                        com.vividsolutions.jts.geom.Envelope prevBBox,
                                                                        double radius,
                                                                        double pixelSize,
                                                                        double initAngle)
Get translated envelope in order to paint the given element in the desired location of the multiple elements selector

Parameters:
actualId - Actual element id
totalObjects - Number of elements in the selector
prevBBox - Previous map envelope
radius - Selector radius in pixels
Returns:
New envelope

countTotalObjects

public static int countTotalObjects(java.util.Hashtable<java.lang.String,java.util.List> data)
Count the total elements overlapped on the same point

Returns:
Total number of overlapped objects

calculateMaxExpansion

public static double calculateMaxExpansion(java.util.List<IGisLayer> layers,
                                           double pixelSize)
Calculates the maximum expansion for the given layers in order to improve the GIS panel repaint methods

Parameters:
layers - List of layers to repaint
pixelSize - Actual panel pixel size
Returns:
Expansion value

calculateMaxExpansionForLayer

public static double calculateMaxExpansionForLayer(IGisLayer layer,
                                                   double pixelSize)
Calculates the maximum expansion for the given layer in order to improve the GIS panel repaint methods

Parameters:
layer - Layer to repaint
pixelSize - Actual panel pixel size
Returns:
Expansion value

drawSelectorElement

public static void drawSelectorElement(java.awt.Graphics2D g2d,
                                       float alpha,
                                       java.awt.Color fillColor,
                                       java.awt.Color borderColor,
                                       float strokeWidth,
                                       int[] location,
                                       int radius)

drawSelectorCenterElement

public static void drawSelectorCenterElement(java.awt.Graphics2D g2d,
                                             float alpha,
                                             java.awt.Color fillColor,
                                             java.awt.Color borderColor,
                                             float strokeWidth,
                                             int[] location,
                                             int radius)

drawSelectorTipText

public static void drawSelectorTipText(java.awt.Graphics2D g2d,
                                       java.lang.String tipText,
                                       java.awt.Color haloColor,
                                       java.awt.Color textColor,
                                       float strokeWidth,
                                       int[] location,
                                       double radius,
                                       double angle,
                                       int textSize)

fillImageAndGetGraphics

public static java.awt.Graphics2D fillImageAndGetGraphics(java.awt.image.BufferedImage buffImage,
                                                          java.awt.Color fillColor)

fillImageAndGetGraphics

public static java.awt.Graphics2D fillImageAndGetGraphics(java.awt.image.BufferedImage buffImage,
                                                          java.awt.Color fillColor,
                                                          int width,
                                                          int height)

fillGraphics

public static void fillGraphics(java.awt.Graphics2D g2d,
                                java.awt.Color fillColor,
                                int width,
                                int height)

fillGraphics

public static void fillGraphics(java.awt.Graphics2D g2d,
                                java.awt.Color fillColor,
                                float alpha,
                                int width,
                                int height)

drawRectangle

public static void drawRectangle(java.awt.Graphics2D g2d,
                                 java.awt.Color rectColor,
                                 float alpha,
                                 java.awt.Rectangle bounds)

drawRectangle

public static void drawRectangle(java.awt.Graphics2D g2d,
                                 java.awt.Color rectColor,
                                 float alpha,
                                 int x,
                                 int y,
                                 int width,
                                 int height)

buildAnimator

public static org.jdesktop.animation.timing.Animator buildAnimator(org.jdesktop.animation.timing.TimingTarget target,
                                                                   int time,
                                                                   int resolution,
                                                                   float acceleration,
                                                                   float deceleration)

checkIfRecordIsInCurrentData

public static boolean checkIfRecordIsInCurrentData(java.util.Hashtable recordToInsert,
                                                   java.util.List<java.util.Hashtable> actualData)

getZoomOutEnvelope

public static com.vividsolutions.jts.geom.Envelope getZoomOutEnvelope(double stX,
                                                                      double endX,
                                                                      double stY,
                                                                      double endY,
                                                                      com.vividsolutions.jts.geom.Envelope boundingBox)

getPanEnvelope

public static com.vividsolutions.jts.geom.Envelope getPanEnvelope(double stX,
                                                                  double endX,
                                                                  double stY,
                                                                  double endY,
                                                                  com.vividsolutions.jts.geom.Envelope boundingBox)

deleteDuplicateValues

public static java.util.Hashtable<java.lang.String,java.util.List> deleteDuplicateValues(java.util.Hashtable<java.lang.String,java.util.List> selectedData)
Delete duplicate values from the given selected data

Parameters:
selectedData - Hastable containing data from different GIS layers. Each layer will contain a List with the selected data for that layer
Returns:
Processed data

getSmallerRasterMapCopy

public static java.util.Map getSmallerRasterMapCopy(java.util.Hashtable<java.lang.String,java.lang.Object> dataHT)

getLayersBoundingBox

public static com.vividsolutions.jts.geom.Envelope getLayersBoundingBox(java.util.List<IGisLayer> layers,
                                                                        int index)

convertGrayScaleToColor

public static java.awt.image.BufferedImage convertGrayScaleToColor(java.awt.image.BufferedImage image)