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

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
      extended by uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessorGWS

public class Grid2DSquareCellProcessorGWS
extends Grid2DSquareCellProcessor

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


Field Summary
 
Fields inherited from class uk.ac.leeds.ccg.andyt.grids.process.Grid2DSquareCellProcessor
_Directory, _Grid2DSquareCellDoubleChunk64CellMapFactory, _Grid2DSquareCellDoubleChunkArrayFactory, _Grid2DSquareCellDoubleChunkFactory, _Grid2DSquareCellDoubleChunkJAIFactory, _Grid2DSquareCellDoubleChunkMapFactory, _Grid2DSquareCellDoubleChunkRAFFactory, _Grid2DSquareCellDoubleFactory, _Grid2DSquareCellIntChunk64CellMapFactory, _Grid2DSquareCellIntChunkArrayFactory, _Grid2DSquareCellIntChunkJAIFactory, _Grid2DSquareCellIntChunkMapFactory, _Grid2DSquareCellIntChunkRAFFactory, _Grid2DSquareCellIntFactory, _Grid2DSquareCelllIntChunkFactory, _GridStatistics, _GridStatistics0, _GridStatistics1, log, logIndentation, startTime
 
Constructor Summary
Grid2DSquareCellProcessorGWS()
          Creates a new Grid2DSquareCellDoubleProcessorGWS
Grid2DSquareCellProcessorGWS(java.io.File workspace)
          Creates a new instance of Grid2DSquareCellProcessorGWS.
Grid2DSquareCellProcessorGWS(java.io.File workspace, boolean appendToLogFile)
          Creates a new instance of Grid2DSquareCellProcessorGWS.
Grid2DSquareCellProcessorGWS(Grids_Environment _Grids_Environment)
           
 
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.List<AbstractGrid2DSquareCell> regionUnivariateStatistics(Grid2DSquareCellDouble grid, java.util.List<java.lang.String> 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.List<AbstractGrid2DSquareCell> regionUnivariateStatisticsSlow(Grid2DSquareCellDouble grid, java.util.List<java.lang.String> 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
_Output, _OutputESRIAsciiGrid, _OutputImage, _Rescale, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, addToGrid, aggregate, aggregate, angle, angle, angle, copyAndSetUpNewLog, distance, distance, distance, get_Directory, getGrid2DSquareCell, getGrid2DSquareCell, getRowProcessData, getRowProcessInitialData, getTime0, getTime0, log, log, log, mask, mask, mask, mask, set_Directory, set_Directory, set_Directory, setValueALittleBitLarger, setValueALittleBitSmaller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grid2DSquareCellProcessorGWS

public Grid2DSquareCellProcessorGWS()
                             throws java.io.IOException
Creates a new Grid2DSquareCellDoubleProcessorGWS

Throws:
java.io.IOException

Grid2DSquareCellProcessorGWS

public Grid2DSquareCellProcessorGWS(Grids_Environment _Grids_Environment)

Grid2DSquareCellProcessorGWS

public Grid2DSquareCellProcessorGWS(java.io.File workspace)
                             throws java.io.IOException
Creates a new instance of Grid2DSquareCellProcessorGWS. By default the logs are appended to the end of the log file if it exists. To overwrite the log file use: Grid2DSquareCellDoubleProcessor( workspace, false );

Parameters:
workspace -
Throws:
java.io.IOException

Grid2DSquareCellProcessorGWS

public Grid2DSquareCellProcessorGWS(java.io.File workspace,
                                    boolean appendToLogFile)
                             throws java.io.IOException
Creates a new instance of Grid2DSquareCellProcessorGWS. The log file in workspace will be overwritten if appendToLogFile is false.

Parameters:
workspace -
appendToLogFile -
Throws:
java.io.IOException
Method Detail

regionUnivariateStatistics

public java.util.List<AbstractGrid2DSquareCell> regionUnivariateStatistics(Grid2DSquareCellDouble grid,
                                                                           java.util.List<java.lang.String> 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.List<AbstractGrid2DSquareCell> regionUnivariateStatisticsSlow(Grid2DSquareCellDouble grid,
                                                                               java.util.List<java.lang.String> 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: - weightFactor = 0.0d all values within distance will be equally weighted; weightFactor > 0.0d means the edge of the kernel has a zero weight; weightFactor < 0.0d means that the edage of the kernel has a weight of 1; weightFactor > -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.)