com.c5corp.DEMconvert.filters
Class Dem2C5PointStats

java.lang.Object
  extended by com.c5corp.DEMconvert.C5DemAbstractFilter
      extended by com.c5corp.DEMconvert.filters.Dem2C5PointStats
All Implemented Interfaces:
C5DemConstants

public final class Dem2C5PointStats
extends C5DemAbstractFilter
implements C5DemConstants

Dem2C5PointStats.java - part of C5 Landscape (C5UTM) database

Dem2C5PointStats is a C5 DEM Tool filter that processes a dem to update the C5UTM database, using java JDBC.

Dem2C5PointStats adds data to the C5UTM db UTM_POINT_STATS table, copying and processing data from a dem file directly for performance.

The purpose of this filter is to preprocess into the database as much data as is possible directly from the dem files, which is faster than getting the same data back out of the database's UTM_COORD table, thus helping to build the UTM_POINT_STATS table in more reasonable time.

Once run over a dem, this filter will set the DEM_METADATA.point_stats attribute to level 1, or "partially processed". Level one indicates that the dem's complete 1K grid areas (the 1K grid around each point) have been processed.

This filter can be executed as a batch over all available dems via the com.c5corp.c5utm.util.BuildPointStatsFromFiles class (main method). The com.c5corp.c5utm.util.BuildPointStatsFromDb utility should be used to process the the overlaping areas shared between dems. (1K areas with points in adjacent dems). This filter does not interpolate 10 meter data to 30 meter data, thus those dems originally in 10 meter format must be fully processed with Build1KGridFromDb.

The com.c5corp.c5utm.util.Build1KGridStats utility will execute these utilities wisely, using the DEM_METADATA.point_stats as a guide.

Refer to sql directory for info on the data model.

Since:
1.0.3
Author:
Brett Stalbaum Copyright 2002-2006 see LICENSE.txt and UCSD_LICENSE.txt
See Also:
BuildPointStatsFromFiles, BuildPointStatsFromDb, BuildPointStats, C5UTMconfs

Field Summary
 
Fields inherited from interface com.c5corp.c5dem.C5DemConstants
copy, E_BIT, FEETTOMETERS, hdatum, METERSTOFEET, N_BIT, NE_BIT, NW_BIT, S_BIT, SE_BIT, SW_BIT, system, units, vdatum, W_BIT
 
Constructor Summary
Dem2C5PointStats()
          Default constuctor, required by the newInstance() method of the Class class, such that this class can be dynamically loaded.
Dem2C5PointStats(java.lang.String filename)
          Builds tables from the specified file name.
 
Method Summary
 java.lang.String getFilterInfo()
          A method that returns a string containing information about the filter.
 java.lang.String getOutputPath()
          Returns a relative path describing the location of the output.
static void main(java.lang.String[] args)
           
 void setOutputPath(java.lang.String path)
          sets the path to the output file
 java.lang.String toString()
          overrides java.lang.Object.toString()
 void writeData(Dem dem, java.io.PrintWriter out)
          A method to write the output data to the (database).
 void writeHeader(Dem dem, java.io.PrintWriter out)
          A method for output of metadata
 
Methods inherited from class com.c5corp.DEMconvert.C5DemAbstractFilter
openOutputFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Dem2C5PointStats

public Dem2C5PointStats()
Default constuctor, required by the newInstance() method of the Class class, such that this class can be dynamically loaded.


Dem2C5PointStats

public Dem2C5PointStats(java.lang.String filename)
Builds tables from the specified file name. Can be invoked from the command line.

Parameters:
filename - the filename
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args - main

writeHeader

public void writeHeader(Dem dem,
                        java.io.PrintWriter out)
Description copied from class: C5DemAbstractFilter
A method for output of metadata

Specified by:
writeHeader in class C5DemAbstractFilter
Parameters:
dem - A Dem.
out - Where to write the data.

writeData

public void writeData(Dem dem,
                      java.io.PrintWriter out)
A method to write the output data to the (database). (overrides C5DemAbstractFilter)

Specified by:
writeData in class C5DemAbstractFilter
Parameters:
dem - A Dem.
out - Where to write the data.

getFilterInfo

public java.lang.String getFilterInfo()
A method that returns a string containing information about the filter.

Specified by:
getFilterInfo in class C5DemAbstractFilter
Returns:
the string info about the filter

getOutputPath

public java.lang.String getOutputPath()
Returns a relative path describing the location of the output.

Overrides:
getOutputPath in class C5DemAbstractFilter
Returns:
the output file path

setOutputPath

public void setOutputPath(java.lang.String path)
sets the path to the output file

Parameters:
path - the output path

toString

public java.lang.String toString()
overrides java.lang.Object.toString()

Overrides:
toString in class C5DemAbstractFilter