Package com.microsoft.sqlserver.jdbc
Class Geometry
- java.lang.Object
-
- com.microsoft.sqlserver.jdbc.Geometry
-
public class Geometry extends java.lang.Object
Geometry datatype represents data in a Euclidean (flat) coordinate system. This class will stay in this current package for backwards compatibility.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.ByteBuffer
buffer
As a general rule, the ~IndexEnd variables are non-inclusive (i.e.protected byte[]
clr
protected byte[]
clrNoZM
protected int
currentFigureIndex
protected int
currentPointIndex
protected int
currentSegmentIndex
protected int
currentShapeIndex
protected int
currentWKBFigureIndex
protected int
currentWKBPointIndex
protected int
currentWKBSegmentIndex
protected int
currentWKBShapeIndex
protected int
currentWktPos
protected byte
endian
protected byte
FA_ARC
protected byte
FA_COMPOSITE_CURVE
protected byte
FA_EXTERIOR_RING
protected byte
FA_INTERIOR_RING
protected byte
FA_LINE
protected byte
FA_POINT
protected byte
FA_STROKE
protected java.util.List<Figure>
figureList
protected Figure[]
figures
protected boolean
hasMvalues
protected boolean
hasZvalues
protected InternalSpatialDatatype
internalType
protected boolean
isLargerThanHemisphere
protected boolean
isNull
protected boolean
isSingleLineSegment
protected boolean
isSinglePoint
protected boolean
isValid
protected double[]
mValues
protected int
numberOfFigures
protected int
numberOfPoints
protected int
numberOfSegments
protected int
numberOfShapes
protected java.util.List<Point>
pointList
protected java.util.List<Segment>
segmentList
protected Segment[]
segments
protected byte
serializationProperties
protected java.util.List<Shape>
shapeList
protected Shape[]
shapes
protected int
srid
protected byte
version
protected byte[]
wkb
protected int
wkbType
protected java.lang.String
wkt
protected java.lang.String
wktNoZM
protected java.lang.StringBuffer
WKTsb
protected java.lang.StringBuffer
WKTsbNoZM
protected double[]
xValues
protected double[]
yValues
protected double[]
zValues
-
Constructor Summary
Constructors Modifier Constructor Description protected
Geometry()
protected
Geometry(byte[] clr)
Private constructor used for creating a Geometry object from internal SQL Server format.protected
Geometry(java.lang.String wkt, int srid)
Private constructor used for creating a Geometry object from WKT and Spatial Reference Identifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendToWKTBuffers(java.lang.Object o)
Append the data to both stringbuffers.java.lang.String
asTextZM()
Returns the Well-Known Text (WKT) representation of the Geometry object.protected boolean
checkEmptyKeyword(int parentShapeIndex, InternalSpatialDatatype isd, boolean isInsideAnotherShape)
protected void
constructCompoundcurveWKT(int segmentStartIndex, int segmentEndIndex, int pointEndIndex)
Constructs a CompoundCurve in WKT form.protected void
constructCurvepolygonWKT(int figureStartIndex, int figureEndIndex, int segmentStartIndex, int segmentEndIndex)
Constructs a CurvePolygon in WKT form.protected void
constructGeometryCollectionWKT(int shapeEndIndex)
The starting point for constructing a GeometryCollection type in WKT form.protected void
constructLineWKT(int pointStartIndex, int pointEndIndex)
Constructs a line in WKT form.protected void
constructMultipolygonWKT(int shapeStartIndex, int shapeEndIndex)
Constructs a MultiPolygon in WKT form.protected void
constructMultiShapeWKT(int shapeStartIndex, int shapeEndIndex)
Constructs a mutli-shape (MultiPoint / MultiLineString) in WKT form.protected void
constructPointWKT(int pointIndex)
Constructs and appends a Point type in WKT form to the stringbuffer.protected void
constructSegmentWKT(int currentSegment, byte segment, int pointEndIndex)
Constructs a Segment in WKT form.protected void
constructShapeWKT(int figureStartIndex, int figureEndIndex)
Constructs a shape (simple Geometry/Geography entities that are contained within a single bracket) in WKT form.protected void
constructWKT(com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype sd, InternalSpatialDatatype isd, int pointIndexEnd, int figureIndexEnd, int segmentIndexEnd, int shapeIndexEnd)
Constructs the WKT representation of Geometry/Geography from the deserialized data.protected void
createSerializationProperties()
static Geometry
deserialize(byte[] clr)
Constructor for a Geometry instance from an internal SQL Server format for spatial data.protected int
determineClrCapacity(boolean excludeZMFromCLR)
protected void
determineInternalType()
protected int
determineWkbCapacity()
java.util.List<Figure>
getFigureList()
java.lang.Double
getM()
Returns the M (measure) value of the object.protected java.lang.String
getNextStringToken()
Reads the next string token (usually POINT, LINESTRING, etc.).java.util.List<Point>
getPointList()
java.util.List<Segment>
getSegmentList()
java.util.List<Shape>
getShapeList()
int
getSrid()
Returns the Spatial Reference Identifier (SRID) value.java.lang.Double
getX()
Returns the X coordinate value.java.lang.Double
getY()
Returns the Y coordinate value.java.lang.Double
getZ()
Returns the Z (elevation) value of the object.boolean
hasM()
Returns if the object contains a M (measure) value.protected boolean
hasMoreToken()
boolean
hasZ()
Returns if the object contains a Z (elevation) value.protected void
interpretSerializationPropBytes()
boolean
isNull()
Returns if the Geometry object is null.static Geometry
parse(java.lang.String wkt)
Constructor for a Geometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation.protected void
parseClr(com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype type)
Deserializes the buffer (that contains CLR representation of Geometry/Geography data), and stores it into multiple corresponding data structures.protected void
parseWKTForSerialization(com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype sd, int startPos, int parentShapeIndex, boolean isGeoCollection)
Parses WKT and populates the data structures of the Geometry/Geography instance.static Geometry
point(double x, double y, int srid)
Constructor for a Geometry instance that represents a Point instance from its X and Y values and an Spatial Reference Identifier.protected void
populateStructures()
Populates the various data structures contained within the Geometry/Geography instance.protected byte
readByte()
protected void
readCloseBracket()
protected void
readCompoundCurveWkt(boolean isFirstIteration)
Reads a CompoundCurve WKT.protected void
readCurvePolygon()
Reads a CurvePolygon WKT.protected double
readDouble()
protected void
readFigures()
protected int
readInt()
protected void
readLineWkt()
Reads a series of Point types.protected void
readMultiPolygonWkt(int thisShapeIndex, java.lang.String nextToken)
Reads a MultiPolygon WKT.protected void
readMvalues()
protected void
readNumberOfFigures()
protected void
readNumberOfPoints()
protected void
readNumberOfSegments()
protected void
readNumberOfShapes()
protected void
readOpenBracket()
protected void
readPointWkt()
Reads Point WKT and adds it to the list of points.protected void
readSegments()
protected void
readSegmentWkt(int segmentType, boolean isFirstIteration)
Reads a Segment WKT.protected void
readShapes()
protected void
readShapeWkt(int parentShapeIndex, java.lang.String nextToken)
Reads a shape (simple Geometry/Geography entities that are contained within a single bracket) WKT.protected void
readZvalues()
byte[]
serialize()
Returns the bytes that represent an internal SQL Server format of Geometry type.protected void
serializeToClr(boolean excludeZMFromCLR, com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype type)
Serializes the Geogemetry/Geography instance to internal SQL Server format (CLR).protected void
serializeToWkb(com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype type)
Serializes the Geogemetry/Geography instance to Well-Known binary format.byte[]
STAsBinary()
Returns the Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation of a Geometry instance.java.lang.String
STAsText()
Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a Geometry instance.java.lang.String
STGeometryType()
Returns the Open Geospatial Consortium (OGC) type name represented by a geometry instance.static Geometry
STGeomFromText(java.lang.String wkt, int srid)
Constructor for a Geometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.static Geometry
STGeomFromWKB(byte[] wkb)
Constructor for a Geometry instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.int
STNumPoints()
Returns the number of points in the Geometry object.protected void
throwIllegalByteArray()
protected void
throwIllegalWKT()
java.lang.String
toString()
Returns the String representation of the Geometry object.
-
-
-
Field Detail
-
buffer
protected java.nio.ByteBuffer buffer
As a general rule, the ~IndexEnd variables are non-inclusive (i.e. pointIndexEnd = 8 means the shape using it will only go up to the 7th index of the array)
-
internalType
protected InternalSpatialDatatype internalType
-
wkt
protected java.lang.String wkt
-
wktNoZM
protected java.lang.String wktNoZM
-
clr
protected byte[] clr
-
clrNoZM
protected byte[] clrNoZM
-
srid
protected int srid
-
version
protected byte version
-
numberOfPoints
protected int numberOfPoints
-
numberOfFigures
protected int numberOfFigures
-
numberOfShapes
protected int numberOfShapes
-
numberOfSegments
protected int numberOfSegments
-
WKTsb
protected java.lang.StringBuffer WKTsb
-
WKTsbNoZM
protected java.lang.StringBuffer WKTsbNoZM
-
currentPointIndex
protected int currentPointIndex
-
currentFigureIndex
protected int currentFigureIndex
-
currentSegmentIndex
protected int currentSegmentIndex
-
currentShapeIndex
protected int currentShapeIndex
-
currentWKBPointIndex
protected int currentWKBPointIndex
-
currentWKBFigureIndex
protected int currentWKBFigureIndex
-
currentWKBSegmentIndex
protected int currentWKBSegmentIndex
-
currentWKBShapeIndex
protected int currentWKBShapeIndex
-
xValues
protected double[] xValues
-
yValues
protected double[] yValues
-
zValues
protected double[] zValues
-
mValues
protected double[] mValues
-
figures
protected Figure[] figures
-
shapes
protected Shape[] shapes
-
segments
protected Segment[] segments
-
wkb
protected byte[] wkb
-
endian
protected byte endian
-
wkbType
protected int wkbType
-
hasZvalues
protected boolean hasZvalues
-
hasMvalues
protected boolean hasMvalues
-
isValid
protected boolean isValid
-
isSinglePoint
protected boolean isSinglePoint
-
isSingleLineSegment
protected boolean isSingleLineSegment
-
isLargerThanHemisphere
protected boolean isLargerThanHemisphere
-
isNull
protected boolean isNull
-
FA_INTERIOR_RING
protected final byte FA_INTERIOR_RING
- See Also:
- Constant Field Values
-
FA_STROKE
protected final byte FA_STROKE
- See Also:
- Constant Field Values
-
FA_EXTERIOR_RING
protected final byte FA_EXTERIOR_RING
- See Also:
- Constant Field Values
-
FA_POINT
protected final byte FA_POINT
- See Also:
- Constant Field Values
-
FA_LINE
protected final byte FA_LINE
- See Also:
- Constant Field Values
-
FA_ARC
protected final byte FA_ARC
- See Also:
- Constant Field Values
-
FA_COMPOSITE_CURVE
protected final byte FA_COMPOSITE_CURVE
- See Also:
- Constant Field Values
-
currentWktPos
protected int currentWktPos
-
pointList
protected java.util.List<Point> pointList
-
figureList
protected java.util.List<Figure> figureList
-
shapeList
protected java.util.List<Shape> shapeList
-
segmentList
protected java.util.List<Segment> segmentList
-
serializationProperties
protected byte serializationProperties
-
-
Constructor Detail
-
Geometry
protected Geometry()
-
Geometry
protected Geometry(java.lang.String wkt, int srid) throws SQLServerException
Private constructor used for creating a Geometry object from WKT and Spatial Reference Identifier.- Parameters:
wkt
- Well-Known Text (WKT) provided by the user.srid
- Spatial Reference Identifier (SRID) provided by the user.- Throws:
SQLServerException
- if an exception occurs
-
Geometry
protected Geometry(byte[] clr) throws SQLServerException
Private constructor used for creating a Geometry object from internal SQL Server format.- Parameters:
clr
- Internal SQL Server format provided by the user.- Throws:
SQLServerException
- if an exception occurs
-
-
Method Detail
-
STGeomFromText
public static Geometry STGeomFromText(java.lang.String wkt, int srid) throws SQLServerException
Constructor for a Geometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.- Parameters:
wkt
- Well-Known Text (WKT) provided by the user.srid
- Spatial Reference Identifier (SRID) provided by the user.- Returns:
- Geometry Geometry instance created from WKT and SRID
- Throws:
SQLServerException
- if an exception occurs
-
STGeomFromWKB
public static Geometry STGeomFromWKB(byte[] wkb) throws SQLServerException
Constructor for a Geometry instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation. Note: This method currently uses internal SQL Server format (CLR) to create a Geometry instance, but in the future this will be changed to accept WKB data instead, as the SQL Server counterpart of this method (STGeomFromWKB) uses WKB. For existing users who are already using this method, consider switching to deserialize(byte) instead.- Parameters:
wkb
- Well-Known Binary (WKB) provided by the user.- Returns:
- Geometry Geometry instance created from WKB
- Throws:
SQLServerException
- if an exception occurs
-
deserialize
public static Geometry deserialize(byte[] clr) throws SQLServerException
Constructor for a Geometry instance from an internal SQL Server format for spatial data.- Parameters:
clr
- Internal SQL Server format provided by the user.- Returns:
- Geometry Geometry instance created from clr
- Throws:
SQLServerException
- if an exception occurs
-
parse
public static Geometry parse(java.lang.String wkt) throws SQLServerException
Constructor for a Geometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation. Spatial Reference Identifier is defaulted to 0.- Parameters:
wkt
- Well-Known Text (WKT) provided by the user.- Returns:
- Geometry Geometry instance created from WKT
- Throws:
SQLServerException
- if an exception occurs
-
point
public static Geometry point(double x, double y, int srid) throws SQLServerException
Constructor for a Geometry instance that represents a Point instance from its X and Y values and an Spatial Reference Identifier.- Parameters:
x
- x coordinatey
- y coordinatesrid
- Spatial Reference Identifier value- Returns:
- Geometry Geography instance
- Throws:
SQLServerException
- if an exception occurs
-
STAsText
public java.lang.String STAsText() throws SQLServerException
Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a Geometry instance. This text will not contain any Z (elevation) or M (measure) values carried by the instance.- Returns:
- the WKT representation without the Z and M values.
- Throws:
SQLServerException
- if an exception occurs
-
STAsBinary
public byte[] STAsBinary()
Returns the Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation of a Geometry instance. This value will not contain any Z or M values carried by the instance.- Returns:
- byte array representation of the Geometry object.
-
serialize
public byte[] serialize()
Returns the bytes that represent an internal SQL Server format of Geometry type.- Returns:
- byte array representation of the Geometry object.
-
hasM
public boolean hasM()
Returns if the object contains a M (measure) value.- Returns:
- boolean that indicates if the object contains M value.
-
hasZ
public boolean hasZ()
Returns if the object contains a Z (elevation) value.- Returns:
- boolean that indicates if the object contains Z value.
-
getX
public java.lang.Double getX()
Returns the X coordinate value.- Returns:
- double value that represents the X coordinate.
-
getY
public java.lang.Double getY()
Returns the Y coordinate value.- Returns:
- double value that represents the Y coordinate.
-
getM
public java.lang.Double getM()
Returns the M (measure) value of the object.- Returns:
- double value that represents the M value.
-
getZ
public java.lang.Double getZ()
Returns the Z (elevation) value of the object.- Returns:
- double value that represents the Z value.
-
getSrid
public int getSrid()
Returns the Spatial Reference Identifier (SRID) value.- Returns:
- int value of SRID.
-
isNull
public boolean isNull()
Returns if the Geometry object is null.- Returns:
- boolean that indicates if the object is null.
-
STNumPoints
public int STNumPoints()
Returns the number of points in the Geometry object.- Returns:
- int that indicates the number of points in the Geometry object.
-
STGeometryType
public java.lang.String STGeometryType()
Returns the Open Geospatial Consortium (OGC) type name represented by a geometry instance.- Returns:
- String that contains the Geometry object's type name
-
asTextZM
public java.lang.String asTextZM()
Returns the Well-Known Text (WKT) representation of the Geometry object.- Returns:
- String that contains the WKT representation of the Geometry object.
-
toString
public java.lang.String toString()
Returns the String representation of the Geometry object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- String that contains the WKT representation of the Geometry object.
-
serializeToClr
protected void serializeToClr(boolean excludeZMFromCLR, com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype type)
Serializes the Geogemetry/Geography instance to internal SQL Server format (CLR).- Parameters:
excludeZMFromCLR
- flag to indicate if Z and M coordinates should be excluded from the internal SQL Server formattype
- Type of Spatial Datatype (Geometry/Geography)
-
serializeToWkb
protected void serializeToWkb(com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype type)
Serializes the Geogemetry/Geography instance to Well-Known binary format.- Parameters:
type
- Type of Spatial Datatype (Geometry/Geography)
-
parseClr
protected void parseClr(com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype type) throws SQLServerException
Deserializes the buffer (that contains CLR representation of Geometry/Geography data), and stores it into multiple corresponding data structures.- Parameters:
type
- Type of Spatial Datatype (Geography/Geometry)- Throws:
SQLServerException
- if an Exception occurs
-
constructWKT
protected void constructWKT(com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype sd, InternalSpatialDatatype isd, int pointIndexEnd, int figureIndexEnd, int segmentIndexEnd, int shapeIndexEnd) throws SQLServerException
Constructs the WKT representation of Geometry/Geography from the deserialized data.- Parameters:
sd
- the Geometry/Geography instance.isd
- internal spatial datatype objectpointIndexEnd
- upper bound for reading pointsfigureIndexEnd
- upper bound for reading figuressegmentIndexEnd
- upper bound for reading segmentsshapeIndexEnd
- upper bound for reading shapes- Throws:
SQLServerException
- if an exception occurs
-
parseWKTForSerialization
protected void parseWKTForSerialization(com.microsoft.sqlserver.jdbc.SQLServerSpatialDatatype sd, int startPos, int parentShapeIndex, boolean isGeoCollection) throws SQLServerException
Parses WKT and populates the data structures of the Geometry/Geography instance.- Parameters:
sd
- the Geometry/Geography instance.startPos
- The index to start from from the WKT.parentShapeIndex
- The index of the parent's Shape in the shapes array. Used to determine this shape's parent.isGeoCollection
- flag to indicate if this is part of a GeometryCollection.- Throws:
SQLServerException
- if an exception occurs
-
constructPointWKT
protected void constructPointWKT(int pointIndex)
Constructs and appends a Point type in WKT form to the stringbuffer. There are two stringbuffers - WKTsb and WKTsbNoZM. WKTsb contains the X, Y, Z and M coordinates, whereas WKTsbNoZM contains only X and Y coordinates.- Parameters:
pointIndex
- indicates which point to append to the stringbuffer.
-
constructLineWKT
protected void constructLineWKT(int pointStartIndex, int pointEndIndex)
Constructs a line in WKT form.- Parameters:
pointStartIndex
- .pointEndIndex
- .
-
constructShapeWKT
protected void constructShapeWKT(int figureStartIndex, int figureEndIndex)
Constructs a shape (simple Geometry/Geography entities that are contained within a single bracket) in WKT form.- Parameters:
figureStartIndex
- .figureEndIndex
- .
-
constructMultiShapeWKT
protected void constructMultiShapeWKT(int shapeStartIndex, int shapeEndIndex)
Constructs a mutli-shape (MultiPoint / MultiLineString) in WKT form.- Parameters:
shapeStartIndex
- .shapeEndIndex
- .
-
constructCompoundcurveWKT
protected void constructCompoundcurveWKT(int segmentStartIndex, int segmentEndIndex, int pointEndIndex)
Constructs a CompoundCurve in WKT form.- Parameters:
segmentStartIndex
- .segmentEndIndex
- .pointEndIndex
- .
-
constructMultipolygonWKT
protected void constructMultipolygonWKT(int shapeStartIndex, int shapeEndIndex)
Constructs a MultiPolygon in WKT form.- Parameters:
shapeStartIndex
- .shapeEndIndex
- .
-
constructCurvepolygonWKT
protected void constructCurvepolygonWKT(int figureStartIndex, int figureEndIndex, int segmentStartIndex, int segmentEndIndex)
Constructs a CurvePolygon in WKT form.- Parameters:
figureStartIndex
- .figureEndIndex
- .segmentStartIndex
- .segmentEndIndex
- .
-
constructSegmentWKT
protected void constructSegmentWKT(int currentSegment, byte segment, int pointEndIndex)
Constructs a Segment in WKT form. SQL Server re-uses the last point of a segment if the following segment is of type 3 (first arc) or type 2 (first line). This makes sense because the last point of a segment and the first point of the next segment have to match for a valid curve. This means that the code has to look ahead and decide to decrement the currentPointIndex depending on what segment comes next, since it may have been reused (and it's reflected in the array of points)- Parameters:
currentSegment
- .segment
- .pointEndIndex
- .
-
constructGeometryCollectionWKT
protected void constructGeometryCollectionWKT(int shapeEndIndex) throws SQLServerException
The starting point for constructing a GeometryCollection type in WKT form.- Parameters:
shapeEndIndex
- .- Throws:
SQLServerException
- if an exception occurs
-
readPointWkt
protected void readPointWkt() throws SQLServerException
Reads Point WKT and adds it to the list of points. This method will read up until and including the comma that may come at the end of the Point WKT.- Throws:
SQLServerException
- if an exception occurs
-
readLineWkt
protected void readLineWkt() throws SQLServerException
Reads a series of Point types.- Throws:
SQLServerException
- if an exception occurs
-
readShapeWkt
protected void readShapeWkt(int parentShapeIndex, java.lang.String nextToken) throws SQLServerException
Reads a shape (simple Geometry/Geography entities that are contained within a single bracket) WKT.- Parameters:
parentShapeIndex
- shape index of the parent shape that called this methodnextToken
- next string token- Throws:
SQLServerException
- if an exception occurs
-
readCurvePolygon
protected void readCurvePolygon() throws SQLServerException
Reads a CurvePolygon WKT.- Throws:
SQLServerException
- if an exception occurs
-
readMultiPolygonWkt
protected void readMultiPolygonWkt(int thisShapeIndex, java.lang.String nextToken) throws SQLServerException
Reads a MultiPolygon WKT.- Parameters:
thisShapeIndex
- shape index of current shapenextToken
- next string token- Throws:
SQLServerException
- if an exception occurs
-
readSegmentWkt
protected void readSegmentWkt(int segmentType, boolean isFirstIteration) throws SQLServerException
Reads a Segment WKT.- Parameters:
segmentType
- segment typeisFirstIteration
- flag that indicates if this is the first iteration from the loop outside- Throws:
SQLServerException
- if an exception occurs
-
readCompoundCurveWkt
protected void readCompoundCurveWkt(boolean isFirstIteration) throws SQLServerException
Reads a CompoundCurve WKT.- Parameters:
isFirstIteration
- flag that indicates if this is the first iteration from the loop outside- Throws:
SQLServerException
- if an exception occurs
-
getNextStringToken
protected java.lang.String getNextStringToken()
Reads the next string token (usually POINT, LINESTRING, etc.). Then increments currentWktPos to the end of the string token.- Returns:
- the next string token
-
populateStructures
protected void populateStructures()
Populates the various data structures contained within the Geometry/Geography instance.
-
readOpenBracket
protected void readOpenBracket() throws SQLServerException
- Throws:
SQLServerException
-
readCloseBracket
protected void readCloseBracket() throws SQLServerException
- Throws:
SQLServerException
-
hasMoreToken
protected boolean hasMoreToken()
-
createSerializationProperties
protected void createSerializationProperties()
-
determineClrCapacity
protected int determineClrCapacity(boolean excludeZMFromCLR)
-
determineWkbCapacity
protected int determineWkbCapacity()
-
appendToWKTBuffers
protected void appendToWKTBuffers(java.lang.Object o)
Append the data to both stringbuffers.- Parameters:
o
- data to append to the stringbuffers.
-
interpretSerializationPropBytes
protected void interpretSerializationPropBytes()
-
readNumberOfPoints
protected void readNumberOfPoints() throws SQLServerException
- Throws:
SQLServerException
-
readZvalues
protected void readZvalues() throws SQLServerException
- Throws:
SQLServerException
-
readMvalues
protected void readMvalues() throws SQLServerException
- Throws:
SQLServerException
-
readNumberOfFigures
protected void readNumberOfFigures() throws SQLServerException
- Throws:
SQLServerException
-
readFigures
protected void readFigures() throws SQLServerException
- Throws:
SQLServerException
-
readNumberOfShapes
protected void readNumberOfShapes() throws SQLServerException
- Throws:
SQLServerException
-
readShapes
protected void readShapes() throws SQLServerException
- Throws:
SQLServerException
-
readNumberOfSegments
protected void readNumberOfSegments() throws SQLServerException
- Throws:
SQLServerException
-
readSegments
protected void readSegments() throws SQLServerException
- Throws:
SQLServerException
-
determineInternalType
protected void determineInternalType()
-
checkEmptyKeyword
protected boolean checkEmptyKeyword(int parentShapeIndex, InternalSpatialDatatype isd, boolean isInsideAnotherShape) throws SQLServerException
- Throws:
SQLServerException
-
throwIllegalWKT
protected void throwIllegalWKT() throws SQLServerException
- Throws:
SQLServerException
-
throwIllegalByteArray
protected void throwIllegalByteArray() throws SQLServerException
- Throws:
SQLServerException
-
readByte
protected byte readByte() throws SQLServerException
- Throws:
SQLServerException
-
readInt
protected int readInt() throws SQLServerException
- Throws:
SQLServerException
-
readDouble
protected double readDouble() throws SQLServerException
- Throws:
SQLServerException
-
getPointList
public java.util.List<Point> getPointList()
-
getFigureList
public java.util.List<Figure> getFigureList()
-
getShapeList
public java.util.List<Shape> getShapeList()
-
getSegmentList
public java.util.List<Segment> getSegmentList()
-
-