C# 클래스 Azavea.NijPredictivePolicing.ACSAlchemistLibrary.Transfer.AcsDataManager

This class does most of the heavy lifting of the ACS Alchemist
상속: IDisposable
파일 보기 프로젝트 열기: azavea/acs-alchemist 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
AddGeometryAttributesToOutput bool
AddStrippedGEOIDcolumn bool
CurrentDataPath string
DBFilename string
DbClient IDataClient
DesiredVariablesFilename string
ExportFilterFilename string
GridCellHeight double
GridCellWidth double
GridEnvelopeFilename string
IncludeEmptyGridCells bool
OutputFolder string
OutputProjectionFilename string
PreserveJam bool
ReusePreviousJobTable bool
ShapePath string
State AcsState
WorkingPath string

보호된 프로퍼티들

프로퍼티 타입 설명
_cancelled bool
_summaryLevel string

공개 메소드들

메소드 설명
AcsDataManager ( ) : System
AcsDataManager ( AcsState aState ) : System
AcsDataManager ( AcsState aState, string workingFolder, string year ) : System
Cancel ( ) : void
CheckAllGeometriesFile ( ) : bool

Downloads the census DATA for the given state

CheckBlockGroupFile ( ) : bool

Downloads the census DATA for the given state

CheckBuildVariableTable ( string tableName ) : bool

Gets the filtered LogicalRecordNumbers, and the requested variables, and builds a table of their crossjoin

CheckCensusAggregatedDataFile ( ) : bool
CheckColumnMappingsFile ( ) : bool
CheckDatabase ( ) : bool

Checks to see if the database exists, and if not, initializes it with the provided inputs

CheckShapefiles ( ) : bool

Downloads the SHAPE FILEs, must be run before initializing the database! Since this will be imported into the database!

CreateColumnMappingsTable ( DbConnection conn ) : bool
CreateGeographiesTable ( DbConnection conn ) : bool
Dispose ( ) : void
DownloadAndImportShapefile ( string desiredUrl, string destFilepath, string niceName, string tablename ) : bool

Helper function for retrieving a given zip file from a URL, decompressing it, finding a shapefile in it, and importing that into the database

ExportGriddedShapefile ( string tableName ) : bool

Retrieves the contents of the specified table, and writes them to a shapefile

ExportShapefile ( string tableName ) : bool

Retrieves the contents of the specified table, and writes them to a shapefile

GetAggregateDataPath ( ) : string

Gets either the standard data path based on year, or appends an 'all' if we're not doing tracts or block-groups

GetAllSequenceVariables ( ) : DataTable

Returns all the variable names in the columnMappings table

GetFilteredLRUs ( DbConnection conn ) : HashSet
GetFilteringGeometries ( string filename, ICoordinateSystem outputCrs ) : List
GetGeographyTablename ( ) : string
GetGeometryRowKeyGenerator ( ) : GetGeometryRowKey
GetGridEnvelope ( ) : GisSharpBlog.NetTopologySuite.Geometries.Envelope
GetLocalAllGeometriesZipFileName ( ) : string
GetLocalBlockGroupZipFileName ( ) : string
GetLocalColumnMappingsDirectory ( ) : string
GetLocalGeographyFileName ( ) : string
GetRequestedVariables ( DbConnection conn ) : DataTable

Currently rebuilds the requested variables table every time

GetShapeFeaturesToExport ( string tableName, bool spatialFilter ) : List

Given a table, returns a list of features to export. Assumes table geometries are in WGS84

Init ( ) : void

Initialize our properties, and ensure our path structure is intact

IsCancelled ( ) : bool
IsIncluded ( IGeometry geom, List filteringGeoms ) : bool
SetGridParam ( string gridArgs ) : void

보호된 메소드들

메소드 설명
GetShapeRowsByLOGRECNO ( DbConnection conn ) : DataRow>.Dictionary
InitDatabase ( ) : bool

Call this anyway, should only execute code inside safe blocks

메소드 상세

AcsDataManager() 공개 메소드

public AcsDataManager ( ) : System
리턴 System

AcsDataManager() 공개 메소드

public AcsDataManager ( AcsState aState ) : System
aState AcsState
리턴 System

AcsDataManager() 공개 메소드

public AcsDataManager ( AcsState aState, string workingFolder, string year ) : System
aState AcsState
workingFolder string
year string
리턴 System

Cancel() 공개 메소드

public Cancel ( ) : void
리턴 void

CheckAllGeometriesFile() 공개 메소드

Downloads the census DATA for the given state
public CheckAllGeometriesFile ( ) : bool
리턴 bool

CheckBlockGroupFile() 공개 메소드

Downloads the census DATA for the given state
public CheckBlockGroupFile ( ) : bool
리턴 bool

CheckBuildVariableTable() 공개 메소드

Gets the filtered LogicalRecordNumbers, and the requested variables, and builds a table of their crossjoin
public CheckBuildVariableTable ( string tableName ) : bool
tableName string
리턴 bool

CheckCensusAggregatedDataFile() 공개 메소드

public CheckCensusAggregatedDataFile ( ) : bool
리턴 bool

CheckColumnMappingsFile() 공개 메소드

public CheckColumnMappingsFile ( ) : bool
리턴 bool

CheckDatabase() 공개 메소드

Checks to see if the database exists, and if not, initializes it with the provided inputs
public CheckDatabase ( ) : bool
리턴 bool

CheckShapefiles() 공개 메소드

Downloads the SHAPE FILEs, must be run before initializing the database! Since this will be imported into the database!
public CheckShapefiles ( ) : bool
리턴 bool

CreateColumnMappingsTable() 공개 메소드

public CreateColumnMappingsTable ( DbConnection conn ) : bool
conn System.Data.Common.DbConnection
리턴 bool

CreateGeographiesTable() 공개 메소드

public CreateGeographiesTable ( DbConnection conn ) : bool
conn System.Data.Common.DbConnection
리턴 bool

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

DownloadAndImportShapefile() 공개 메소드

Helper function for retrieving a given zip file from a URL, decompressing it, finding a shapefile in it, and importing that into the database
public DownloadAndImportShapefile ( string desiredUrl, string destFilepath, string niceName, string tablename ) : bool
desiredUrl string
destFilepath string
niceName string
tablename string
리턴 bool

ExportGriddedShapefile() 공개 메소드

Retrieves the contents of the specified table, and writes them to a shapefile
public ExportGriddedShapefile ( string tableName ) : bool
tableName string
리턴 bool

ExportShapefile() 공개 메소드

Retrieves the contents of the specified table, and writes them to a shapefile
public ExportShapefile ( string tableName ) : bool
tableName string
리턴 bool

GetAggregateDataPath() 공개 메소드

Gets either the standard data path based on year, or appends an 'all' if we're not doing tracts or block-groups
public GetAggregateDataPath ( ) : string
리턴 string

GetAllSequenceVariables() 공개 메소드

Returns all the variable names in the columnMappings table
public GetAllSequenceVariables ( ) : DataTable
리턴 System.Data.DataTable

GetFilteredLRUs() 공개 메소드

public GetFilteredLRUs ( DbConnection conn ) : HashSet
conn System.Data.Common.DbConnection
리턴 HashSet

GetFilteringGeometries() 공개 메소드

public GetFilteringGeometries ( string filename, ICoordinateSystem outputCrs ) : List
filename string
outputCrs ICoordinateSystem
리턴 List

GetGeographyTablename() 공개 메소드

public GetGeographyTablename ( ) : string
리턴 string

GetGeometryRowKeyGenerator() 공개 메소드

public GetGeometryRowKeyGenerator ( ) : GetGeometryRowKey
리턴 GetGeometryRowKey

GetGridEnvelope() 공개 메소드

public GetGridEnvelope ( ) : GisSharpBlog.NetTopologySuite.Geometries.Envelope
리턴 GisSharpBlog.NetTopologySuite.Geometries.Envelope

GetLocalAllGeometriesZipFileName() 공개 메소드

public GetLocalAllGeometriesZipFileName ( ) : string
리턴 string

GetLocalBlockGroupZipFileName() 공개 메소드

public GetLocalBlockGroupZipFileName ( ) : string
리턴 string

GetLocalColumnMappingsDirectory() 공개 메소드

public GetLocalColumnMappingsDirectory ( ) : string
리턴 string

GetLocalGeographyFileName() 공개 메소드

public GetLocalGeographyFileName ( ) : string
리턴 string

GetRequestedVariables() 공개 메소드

Currently rebuilds the requested variables table every time
public GetRequestedVariables ( DbConnection conn ) : DataTable
conn System.Data.Common.DbConnection
리턴 System.Data.DataTable

GetShapeFeaturesToExport() 공개 메소드

Given a table, returns a list of features to export. Assumes table geometries are in WGS84
public GetShapeFeaturesToExport ( string tableName, bool spatialFilter ) : List
tableName string Name of the sqlite table
spatialFilter bool Should we load and use a spatial filter?
리턴 List

GetShapeRowsByLOGRECNO() 보호된 메소드

protected GetShapeRowsByLOGRECNO ( DbConnection conn ) : DataRow>.Dictionary
conn System.Data.Common.DbConnection
리턴 DataRow>.Dictionary

Init() 공개 메소드

Initialize our properties, and ensure our path structure is intact
public Init ( ) : void
리턴 void

InitDatabase() 보호된 메소드

Call this anyway, should only execute code inside safe blocks
protected InitDatabase ( ) : bool
리턴 bool

IsCancelled() 공개 메소드

public IsCancelled ( ) : bool
리턴 bool

IsIncluded() 공개 메소드

public IsIncluded ( IGeometry geom, List filteringGeoms ) : bool
geom IGeometry
filteringGeoms List
리턴 bool

SetGridParam() 공개 메소드

public SetGridParam ( string gridArgs ) : void
gridArgs string
리턴 void

프로퍼티 상세

AddGeometryAttributesToOutput 공개적으로 프로퍼티

If true, this feature will add a number of columns to the end of the export with calculated values about the projected geometries Area, Perimeter, and Centroid It should also truncate requested variables to make sure things fit, but should warn the user.
public bool AddGeometryAttributesToOutput
리턴 bool

AddStrippedGEOIDcolumn 공개적으로 프로퍼티

If true, add column GEOID_STRP to the shapefile output with values the same as GEOID except without the "15000US" prefix
public bool AddStrippedGEOIDcolumn
리턴 bool

CurrentDataPath 공개적으로 프로퍼티

public string CurrentDataPath
리턴 string

DBFilename 공개적으로 프로퍼티

public string DBFilename
리턴 string

DbClient 공개적으로 프로퍼티

public IDataClient DbClient
리턴 IDataClient

DesiredVariablesFilename 공개적으로 프로퍼티

If set, the manager will read in as a CSV, and import the variable values into the provided job table
public string DesiredVariablesFilename
리턴 string

ExportFilterFilename 공개적으로 프로퍼티

If set, the manager will look for a file of WKTs that it will use to ensure all exported geometries at least intersect
public string ExportFilterFilename
리턴 string

GridCellHeight 공개적으로 프로퍼티

public double GridCellHeight
리턴 double

GridCellWidth 공개적으로 프로퍼티

public double GridCellWidth
리턴 double

GridEnvelopeFilename 공개적으로 프로퍼티

If set, the manager will use this envelope while calculating the export grid (minx, miny, maxx, maxy)
public string GridEnvelopeFilename
리턴 string

IncludeEmptyGridCells 공개적으로 프로퍼티

public bool IncludeEmptyGridCells
리턴 bool

OutputFolder 공개적으로 프로퍼티

public string OutputFolder
리턴 string

OutputProjectionFilename 공개적으로 프로퍼티

public string OutputProjectionFilename
리턴 string

PreserveJam 공개적으로 프로퍼티

public bool PreserveJam
리턴 bool

ReusePreviousJobTable 공개적으로 프로퍼티

If set, the manager will re-use a previous job with the same name, instead of replacing it
public bool ReusePreviousJobTable
리턴 bool

ShapePath 공개적으로 프로퍼티

public string ShapePath
리턴 string

State 공개적으로 프로퍼티

Selected State
public AcsState State
리턴 AcsState

WorkingPath 공개적으로 프로퍼티

public string WorkingPath
리턴 string

_cancelled 보호되어 있는 프로퍼티

protected bool _cancelled
리턴 bool

_summaryLevel 보호되어 있는 프로퍼티

protected string _summaryLevel
리턴 string