uk.ac.leeds.ccg.andyt.grids.process
Class Grid2DSquareCellProcessorGWS

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
      extended by uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
          extended by uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessorGWS
All Implemented Interfaces:
java.io.Serializable

public class Grid2DSquareCellProcessorGWS
extends Grid2DSquareCellProcessor

Class of methods for processing and generating geographically weighted Grid2DSquareCellDouble statistics.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
grid2DSquareCells, log, logIndentation, startTime, workspace
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
handleOutOfMemoryErrorFalse, handleOutOfMemoryErrorTrue, memoryReserve
 
Constructor Summary
Grid2DSquareCellProcessorGWS()
          Creates a new Grid2DSquareCellDoubleProcessorGWS
 
Method Summary
 Grid2DSquareCellDouble[] geometricDensity(Grid2DSquareCellDouble grid, double distance, Grid2DSquareCellDoubleFactory gridFactory)
          Returns an Grid2DSquareCellDouble[] containing geometric density surfaces at a range of scales: result[ 0 ] - is the result at the first scale ( double the cellsize of grid ) result[ 1 ] - if it exists is the result at the second scale ( double the cellsize of result[ 0 ] ) result[ n ] - if it exists is the result at the ( n + 1 )th scale ( double the cellsize of result[ n - 1 ] ) The algorithm used for generating a geometric density surface is described in: Turner A (2000) Density Data Generation for Spatial Data Mining Applications.
 Grid2DSquareCellDouble[] regionBivariateStatistics(Grid2DSquareCellDouble grid0, Grid2DSquareCellDouble grid1, java.util.Vector statistics, double distance, double weightIntersect, double weightFactor, Grid2DSquareCellDoubleFactory gridFactory)
          Returns an Grid2DSquareCellDouble[] result with elements based on statistics and values based on bivariate comparison of grid0 and grid1, distance, weightIntersect and weightFactor.
 double[] regionUnivariateStatistics(Grid2DSquareCellDouble grid, int rowIndex, int colIndex, java.lang.String statistic, double distance, double weightIntersect, double weightFactor)
          TODO
 java.util.Vector regionUnivariateStatistics(Grid2DSquareCellDouble grid, java.util.Vector statistics, double distance, double weightIntersect, double weightFactor, Grid2DSquareCellDoubleFactory gridFactory)
          Returns a Vector containing Grid2DSquareCellDoubles.
 java.util.Vector regionUnivariateStatisticsCrossScale(Grid2DSquareCellDouble grid, java.util.Vector statistics, double distance, double weightIntersept, double weightFactor, double scaleIntersept, double scaleFactor, Grid2DSquareCellDoubleFactory gridFactory)
          TODO
 java.util.Vector regionUnivariateStatisticsSlow(Grid2DSquareCellDouble grid, java.util.Vector statistics, double distance, double weightIntersect, double weightFactor, Grid2DSquareCellDoubleFactory gridFactory)
          Returns a Vector containing Grid2DSquareCellDoubles
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
add, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, aggregate, aggregate, copyAndSetUpNewLog, distanceToDataValue, divide, freeMemoryOrThrowError, getGrid2DSquareCells, getRowProcessData, getRowProcessInitialData, getTime0, getWorkspace, initWorkspace, linearRescale, linearRescale, log, log, logRescale, logRescale, mask, mask, mask, mask, mask, mask, minus, multiply, replace, setValueALittleBitLarger, setValueALittleBitLarger, setValueALittleBitSmaller, setValueALittleBitSmaller, setWorkspace, setWorkspace
 
Methods inherited from class uk.ac.leeds.ccg.andyt.grids.utilities.ErrorHandler
clearMemoryReserve, initMemoryReserve, initMemoryReserve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grid2DSquareCellProcessorGWS

public Grid2DSquareCellProcessorGWS()
Creates a new Grid2DSquareCellDoubleProcessorGWS

Method Detail

regionUnivariateStatistics

public java.util.Vector regionUnivariateStatistics(Grid2DSquareCellDouble grid,
                                                   java.util.Vector statistics,
                                                   double distance,
                                                   double weightIntersect,
                                                   double weightFactor,
                                                   Grid2DSquareCellDoubleFactory gridFactory)
Returns a Vector containing Grid2DSquareCellDoubles. Implements row processing (see Grid2DSquareCellDoubleProcessor.getRowProcessData()).

Parameters:
grid - the Grid2DSquareCellDouble to be processed
distance - the distance defining the region within which values will be used. At distances weights if applied are zero
weightIntersect - typically a number between 0 and 1 which controls the weight applied at the centre of the kernel
weightFactor - = 0.0d all values within distance will be equally weighted > 0.0d means the edge of the kernel has a zero weight < 0.0d means that the edage of the kernel has a weight of 1 > -1.0d && < 1.0d provides an inverse decay
gridFactory - the Abstract2DSquareCellDoubleFactory used to create grids

regionUnivariateStatisticsSlow

public java.util.Vector regionUnivariateStatisticsSlow(Grid2DSquareCellDouble grid,
                                                       java.util.Vector statistics,
                                                       double distance,
                                                       double weightIntersect,
                                                       double weightFactor,
                                                       Grid2DSquareCellDoubleFactory gridFactory)
Returns a Vector containing Grid2DSquareCellDoubles

Parameters:
grid - the Grid2DSquareCellDouble to be processed
distance - the distance defining the region within which values will be used. At distances weights if applied are zero
weightIntersect - typically a number between 0 and 1 which controls the weight applied at the centre of the kernel
weightFactor - = 0.0d all values within distance will be equally weighted > 0.0d means the edge of the kernel has a zero weight < 0.0d means that the edage of the kernel has a weight of 1 > -1.0d && < 1.0d provides an inverse decay
gridFactory - the Abstract2DSquareCellDoubleFactory used to create grids

regionUnivariateStatistics

public double[] regionUnivariateStatistics(Grid2DSquareCellDouble grid,
                                           int rowIndex,
                                           int colIndex,
                                           java.lang.String statistic,
                                           double distance,
                                           double weightIntersect,
                                           double weightFactor)
TODO

Parameters:
rowIndex - the rowIndex of the cell about which the statistics are returned
colIndex - the rowIndex of the cell about which the statistics are returned

regionUnivariateStatisticsCrossScale

public java.util.Vector regionUnivariateStatisticsCrossScale(Grid2DSquareCellDouble grid,
                                                             java.util.Vector statistics,
                                                             double distance,
                                                             double weightIntersept,
                                                             double weightFactor,
                                                             double scaleIntersept,
                                                             double scaleFactor,
                                                             Grid2DSquareCellDoubleFactory gridFactory)
TODO

Parameters:
scaleIntersept - typically a number between 0 and 1 which controls the weight applied at the initial scale
scaleFactor - = 0.0d all scales equally weighted > 0.0d means that the last scale has a zero weight < 0.0d means that the final scale has a weight of 1 > -1.0d && < 1.0d provides an inverse decay on scale weighting
gridFactory - the Abstract2DSquareCellDoubleFactory used to create grids

geometricDensity

public Grid2DSquareCellDouble[] geometricDensity(Grid2DSquareCellDouble grid,
                                                 double distance,
                                                 Grid2DSquareCellDoubleFactory gridFactory)
Returns an Grid2DSquareCellDouble[] containing geometric density surfaces at a range of scales: result[ 0 ] - is the result at the first scale ( double the cellsize of grid ) result[ 1 ] - if it exists is the result at the second scale ( double the cellsize of result[ 0 ] ) result[ n ] - if it exists is the result at the ( n + 1 )th scale ( double the cellsize of result[ n - 1 ] ) The algorithm used for generating a geometric density surface is described in: Turner A (2000) Density Data Generation for Spatial Data Mining Applications. http://www.geog.leeds.ac.uk/people/a.turner/papers/geocomp00/gc_017.htm

Parameters:
grid - - the input Grid2DSquareCellDouble
distance - - the distance limiting the maximum scale of geometric density surface produced
gridFactory - - the Grid2DSquareCellDoubleFactory to be used in processing

regionBivariateStatistics

public Grid2DSquareCellDouble[] regionBivariateStatistics(Grid2DSquareCellDouble grid0,
                                                          Grid2DSquareCellDouble grid1,
                                                          java.util.Vector statistics,
                                                          double distance,
                                                          double weightIntersect,
                                                          double weightFactor,
                                                          Grid2DSquareCellDoubleFactory gridFactory)
Returns an Grid2DSquareCellDouble[] result with elements based on statistics and values based on bivariate comparison of grid0 and grid1, distance, weightIntersect and weightFactor.

Parameters:
grid0 - the Grid2DSquareCellDouble to be regionBivariateStatisticsd with grid1
grid1 - the Grid2DSquareCellDouble to be regionBivariateStatisticsd with grid0
statistics - a String[] whose elements may be "diff", "abs", "corr1" , "corr2", "zscore". If they are then the respective Geographically Weighted Statistics (GWS) are returned in the result array
distance - the distance defining the region within which values will be used
weightIntersect - typically a number between 0 and 1 which controls the weight applied at the centre of the kernel
weightFactor - = 0.0d all values within distance will be equally weighted > 0.0d means the edge of the kernel has a zero weight < 0.0d means that the edage of the kernel has a weight of 1 > -1.0d && < 1.0d provides an inverse decay
gridFactory - the Abstract2DSquareCellDoubleFactory used to create grids TODO: Check and ensure that reasonable answers are returned for grids with different spatial frames. (NB. Sensibly the two grids being correlated should have the same no data space.)