Method ParseShapeByType
ParseShapeByType(WktShapeParser.State, String)
(internal) Parses the remainder of a shape definition following the shape's name
given as shapeType
already consumed via
NextWord(). If
it's able to parse the shape, offset
should be advanced beyond
it (e.g. to the ',' or ')' or EOF in general). The default implementation
checks the name against some predefined names and calls corresponding
parse methods to handle the rest. Overriding this method is an
excellent extension point for additional shape types. Or, use this class by delegation to this
method.
When writing a parse method that reacts to a specific shape type, remember to handle the dimension and EMPTY token via NextIfEmptyAndSkipZM().
Declaration
protected virtual IShape ParseShapeByType(WktShapeParser.State state, string shapeType)
Parameters
Type | Name | Description |
---|---|---|
WktShapeParser.State | state | |
System.String | shapeType | Non-Null string; could have mixed case. The first character is a letter. |
Returns
Type | Description |
---|---|
IShape | The shape or null if not supported / unknown. |