Search Results for

    Show / Hide Table of Contents

    Class WKTFileReader

    Reads a sequence of Geometrys in WKT format from a text file.

    Inheritance
    object
    WKTFileReader
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.IO
    Assembly: NetTopologySuite.dll
    Syntax
    public class WKTFileReader
    Remarks

    The geometries in the file may be separated by any amount of whitespace and newlines.

    Constructors

    | Edit this page View Source

    WKTFileReader(FileInfo, WKTReader)

    Creates a new WKTFileReader given the file to read from and a WKTReader to use to parse the geometries.

    Declaration
    public WKTFileReader(FileInfo file, WKTReader wktReader)
    Parameters
    Type Name Description
    FileInfo file

    the FileInfo to read from

    WKTReader wktReader

    the geometry reader to use

    | Edit this page View Source

    WKTFileReader(Stream, WKTReader)

    Creates a new WKTFileReader, given a Stream to read from.

    Declaration
    public WKTFileReader(Stream stream, WKTReader wktReader)
    Parameters
    Type Name Description
    Stream stream

    The stream to read from

    WKTReader wktReader

    The geometry reader to use

    | Edit this page View Source

    WKTFileReader(TextReader, WKTReader)

    Creates a new WKTFileReader, given a TextReader to read with.

    Declaration
    public WKTFileReader(TextReader reader, WKTReader wktReader)
    Parameters
    Type Name Description
    TextReader reader

    The stream reader of the file to read from

    WKTReader wktReader

    The geometry reader to use

    | Edit this page View Source

    WKTFileReader(string, WKTReader)

    Creates a new WKTFileReader, given the name of the file to read from.

    Declaration
    public WKTFileReader(string filename, WKTReader wktReader)
    Parameters
    Type Name Description
    string filename

    The name of the file to read from

    WKTReader wktReader

    The geometry reader to use

    Properties

    | Edit this page View Source

    Limit

    Gets/Sets the maximum number of geometries to read.

    Declaration
    public int Limit { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Offset

    Gets/Sets the number of geometries to skip before reading.

    Declaration
    public int Offset { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    StrictParsing

    Gets/Sets allow ignoring WKT parse errors after at least one geometry has been read, to return a partial result.

    Declaration
    public bool StrictParsing { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    Read()

    Reads a sequence of geometries.

    Declaration
    public IList<Geometry> Read()
    Returns
    Type Description
    IList<Geometry>

    The list of geometries read

    Remarks

    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.

    Exceptions
    Type Condition
    IOException

    Thrown if an I/O exception was encountered

    ParseException

    Thrown if an error occurred reading a geometry

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX