C# 클래스 Azavea.NijPredictivePolicing.ACSAlchemistLibrary.FileFormats.ShapefileHelper

This class contains a number of small utilities to simplify the use of shapefiles in the importer
파일 보기 프로젝트 열기: azavea/acs-alchemist 1 사용 예제들

공개 메소드들

메소드 설명
AddColumn ( GisSharpBlog.NetTopologySuite.IO.DbaseFileHeader header, string columnName, Type t ) : void

Helper function for SetupHeader, correctly maps C# data types to DbaseFileHeader types

GetGeomFactory ( ) : GisSharpBlog.NetTopologySuite.Geometries.GeometryFactory

Constructs the default GeometryFactory for 4269 (census projection)

GetRemoteShapefileURL ( BoundaryLevels level, string stateFips ) : string

Helper function for constructing the correct census URL for a particular Boundary Level / State

GetSchema ( SqliteDataClient client ) : DataTable

Helper function for checking structure of existing Db

ImportShapefile ( DbConnection conn, IDataClient client, string filename, string tableName, int srid ) : bool

Imports the provided shapefile into a sqlite database using the VirtualShape extension

IsForbiddenShapefileName ( string name ) : bool

Checks to make sure a given table name doesn't conflict with any of the census shapefiles

LoadShapefile ( string filename, string tableName, IDataClient DbClient, ICoordinateSystem &CRS ) : bool

Imports a shapefile into the database. Do not use this to load census shapefiles.

MakeCensusProjFile ( string filename ) : bool

Generates a proj file for a given shapefile if it's missing

MakeOutputProjFile ( string sourceProjectionFilename, string destShapefilename ) : bool

Copies an existing .prj file next to an existing shapefile (with correct destination name)

OpenShapefile ( string filename, string tableName ) : bool

Helper function for testing the shapefile importer

SetupHeader ( DataTable table ) : GisSharpBlog.NetTopologySuite.IO.DbaseFileHeader

Consumes an ADO.net datatable and correctly initializes a Shapefile header object

메소드 상세

AddColumn() 공개 정적인 메소드

Helper function for SetupHeader, correctly maps C# data types to DbaseFileHeader types
public static AddColumn ( GisSharpBlog.NetTopologySuite.IO.DbaseFileHeader header, string columnName, Type t ) : void
header GisSharpBlog.NetTopologySuite.IO.DbaseFileHeader
columnName string
t System.Type
리턴 void

GetGeomFactory() 공개 정적인 메소드

Constructs the default GeometryFactory for 4269 (census projection)
public static GetGeomFactory ( ) : GisSharpBlog.NetTopologySuite.Geometries.GeometryFactory
리턴 GisSharpBlog.NetTopologySuite.Geometries.GeometryFactory

GetRemoteShapefileURL() 공개 정적인 메소드

Helper function for constructing the correct census URL for a particular Boundary Level / State
public static GetRemoteShapefileURL ( BoundaryLevels level, string stateFips ) : string
level BoundaryLevels
stateFips string
리턴 string

GetSchema() 공개 정적인 메소드

Helper function for checking structure of existing Db
public static GetSchema ( SqliteDataClient client ) : DataTable
client SqliteDataClient
리턴 System.Data.DataTable

ImportShapefile() 공개 정적인 메소드

Imports the provided shapefile into a sqlite database using the VirtualShape extension
public static ImportShapefile ( DbConnection conn, IDataClient client, string filename, string tableName, int srid ) : bool
conn System.Data.Common.DbConnection
client IDataClient
filename string
tableName string
srid int
리턴 bool

IsForbiddenShapefileName() 공개 정적인 메소드

Checks to make sure a given table name doesn't conflict with any of the census shapefiles
public static IsForbiddenShapefileName ( string name ) : bool
name string
리턴 bool

LoadShapefile() 공개 정적인 메소드

Imports a shapefile into the database. Do not use this to load census shapefiles.
public static LoadShapefile ( string filename, string tableName, IDataClient DbClient, ICoordinateSystem &CRS ) : bool
filename string The path of the file to import
tableName string
DbClient IDataClient The database to load the file into
CRS ICoordinateSystem
리턴 bool

MakeCensusProjFile() 공개 정적인 메소드

Generates a proj file for a given shapefile if it's missing
public static MakeCensusProjFile ( string filename ) : bool
filename string
리턴 bool

MakeOutputProjFile() 공개 정적인 메소드

Copies an existing .prj file next to an existing shapefile (with correct destination name)
public static MakeOutputProjFile ( string sourceProjectionFilename, string destShapefilename ) : bool
sourceProjectionFilename string
destShapefilename string
리턴 bool

OpenShapefile() 공개 정적인 메소드

Helper function for testing the shapefile importer
public static OpenShapefile ( string filename, string tableName ) : bool
filename string
tableName string
리턴 bool

SetupHeader() 공개 정적인 메소드

Consumes an ADO.net datatable and correctly initializes a Shapefile header object
public static SetupHeader ( DataTable table ) : GisSharpBlog.NetTopologySuite.IO.DbaseFileHeader
table System.Data.DataTable
리턴 GisSharpBlog.NetTopologySuite.IO.DbaseFileHeader