public class SqlServerGeometry
extends java.lang.Object
SqlServerGeometry represents the native SQL Server database object.
Instances are created by deserializing the byte array returned in the JDBC result set. They present the structure of the SQL Server Geometry object as specified in Microsoft SQL Server CLR Types Serialization Formats .
| Modifier and Type | Field and Description |
|---|---|
private java.nio.ByteBuffer |
buffer |
private CoordinateReferenceSystem<?> |
crs |
private static CoordinateReferenceSystem<?> |
DEFAULT_CRS |
private Figure[] |
figures |
private static byte |
hasMValuesMask |
private static byte |
hasZValuesMask |
private static byte |
isSingleLineSegment |
private static byte |
isSinglePointMask |
private static byte |
isValidMask |
private double[] |
mValues |
private int |
numberOfFigures |
private int |
numberOfPoints |
private int |
numberOfShapes |
private double[] |
points |
private byte |
serializationPropertiesByte |
private Shape[] |
shapes |
private java.lang.Integer |
srid |
static byte |
SUPPORTED_VERSION |
private byte |
version |
private double[] |
zValues |
| Modifier | Constructor and Description |
|---|---|
(package private) |
SqlServerGeometry() |
private |
SqlServerGeometry(byte[] bytes) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
allocateMValueArray() |
(package private) void |
allocateZValueArray() |
private int |
calculateCapacity() |
(package private) PositionSequence<?> |
coordinateRange(IndexRange range) |
(package private) <P extends Position> |
copyCoordinate(int index,
double[] coords,
CoordinateReferenceSystem<P> crs) |
static SqlServerGeometry |
deserialize(byte[] bytes) |
private void |
determineNumberOfPoints() |
private OpenGisType |
firstShapeOpenGisType() |
(package private) CoordinateReferenceSystem<?> |
getCoordinateReferenceSystem() |
(package private) CoordinateReferenceSystem<?> |
getCRS(int srid,
boolean hasZValues,
boolean hasMValues) |
private Figure |
getFigure(int index) |
(package private) IndexRange |
getFiguresForShape(int shapeIndex) |
(package private) int |
getNumFigures() |
(package private) int |
getNumPoints() |
(package private) int |
getNumShapes() |
(package private) OpenGisType |
getOpenGisTypeOfShape(int shpIdx) |
private int |
getPointByteSize() |
(package private) IndexRange |
getPointsForFigure(int figureIndex)
Returns the range of indices in the point array for the specified figure.
|
private Shape |
getShape(int index) |
(package private) java.lang.Integer |
getSrid() |
(package private) boolean |
hasMValues() |
(package private) boolean |
hasZValues() |
(package private) boolean |
isCompatible() |
(package private) boolean |
isEmpty() |
(package private) boolean |
isEmptyShape(int shapeIndex) |
(package private) boolean |
isFigureInteriorRing(int figureIdx) |
(package private) boolean |
isParentShapeOf(int parent,
int child) |
(package private) boolean |
isSingleLineSegment() |
(package private) boolean |
isSinglePoint() |
(package private) boolean |
isValid() |
(package private) OpenGisType |
openGisType() |
private void |
parse() |
private void |
readFigures() |
private void |
readMValues() |
private void |
readPoints() |
private void |
readShapes() |
private void |
readZValues() |
static byte[] |
serialize(SqlServerGeometry sqlServerGeom) |
(package private) void |
setCoordinate(int index,
PositionSequence<?> positions) |
(package private) void |
setCoordinateReferenceSystem(CoordinateReferenceSystem<?> crs) |
(package private) void |
setFigure(int i,
Figure figure) |
(package private) void |
setHasMValues() |
(package private) void |
setHasZValues() |
(package private) void |
setIsSingleLineSegment() |
(package private) void |
setIsSinglePoint() |
(package private) void |
setIsValid() |
(package private) void |
setNumberOfFigures(int num) |
(package private) void |
setNumberOfPoints(int num) |
(package private) void |
setNumberOfShapes(int num) |
(package private) void |
setShape(int i,
Shape shape) |
(package private) void |
setSrid(java.lang.Integer srid) |
public static final byte SUPPORTED_VERSION
private static CoordinateReferenceSystem<?> DEFAULT_CRS
private static final byte hasZValuesMask
private static final byte hasMValuesMask
private static final byte isValidMask
private static final byte isSinglePointMask
private static final byte isSingleLineSegment
private java.nio.ByteBuffer buffer
private java.lang.Integer srid
private CoordinateReferenceSystem<?> crs
private byte version
private byte serializationPropertiesByte
private int numberOfPoints
private double[] points
private double[] mValues
private double[] zValues
private int numberOfFigures
private Figure[] figures
private int numberOfShapes
private Shape[] shapes
private SqlServerGeometry(byte[] bytes)
SqlServerGeometry()
public static byte[] serialize(SqlServerGeometry sqlServerGeom)
public static SqlServerGeometry deserialize(byte[] bytes)
<P extends Position> void copyCoordinate(int index, double[] coords, CoordinateReferenceSystem<P> crs)
void setCoordinateReferenceSystem(CoordinateReferenceSystem<?> crs)
boolean isParentShapeOf(int parent,
int child)
boolean isEmptyShape(int shapeIndex)
IndexRange getFiguresForShape(int shapeIndex)
IndexRange getPointsForFigure(int figureIndex)
figureIndex - index to shape in shape arrayboolean isFigureInteriorRing(int figureIdx)
OpenGisType getOpenGisTypeOfShape(int shpIdx)
CoordinateReferenceSystem<?> getCRS(int srid, boolean hasZValues, boolean hasMValues)
PositionSequence<?> coordinateRange(IndexRange range)
private Figure getFigure(int index)
private Shape getShape(int index)
void setCoordinate(int index,
PositionSequence<?> positions)
boolean isEmpty()
OpenGisType openGisType()
void setHasZValues()
void allocateZValueArray()
void allocateMValueArray()
void setHasMValues()
void setIsValid()
void setIsSinglePoint()
void setIsSingleLineSegment()
int getNumPoints()
void setNumberOfPoints(int num)
private void parse()
private void readShapes()
private void readFigures()
private OpenGisType firstShapeOpenGisType()
private int calculateCapacity()
int getNumShapes()
private int getPointByteSize()
private void readPoints()
private void readZValues()
private void readMValues()
private void determineNumberOfPoints()
boolean isCompatible()
void setSrid(java.lang.Integer srid)
java.lang.Integer getSrid()
boolean hasZValues()
boolean hasMValues()
boolean isValid()
boolean isSinglePoint()
boolean isSingleLineSegment()
void setNumberOfFigures(int num)
void setFigure(int i,
Figure figure)
void setNumberOfShapes(int num)
void setShape(int i,
Shape shape)
int getNumFigures()
CoordinateReferenceSystem<?> getCoordinateReferenceSystem()