Revision 38031 branches/v2_0_0_prep/extensions/org.gvsig.oracle/src/org/gvsig/fmap/dal/store/oracle/OracleUtils.java
OracleUtils.java | ||
---|---|---|
3739 | 3739 |
|
3740 | 3740 |
STRUCT resp = null; |
3741 | 3741 |
|
3742 |
if (geom instanceof MultiPoint2D) { |
|
3742 |
GeometryType geometryType = geom.getGeometryType(); |
|
3743 |
|
|
3744 |
if (geometryType.isTypeOf(Geometry.TYPES.MULTIPOINT)) { |
|
3743 | 3745 |
resp = multiPoint2DToStruct((MultiPoint2D) geom, conn, osrid, |
3744 | 3746 |
hasSrid); |
3745 | 3747 |
return resp; |
3746 |
} |
|
3747 |
|
|
3748 |
if (geom instanceof org.gvsig.fmap.geom.primitive.impl.Point2D) { // point 2/3d |
|
3748 |
} else if (geometryType.isTypeOf(Geometry.TYPES.POINT)) { // point 2/3d |
|
3749 | 3749 |
Coordinate p = getSingleCoordinate((Point) geom); |
3750 | 3750 |
resp = getMultiPointAsStruct(p, osrid, three, conn, hasSrid); |
3751 |
} else { |
|
3752 |
if (geom instanceof Surface2D) { // polygon 2/3d |
|
3753 |
|
|
3754 |
if (geom instanceof Circle2D) { |
|
3755 |
resp = getCircleAsStruct((Circle2D) geom, osrid, conn, |
|
3756 |
hasSrid); |
|
3757 |
} else { |
|
3758 |
// also FEllipse2D |
|
3759 |
resp = getMultiPolygonAsStruct(geom, osrid, three, conn, |
|
3760 |
agu_b, hasSrid); |
|
3761 |
} |
|
3762 |
} else { // line 2/3d |
|
3763 |
|
|
3764 |
List<LineString3D> _lines = getLineStrings(geom); |
|
3765 |
resp = getMultiLineAsStruct(_lines, osrid, three, conn, hasSrid); |
|
3751 |
} else if (geometryType.isTypeOf(Geometry.TYPES.CURVE)) { // curve 2/3d |
|
3752 |
List<LineString3D> _lines = getLineStrings(geom); |
|
3753 |
resp = getMultiLineAsStruct(_lines, osrid, three, conn, hasSrid); |
|
3754 |
} else if (geometryType.isTypeOf(Geometry.TYPES.SURFACE)) { // surface 2/3d |
|
3755 |
if (geometryType.getType() == Geometry.TYPES.CIRCLE) { |
|
3756 |
resp = getCircleAsStruct((Circle2D) geom, osrid, conn, |
|
3757 |
hasSrid); |
|
3758 |
} else { |
|
3759 |
// also FEllipse2D |
|
3760 |
resp = getMultiPolygonAsStruct(geom, osrid, three, conn, |
|
3761 |
agu_b, hasSrid); |
|
3766 | 3762 |
} |
3767 |
} |
|
3763 |
} else if (geometryType.isTypeOf(Geometry.TYPES.NULL)) { // null geometry |
|
3764 |
return null; |
|
3765 |
} |
|
3768 | 3766 |
|
3769 | 3767 |
return resp; |
3770 | 3768 |
} |
Also available in: Unified diff