C# 클래스 Mapsui.Geometries.WellKnownText.GeometryFromWKT

Converts a Well-known Text representation to a Mapsui.Geometries.Geometry instance.

The Well-Known Text (WKT) representation of Geometry is designed to exchange geometry data in ASCII form.

Examples of WKT representations of geometry objects are: Geometry WKT Representation A Point POINT(15 20)
Note that point coordinates are specified with no separating comma.
A LineString with four points: LINESTRING(0 0, 10 10, 20 25, 50 60) A Polygon with one exterior ring and one interior ring: POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7, 5 5)) A MultiPoint with three Point values: MULTIPOINT(0 0, 20 20, 60 60) A MultiLineString with two LineString values: MULTILINESTRING((10 10, 20 20), (15 15, 30 15)) A MultiPolygon with two Polygon values: MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((5 5,7 5,7 7,5 7, 5 5))) A GeometryCollection consisting of two Point values and one LineString: GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))
파일 보기 프로젝트 열기: pauldendulk/Mapsui

공개 메소드들

메소드 설명
Parse ( TextReader reader ) : Geometry

Converts a Well-known Text representation to a Mapsui.Geometries.Geometry.

Parse ( string wellKnownText ) : Geometry

Converts a Well-known text representation to a Mapsui.Geometries.Geometry.

비공개 메소드들

메소드 설명
GetCoordinates ( WktStreamTokenizer tokenizer ) : Collection

Returns the next array of Coordinates in the stream.

GetNextCloser ( WktStreamTokenizer tokenizer ) : void

Returns the next ")" in the stream.

ParseException is thrown if the next token is not ")".

GetNextCloserOrComma ( WktStreamTokenizer tokenizer ) : string

Returns the next ")" or "," in the stream.

ParseException is thrown if the next token is not ")" or ",".

GetNextEmptyOrOpener ( WktStreamTokenizer tokenizer ) : string

Returns the next "EMPTY" or "(" in the stream as uppercase text.

ParseException is thrown if the next token is not "EMPTY" or "(".

GetNextNumber ( WktStreamTokenizer tokenizer ) : double

Returns the next number in the stream.

ParseException is thrown if the next token is not a number.

GetNextWord ( WktStreamTokenizer tokenizer ) : string

Returns the next word in the stream as uppercase text.

Exception is thrown if the next token is not a word.

ReadGeometryCollectionText ( WktStreamTokenizer tokenizer ) : GeometryCollection

Creates a GeometryCollection using the next token in the stream.

ReadGeometryTaggedText ( WktStreamTokenizer tokenizer ) : Geometry

Creates a Geometry using the next token in the stream.

Exception is thrown if the coordinates used to create a Polygon shell and holes do not form closed linestrings, or if an unexpected token is encountered.

ReadLineStringText ( WktStreamTokenizer tokenizer ) : LineString

Creates a LineString using the next token in the stream.

ParseException is thrown if an unexpected token is encountered.

ReadMultiLineStringText ( WktStreamTokenizer tokenizer ) : MultiLineString

Creates a MultiLineString using the next token in the stream.

ReadMultiPointText ( WktStreamTokenizer tokenizer ) : MultiPoint

Creates a Point using the next token in the stream.

ParseException is thrown if an unexpected token is encountered.

ReadMultiPolygonText ( WktStreamTokenizer tokenizer ) : MultiPolygon

Creates a MultiPolygon using the next token in the stream.

ReadPointText ( WktStreamTokenizer tokenizer ) : System.Point

Creates a Point using the next token in the stream.

ParseException is thrown if an unexpected token is encountered.

ReadPolygonText ( WktStreamTokenizer tokenizer ) : Polygon

Creates a Polygon using the next token in the stream.

ParseException is thown if the coordinates used to create the Polygon shell and holes do not form closed linestrings, or if an unexpected token is encountered.

메소드 상세

Parse() 공개 정적인 메소드

Converts a Well-known Text representation to a Mapsui.Geometries.Geometry.
public static Parse ( TextReader reader ) : Geometry
reader System.IO.TextReader /// A Reader which will return a Geometry Tagged Text /// string (see the OpenGIS Simple Features Specification) ///
리턴 Geometry

Parse() 공개 정적인 메소드

Converts a Well-known text representation to a Mapsui.Geometries.Geometry.
public static Parse ( string wellKnownText ) : Geometry
wellKnownText string /// A tagged text string ( see the OpenGIS Simple /// Features Specification. ///
리턴 Geometry