NetTopologySuite
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
NetTopologySuite.IO.ShapefileDataReader Class Reference

Creates a IDataReader that can be used to enumerate through an ESRI shape file. More...

Inheritance diagram for NetTopologySuite.IO.ShapefileDataReader:

Classes

class  ShapefileDataReaderEnumerator
 
class  SLShapeFileDataEnumerator
 

Public Member Functions

 ShapefileDataReader (string filename, IGeometryFactory geometryFactory)
 Initializes a new instance of the ShapefileDataReader class. More...
 
void Reset ()
 
void Dispose ()
 
void Close ()
 Closes the IDataReader 0bject. More...
 
bool NextResult ()
 Advances the data reader to the next result, when reading the shapefile. More...
 
bool Read ()
 Advances the IDataReader to the next record. More...
 
DataTable GetSchemaTable ()
 Returns a DataTable that describes the column metadata of the IDataReader. More...
 
int GetInt32 (int i)
 
object GetValue (int i)
 
bool IsDBNull (int i)
 
long GetBytes (int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
 
byte GetByte (int i)
 
Type GetFieldType (int i)
 
decimal GetDecimal (int i)
 
int GetValues (object[] values)
 
string GetName (int i)
 
long GetInt64 (int i)
 
double GetDouble (int i)
 
bool GetBoolean (int i)
 
Guid GetGuid (int i)
 
DateTime GetDateTime (int i)
 
int GetOrdinal (string name)
 
string GetDataTypeName (int i)
 
float GetFloat (int i)
 
IDataReader GetData (int i)
 
long GetChars (int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
 
string GetString (int i)
 
char GetChar (int i)
 
short GetInt16 (int i)
 
IEnumerator GetEnumerator ()
 
 ShapefileDataReader (ISchemaFactory schemaFactory)
 
IEnumerator< IRecord > GetEnumerator ()
 
IMemoryRecordSet ToInMemorySet ()
 
IMemoryRecordSet ToInMemorySet (Expression< Func< IRecord, bool >> predicate)
 
bool Read ()
 Advances the IDataReader to the next record. More...
 

Properties

bool IsClosed [get]
 Gets a value indicating whether the data reader is closed. More...
 
IGeometry Geometry [get]
 Return geometry feature of the shapefile. More...
 
int RecordsAffected [get]
 Not applicable for this data reader. More...
 
int Depth [get]
 Always return a value of zero since nesting is not supported. More...
 
int RecordCount [get]
 Gets the numbers of records in the Shapefile. More...
 
object this[string name] [get]
 
object this[int i] [get]
 
int FieldCount [get]
 
ShapefileHeader ShapeHeader [get]
 Gets the header for the Shapefile. More...
 
DbaseFileHeader DbaseHeader [get]
 Gets the header for the Dbase file. More...
 
ISchemaFactory SchemaFactory [get, set]
 
IValueFactory ValueFactory [get]
 
ISchema Schema [get]
 

Detailed Description

Creates a IDataReader that can be used to enumerate through an ESRI shape file.

To create a ShapefileDataReader, use the static methods on the Shapefile class.

Constructor & Destructor Documentation

NetTopologySuite.IO.ShapefileDataReader.ShapefileDataReader ( string  filename,
IGeometryFactory  geometryFactory 
)

Initializes a new instance of the ShapefileDataReader class.

Parameters
filenameThe shapefile to read (minus the .shp extension)

param name="geometryFactory">The GeometryFactory to use.

Member Function Documentation

void NetTopologySuite.IO.ShapefileDataReader.Close ( )

Closes the IDataReader 0bject.

void NetTopologySuite.IO.ShapefileDataReader.Dispose ( )

bool NetTopologySuite.IO.ShapefileDataReader.GetBoolean ( int  i)

Parameters
i
Returns
byte NetTopologySuite.IO.ShapefileDataReader.GetByte ( int  i)

Parameters
i
Returns
long NetTopologySuite.IO.ShapefileDataReader.GetBytes ( int  i,
long  fieldOffset,
byte[]  buffer,
int  bufferoffset,
int  length 
)

Parameters
i
fieldOffset
buffer
bufferoffset
length
Returns
char NetTopologySuite.IO.ShapefileDataReader.GetChar ( int  i)

Parameters
i
Returns
long NetTopologySuite.IO.ShapefileDataReader.GetChars ( int  i,
long  fieldoffset,
char[]  buffer,
int  bufferoffset,
int  length 
)

Parameters
i
fieldoffset
buffer
bufferoffset
length
Returns
IDataReader NetTopologySuite.IO.ShapefileDataReader.GetData ( int  i)

Parameters
i
Returns
string NetTopologySuite.IO.ShapefileDataReader.GetDataTypeName ( int  i)

Parameters
i
Returns
DateTime NetTopologySuite.IO.ShapefileDataReader.GetDateTime ( int  i)

Parameters
i
Returns
decimal NetTopologySuite.IO.ShapefileDataReader.GetDecimal ( int  i)

Parameters
i
Returns
double NetTopologySuite.IO.ShapefileDataReader.GetDouble ( int  i)

Parameters
i
Returns
IEnumerator NetTopologySuite.IO.ShapefileDataReader.GetEnumerator ( )

Returns
Type NetTopologySuite.IO.ShapefileDataReader.GetFieldType ( int  i)

Parameters
i
Returns
float NetTopologySuite.IO.ShapefileDataReader.GetFloat ( int  i)

Parameters
i
Returns
Guid NetTopologySuite.IO.ShapefileDataReader.GetGuid ( int  i)

Parameters
i
Returns
short NetTopologySuite.IO.ShapefileDataReader.GetInt16 ( int  i)

Parameters
i
Returns
int NetTopologySuite.IO.ShapefileDataReader.GetInt32 ( int  i)

Parameters
i
Returns
long NetTopologySuite.IO.ShapefileDataReader.GetInt64 ( int  i)

Parameters
i
Returns
string NetTopologySuite.IO.ShapefileDataReader.GetName ( int  i)

Parameters
i
Returns
int NetTopologySuite.IO.ShapefileDataReader.GetOrdinal ( string  name)

Parameters
name
Returns
DataTable NetTopologySuite.IO.ShapefileDataReader.GetSchemaTable ( )

Returns a DataTable that describes the column metadata of the IDataReader.

Returns
A DataTable that describes the column metadata.
string NetTopologySuite.IO.ShapefileDataReader.GetString ( int  i)

Parameters
i
Returns
object NetTopologySuite.IO.ShapefileDataReader.GetValue ( int  i)

Parameters
i
Returns
int NetTopologySuite.IO.ShapefileDataReader.GetValues ( object[]  values)

Parameters
values
Returns
bool NetTopologySuite.IO.ShapefileDataReader.IsDBNull ( int  i)

Parameters
i
Returns
bool NetTopologySuite.IO.ShapefileDataReader.NextResult ( )

Advances the data reader to the next result, when reading the shapefile.

Returns
false
bool NetTopologySuite.IO.ShapefileDataReader.Read ( )

Advances the IDataReader to the next record.

Returns
true if there are more rows; otherwise, false.
bool NetTopologySuite.IO.ShapefileDataReader.Read ( )

Advances the IDataReader to the next record.

Returns
true if there are more rows; otherwise, false.

Property Documentation

DbaseFileHeader NetTopologySuite.IO.ShapefileDataReader.DbaseHeader
get

Gets the header for the Dbase file.

int NetTopologySuite.IO.ShapefileDataReader.Depth
get

Always return a value of zero since nesting is not supported.

The level of nesting.

The outermost table has a depth of zero.

int NetTopologySuite.IO.ShapefileDataReader.FieldCount
get

IGeometry NetTopologySuite.IO.ShapefileDataReader.Geometry
get

Return geometry feature of the shapefile.

bool NetTopologySuite.IO.ShapefileDataReader.IsClosed
get

Gets a value indicating whether the data reader is closed.

true if the data reader is closed; otherwise, false.

IsClosed and RecordsAffected are the only properties that you can call after the IDataReader is closed.

int NetTopologySuite.IO.ShapefileDataReader.RecordCount
get

Gets the numbers of records in the Shapefile.

int NetTopologySuite.IO.ShapefileDataReader.RecordsAffected
get

Not applicable for this data reader.

Always -1 for this data reader.

ShapefileHeader NetTopologySuite.IO.ShapefileDataReader.ShapeHeader
get

Gets the header for the Shapefile.

object NetTopologySuite.IO.ShapefileDataReader.this[int i]
get

Parameters
i
Returns
object NetTopologySuite.IO.ShapefileDataReader.this[string name]
get

Parameters
name
Returns

The documentation for this class was generated from the following files: