Skip to content

Latest commit

 

History

History
1262 lines (779 loc) · 70.9 KB

contents.md

File metadata and controls

1262 lines (779 loc) · 70.9 KB

Contents #

ArcGISRuntimeWKT # =

Algorithms # =

Namespace

ArcGISRuntimeWKT.Utilities

IsCcw(ring) method # =

Summary

Tests whether a ring is oriented counter-clockwise.

Returns

Returns true if ring is oriented counter-clockwise.

Parameters
Name Type Description
ring System.Collections.Generic.List{Esri.ArcGISRuntime.Geometry.MapPoint} Ring to test.

GeometryFromWkbUtils # =

Namespace

ArcGISRuntimeWKT

Summary

Converts Well-known Binary representations to a Geometry instance.

Remarks

The Well-known Binary Representation for Geometry (WKBGeometry) provides a portable representation of a Geometry value as a contiguous stream of bytes. It permits Geometry values to be exchanged between an ODBC client and an SQL database in binary form.

The Well-known Binary Representation for Geometry is obtained by serializing a Geometry instance as a sequence of numeric types drawn from the set {Unsigned Integer, Double} and then serializing each numeric type as a sequence of bytes using one of two well defined, standard, binary representations for numeric types (NDR, XDR). The specific binary encoding (NDR or XDR) used for a geometry byte stream is described by a one byte tag that precedes the serialized bytes. The only difference between the two encodings of geometry is one of byte order, the XDR encoding is Big Endian, the NDR encoding is Little Endian.

Parse(reader) method # =

Summary

Creates a Geometry based on the Well-known binary representation.

Returns

A Geometry based on the Well-known binary representation.

Parameters
Name Type Description
reader System.IO.BinaryReader A BinaryReader used to read the Well-known binary representation.

GeometryFromWktUtils # =

Namespace

ArcGISRuntimeWKT

Summary

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

Remarks

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:

GetCoordinates(tokenizer) method # =

Summary

Returns the next array of Coordinates in the stream.

Returns

The next array of Coordinates in the stream, or an empty array of "EMPTY" is the next element returned by the stream.

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known Text format. The next element returned by the stream should be "(" (the beginning of "(x1 y1, x2 y2, ..., xn yn)" or "EMPTY".

GetNextCloser(tokenizer) method # =

Summary

Returns the next ")" in the stream.

Returns

Returns the next ")" in the stream.

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known Text format. The next token must be ")".
Remarks

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

GetNextCloserOrComma(tokenizer) method # =

Summary

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

Returns

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

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer tokenizer over a stream of text in Well-known Text format. The next token must be ")" or ",".
Remarks

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

GetNextEmptyOrOpener(tokenizer) method # =

Summary

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

Returns

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

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known Text format. The next token must be "EMPTY" or "(".
Remarks

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

GetNextNumber(tokenizer) method # =

Summary

Returns the next number in the stream.

Returns

Returns the next number in the stream.

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known text format. The next token must be a number.
Remarks

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

GetNextWord(tokenizer) method # =

Summary

Returns the next word in the stream as uppercase text.

Returns

Returns the next word in the stream as uppercase text.

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known Text format. The next token must be a word.
Remarks

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

ReadGeometryTaggedText(tokenizer) method # =

Summary

Creates a Geometry using the next token in the stream.

Returns

Returns a Geometry specified by the next token in the stream.

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known Text format. The next tokens must form a .
Remarks

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(tokenizer) method # =

Summary

Creates a LineString using the next token in the stream.

Returns

Returns a LineString specified by the next token in the stream.

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known Text format. The next tokens must form a LineString Text.
Remarks

ParseException is thrown if an unexpected token is encountered.

ReadMultiLineStringText(tokenizer) method # =

Summary

Creates a Polyline using the next token in the stream.

Returns

a Polyline specified by the next token in the stream

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer tokenizer over a stream of text in Well-known Text format. The next tokens must form a MultiLineString Text

ReadMultiPolygonText(tokenizer) method # =

Summary

Creates a Polygon using the next token in the stream.

Returns

a

MultiPolygon

specified by the next token in the stream, or if if the coordinates used to create the Polygon shells and holes do not form closed linestrings.

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer tokenizer over a stream of text in Well-known Text format. The next tokens must form a MultiPolygon.

ReadPointText(tokenizer) method # =

Summary

Creates a Point using the next token in the stream.

Returns

Returns a Point specified by the next token in the stream.

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known Text format. The next tokens must form a .
Remarks

ParseException is thrown if an unexpected token is encountered.

ReadPolygonText(tokenizer,exteriorRingCcw,exteriorRingCcwSpecified) method # =

Summary

Creates a Polygon using the next token in the stream.

Returns

Returns a Polygon specified by the next token in the stream

Parameters
Name Type Description
tokenizer ArcGISRuntimeWKT.WktStreamTokenizer Tokenizer over a stream of text in Well-known Text format. The next tokens must form a .
exteriorRingCcw System.Boolean
exteriorRingCcwSpecified System.Boolean
Remarks

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.

GeometryToWkbUtils # =

Namespace

ArcGISRuntimeWKT

Summary

Converts a Geometry instance to a Well-known Binary string representation.

Remarks

The Well-known Binary Representation for Geometry (WKBGeometry) provides a portable representation of a Geometry value as a contiguous stream of bytes. It permits Geometry values to be exchanged between an ODBC client and an SQL database in binary form.

The Well-known Binary Representation for Geometry is obtained by serializing a Geometry instance as a sequence of numeric types drawn from the set {Unsigned Integer, Double} and then serializing each numeric type as a sequence of bytes using one of two well defined, standard, binary representations for numeric types (NDR, XDR). The specific binary encoding (NDR or XDR) used for a geometry byte stream is described by a one byte tag that precedes the serialized bytes. The only difference between the two encodings of geometry is one of byte order, the XDR encoding is Big Endian, the NDR encoding is Little Endian.

WriteDouble(value,writer,byteOrder) method # =

Summary

Writes a double to the binarywriter using the specified encoding

Parameters
Name Type Description
value System.Double Value to write
writer System.IO.BinaryWriter Binary Writer
byteOrder ArcGISRuntimeWKT.WkbByteOrder byteorder

WriteGeometry(geometry,bWriter,byteorder) method # =

Summary

Writes the geometry to the binary writer.

Parameters
Name Type Description
geometry Esri.ArcGISRuntime.Geometry.Geometry The geometry to be written.
bWriter System.IO.BinaryWriter
byteorder ArcGISRuntimeWKT.WkbByteOrder Byte order

WriteLineString(ls,bWriter,byteorder) method # =

Summary

Writes a linestring.

Parameters
Name Type Description
ls System.Collections.Generic.IEnumerable{Esri.ArcGISRuntime.Geometry.MapPoint} The linestring to be written.
bWriter System.IO.BinaryWriter Stream to write to.
byteorder ArcGISRuntimeWKT.WkbByteOrder Byte order

WriteMultiLineString(mls,bWriter,byteorder) method # =

Summary

Writes a multilinestring.

Parameters
Name Type Description
mls Esri.ArcGISRuntime.Geometry.Polyline The multilinestring to be written.
bWriter System.IO.BinaryWriter Stream to write to.
byteorder ArcGISRuntimeWKT.WkbByteOrder Byte order

WriteMultiPolygon(mp,bWriter,byteorder) method # =

Summary

Writes a multipolygon.

Parameters
Name Type Description
mp Esri.ArcGISRuntime.Geometry.Polygon The mulitpolygon to be written.
bWriter System.IO.BinaryWriter Stream to write to.
byteorder ArcGISRuntimeWKT.WkbByteOrder Byte order

WritePoint(point,bWriter,byteorder) method # =

Summary

Writes a point.

Parameters
Name Type Description
point Esri.ArcGISRuntime.Geometry.MapPoint The point to be written.
bWriter System.IO.BinaryWriter Stream to write to.
byteorder ArcGISRuntimeWKT.WkbByteOrder Byte order

WritePolygon(poly,bWriter,byteorder) method # =

Summary

Writes a polygon.

Parameters
Name Type Description
poly Esri.ArcGISRuntime.Geometry.Polygon The polygon to be written.
bWriter System.IO.BinaryWriter Stream to write to.
byteorder ArcGISRuntimeWKT.WkbByteOrder Byte order

WriteType(geometry,bWriter,byteorder) method # =

Summary

Writes the type number for this geometry.

Parameters
Name Type Description
geometry Esri.ArcGISRuntime.Geometry.Geometry The geometry to determine the type of.
bWriter System.IO.BinaryWriter Binary Writer
byteorder ArcGISRuntimeWKT.WkbByteOrder Byte order

WriteUInt32(value,writer,byteOrder) method # =

Summary

Writes an unsigned integer to the binarywriter using the specified encoding

Parameters
Name Type Description
value System.UInt32 Value to write
writer System.IO.BinaryWriter Binary Writer
byteOrder ArcGISRuntimeWKT.WkbByteOrder byteorder

GeometryToWktUtils # =

Namespace

ArcGISRuntimeWKT

Summary

Outputs the textual representation of a Geometry instance.

Remarks

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:

AppendCoordinate(coordinate,writer) method # =

Summary

Converts a Coordinate to format, then Appends it to the writer.

Parameters
Name Type Description
coordinate Esri.ArcGISRuntime.Geometry.MapPoint The Coordinate to process.
writer System.IO.StringWriter The output writer to Append to.

AppendGeometryTaggedText(geometry,writer) method # =

Summary

Converts a Geometry to format, then Appends it to the writer.

Parameters
Name Type Description
geometry Esri.ArcGISRuntime.Geometry.Geometry The Geometry to process.
writer System.IO.StringWriter The output stream to Append to.

AppendLineStringTaggedText(lineString,writer) method # =

Summary

Converts a LineString to LineString tagged text format,

Parameters
Name Type Description
lineString Esri.ArcGISRuntime.Geometry.Polyline The LineString to process.
writer System.IO.StringWriter The output stream writer to Append to.

AppendLineStringText(lineString,writer) method # =

Summary

Converts a LineString to format, then Appends it to the writer.

Parameters
Name Type Description
lineString System.Collections.Generic.IReadOnlyList{Esri.ArcGISRuntime.Geometry.MapPoint} The LineString to process.
writer System.IO.StringWriter The output stream to Append to.

AppendMultiLineStringTaggedText(multiLineString,writer) method # =

Summary

Converts a MultiLineString to format, then Appends it to the writer.

Parameters
Name Type Description
multiLineString Esri.ArcGISRuntime.Geometry.Polyline The MultiLineString to process
writer System.IO.StringWriter The output stream writer to Append to.

AppendMultiLineStringText(multiLineString,writer) method # =

Summary

Converts a MultiLineString to format, then Appends it to the writer.

Parameters
Name Type Description
multiLineString Esri.ArcGISRuntime.Geometry.Polyline The MultiLineString to process.
writer System.IO.StringWriter The output stream writer to Append to.

AppendMultiPolygonTaggedText(multiPolygon,writer) method # =

Summary

Converts a MultiPolygon to format, then Appends it to the writer.

Parameters
Name Type Description
multiPolygon Esri.ArcGISRuntime.Geometry.Polygon The MultiPolygon to process
writer System.IO.StringWriter The output stream writer to Append to.

AppendMultiPolygonText(multiPolygon,writer) method # =

Summary

Converts a MultiPolygon to format, then Appends to it to the writer.

Parameters
Name Type Description
multiPolygon Esri.ArcGISRuntime.Geometry.Polygon The MultiPolygon to process.
writer System.IO.StringWriter The output stream to Append to.

AppendPointTaggedText(coordinate,writer) method # =

Summary

Converts a Coordinate to format, then Appends it to the writer.

Parameters
Name Type Description
coordinate Esri.ArcGISRuntime.Geometry.MapPoint the
Coordinate

to process | | writer | System.IO.StringWriter | the output writer to Append to |

AppendPointText(coordinate,writer) method # =

Summary

Converts a Coordinate to Point Text format then Appends it to the writer.

Parameters
Name Type Description
coordinate Esri.ArcGISRuntime.Geometry.MapPoint The Coordinate to process.
writer System.IO.StringWriter The output stream writer to Append to.

AppendPolygonTaggedText(polygon,writer) method # =

Summary

Converts a Polygon to format, then Appends it to the writer.

Parameters
Name Type Description
polygon Esri.ArcGISRuntime.Geometry.Polygon Th Polygon to process.
writer System.IO.StringWriter The stream writer to Append to.

AppendPolygonText(polygon,writer) method # =

Summary

Converts a Polygon to format, then Appends it to the writer.

Parameters
Name Type Description
polygon Esri.ArcGISRuntime.Geometry.Polygon The Polygon to process.
writer System.IO.StringWriter

OnlyOneExteriorRing(polygon) method # =

Summary

Checks whether the first ring is CW or CCW, and returns true if there is only one ring in this direction.

Returns
Parameters
Name Type Description
polygon Esri.ArcGISRuntime.Geometry.Polygon

WriteNumber(d) method # =

Summary

Converts a double to a string, not in scientific notation.

Returns

The double as a string, not in scientific notation.

Parameters
Name Type Description
d System.Double The double to convert.

Parser # =

Namespace

ArcGISRuntimeWKT

Summary

convert Well Known Text (WKT) / Well Known Binary (WKB) to and from Geometry

GeometryFromWkb(bytes) method # =

Summary

Creates a Geometry from the supplied byte[] containing the Well-known Binary representation.

Returns

A Geometry bases on the supplied Well-known Binary representation.

Parameters
Name Type Description
bytes System.Byte[] byte[] containing the Well-known Binary representation.

GeometryFromWkb(reader) method # =

Summary

Creates a Geometry based on the Well-known binary representation.

Returns

A Geometry based on the Well-known binary representation.

Parameters
Name Type Description
reader System.IO.BinaryReader A BinaryReader used to read the Well-known binary representation.

GeometryFromWkt(wellKnownText) method # =

Summary

Converts a Well-known text representation to a Geometry.

Returns

Returns a Geometry specified by wellKnownText. Throws an exception if there is a parsing problem.

Parameters
Name Type Description
wellKnownText System.String A Geometry tagged text string ( see the OpenGIS Simple Features Specification. )

GeometryFromWkt(reader) method # =

Summary

Converts a Well-known Text representation to a Geometry.

Returns

Returns a Geometry read from StreamReader. An exception will be thrown if there is a parsing problem.

Parameters
Name Type Description
reader System.IO.TextReader A Reader which will return a Geometry Tagged Text string (see the OpenGIS Simple Features Specification)

GeometryToWkb(g) method # =

Summary

Writes a geometry to a byte array using little endian byte encoding

Returns

WKB representation of the geometry

Parameters
Name Type Description
g Esri.ArcGISRuntime.Geometry.Geometry The geometry to write

GeometryToWkb(g,wkbByteOrder) method # =

Summary

Writes a geometry to a byte array using the specified encoding.

Returns

WKB representation of the geometry

Parameters
Name Type Description
g Esri.ArcGISRuntime.Geometry.Geometry The geometry to write
wkbByteOrder ArcGISRuntimeWKT.WkbByteOrder Byte order

GeometryToWkt(geometry) method # =

Summary

Converts a Geometry to its Well-known Text representation.

Returns

A string (see the OpenGIS Simple Features Specification)

Parameters
Name Type Description
geometry Esri.ArcGISRuntime.Geometry.Geometry A Geometry to write.

GeometryToWkt(geometry,writer) method # =

Summary

Converts a Geometry to its Well-known Text representation.

Parameters
Name Type Description
geometry Esri.ArcGISRuntime.Geometry.Geometry A geometry to process.
writer System.IO.StringWriter Stream to write out the geometry's text representation.
Remarks

Geometry is written to the output stream as string (see the OpenGIS Simple Features Specification).

StreamTokenizer # =

Namespace

ArcGISRuntimeWKT

Summary

The StreamTokenizer class takes an input stream and parses it into "tokens", allowing the tokens to be read one at a time. The parsing process is controlled by a table and a number of flags that can be set to various states. The stream tokenizer can recognize identifiers, numbers, quoted strings, and various comment style

Remarks

This is a crude c# implementation of Java's class.

#ctor(reader,ignoreWhitespace) constructor # =

Summary

Initializes a new instance of the StreamTokenizer class.

Parameters
Name Type Description
reader System.IO.TextReader A TextReader with some text to read.
ignoreWhitespace System.Boolean Flag indicating whether whitespace should be ignored.

Column property # =

Summary

The current column number of the stream being read.

LineNumber property # =

Summary

The current line number of the stream being read.

GetNumericValue() method # =

Summary

If the current token is a number, this field contains the value of that number.

Parameters

This method has no parameters.

Exceptions
Name Description
System.FormatException Current token is not a number in a valid format.
Remarks

If the current token is a number, this field contains the value of that number. The current token is a number when the value of the ttype field is TT_NUMBER.

GetStringValue() method # =

Summary

If the current token is a word token, this field contains a string giving the characters of the word token.

Parameters

This method has no parameters.

GetTokenType() method # =

Summary

Gets the token type of the current token.

Returns
Parameters

This method has no parameters.

GetType(character) method # =

Summary

Determines a characters type (e.g. number, symbols, character).

Returns

The TokenType the character is.

Parameters
Name Type Description
character System.Char The character to determine.

NextNonWhitespaceToken() method # =

Summary

Returns next token that is not whitespace.

Returns
Parameters

This method has no parameters.

NextToken(ignoreWhitespace) method # =

Summary

Returns the next token.

Returns

The TokenType of the next token.

Parameters
Name Type Description
ignoreWhitespace System.Boolean Determines is whitespace is ignored. True if whitespace is to be ignored.

NextToken() method # =

Summary

Returns the next token.

Returns

The TokenType of the next token.

Parameters

This method has no parameters.

TokenType # =

Namespace

ArcGISRuntimeWKT

Summary

Represents the type of token created by the StreamTokenizer class.

Eof constants # =

Summary

Indicates that the end of the input stream has been reached.

Eol constants # =

Summary

Indicates that the end of line has been read. The field can only have this value if the eolIsSignificant method has been called with the argument true.

Number constants # =

Summary

Indicates that the token is a number.

Symbol constants # =

Summary

Characters that are not whitespace, numbers, etc...

Whitespace constants # =

Summary

Indictaes that the token is white space (space, tab, newline).

Word constants # =

Summary

Indicates that the token is a word.

WkbByteOrder # =

Namespace

ArcGISRuntimeWKT

Summary

Specifies the specific binary encoding (NDR or XDR) used for a geometry byte stream

Ndr constants # =

Summary

NDR (Little Endian) Encoding of Numeric Types

Remarks

The NDR representation of an Unsigned Integer is Little Endian (least significant byte first).

The NDR representation of a Double is Little Endian (sign bit is last byte).

Xdr constants # =

Summary

XDR (Big Endian) Encoding of Numeric Types

Remarks

The XDR representation of an Unsigned Integer is Big Endian (most significant byte first).

The XDR representation of a Double is Big Endian (sign bit is first byte).

WkbGeometryType # =

Namespace

ArcGISRuntimeWKT

Summary

Enumeration to determine geometrytype in Well-known Binary

WktStreamTokenizer # =

Namespace

ArcGISRuntimeWKT

Summary

Reads a stream of Well Known Text (wkt) string and returns a stream of tokens.

#ctor(reader) constructor # =

Summary

Initializes a new instance of the WktStreamTokenizer class.

Parameters
Name Type Description
reader System.IO.TextReader A TextReader that contains
Remarks

The WktStreamTokenizer class ais in reading WKT streams.

ReadAuthority(authority,authorityCode) method # =

Summary

Reads the authority and authority code.

Parameters
Name Type Description
authority System.String@ String to place the authority in.
authorityCode System.Int64@ String to place the authority code in.

ReadDoubleQuotedWord() method # =

Summary

Reads a string inside double quotes.

Returns

The string inside the double quotes.

Parameters

This method has no parameters.

Remarks

White space inside quotes is preserved.

ReadToken(expectedToken) method # =

Summary

Reads a token and checks it is what is expected.

Parameters
Name Type Description
expectedToken System.String The expected token.