Class WKBHexFileReader
Reads a sequence of {@link Geometry}s in WKBHex format from a text file. Each WKBHex geometry must be on a single line The geometries in the file may be separated by any amount of whitespace and newlines.
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.dll
Syntax
public class WKBHexFileReader
Constructors
| Improve this Doc View SourceWKBHexFileReader(WKBReader)
Creates a new WKBHexFileReader given the WKBReader to use to parse the geometries.
Declaration
public WKBHexFileReader(WKBReader wkbReader)
Parameters
Type | Name | Description |
---|---|---|
WKBReader | wkbReader | The geometry reader to use |
Properties
| Improve this Doc View SourceLimit
Gets or sets a value indicating the maximum number of geometries to read
Declaration
public int Limit { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Offset
Gets or sets the number of geometries to skip before storing.
Declaration
public int Offset { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceRead(Stream)
Reads a sequence of geometries.
If an Offset is specified, geometries read up to the offset count are skipped.
If a Limit is specified, no more than Limit geometries are read.
Declaration
public ReadOnlyCollection<Geometry> Read(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The path to the file |
Returns
Type | Description |
---|---|
ReadOnlyCollection<Geometry> |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if no stream was passed |
ArgumentException | Thrown if passed stream is not readable or seekable |
IOException | Thrown if an I/O exception was encountered |
ParseException | Thrown if an error occured reading a geometry |
Read(String)
Reads a sequence of geometries.
If an Offset is specified, geometries read up to the offset count are skipped.
If a Limit is specified, no more than Limit geometries are read.
Declaration
public ReadOnlyCollection<Geometry> Read(string file)
Parameters
Type | Name | Description |
---|---|---|
String | file | The path to the file |
Returns
Type | Description |
---|---|
ReadOnlyCollection<Geometry> |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if no filename was specified |
FileNotFoundException | Thrown if the filename specified does not exist |
IOException | Thrown if an I/O exception was encountered |
ParseException | Thrown if an error occurred reading a geometry |