Revision 31886 branches/v2_0_0_prep/extensions/org.gvsig.oracle/src/org/gvsig/fmap/dal/store/oracle/OracleUtils.java
OracleUtils.java | ||
---|---|---|
1694 | 1694 |
List _ho = (List) hs[1]; |
1695 | 1695 |
List ho = reverseHoles(_ho); |
1696 | 1696 |
|
1697 |
return getMultiPolygonAsStruct(sh, ho, osrid, threed, conn, agu_bien, |
|
1698 |
hasSrid); |
|
1697 |
STRUCT st = null; |
|
1698 |
|
|
1699 |
try { |
|
1700 |
st = getMultiPolygonAsStruct(sh, ho, osrid, threed, conn, agu_bien, hasSrid); |
|
1701 |
} catch (Throwable th) { |
|
1702 |
throw new SQLException(th.getMessage()); |
|
1703 |
} |
|
1704 |
|
|
1705 |
return st; |
|
1699 | 1706 |
} |
1700 | 1707 |
|
1701 | 1708 |
/** |
... | ... | |
1764 | 1771 |
indices[start_ind + 1] = new NUMBER(1003); |
1765 | 1772 |
indices[start_ind + 2] = new NUMBER(1); |
1766 | 1773 |
start_ind = start_ind + 3; |
1767 |
acum = acum |
|
1768 |
+ (dim * ((LineString3D) shells.get(i)).getLs() |
|
1769 |
.getNumPoints()); |
|
1774 |
acum = acum + (dim * ((LineString3D) shells.get(i)).getLs().getNumPoints()); |
|
1770 | 1775 |
|
1771 | 1776 |
List item_holes = (List) holes.get(i); |
1772 | 1777 |
|
... | ... | |
1821 | 1826 |
} |
1822 | 1827 |
|
1823 | 1828 |
STRUCT resp; |
1824 |
StructDescriptor dsc = StructDescriptor.createDescriptor( |
|
1825 |
"MDSYS.SDO_GEOMETRY", conn); |
|
1829 |
StructDescriptor dsc = StructDescriptor.createDescriptor("MDSYS.SDO_GEOMETRY", conn); |
|
1826 | 1830 |
Object[] obj = new Object[5]; |
1827 | 1831 |
obj[0] = new NUMBER(geotype); |
1828 | 1832 |
|
... | ... | |
3735 | 3739 |
*/ |
3736 | 3740 |
public static STRUCT buildSTRUCT(Geometry geom, int _forced_type, |
3737 | 3741 |
Connection conn, String osrid, boolean withSrid, boolean agu_bien, |
3738 |
boolean _isGeoCS) throws SQLException { |
|
3742 |
boolean _isGeoCS) { // throws SQLException {
|
|
3739 | 3743 |
if (geom instanceof Complex) { |
3740 | 3744 |
// Complex coll = (Complex) geom; |
3741 | 3745 |
// |
... | ... | |
3743 | 3747 |
// withSrid, agu_bien, _isGeoCS); |
3744 | 3748 |
return null; |
3745 | 3749 |
} else { |
3746 |
Shape shp = geom.getInternalShape(); |
|
3747 |
int osridd = Integer.parseInt(osrid); |
|
3748 |
return geometryToSTRUCT(geom, conn, osridd, agu_bien, withSrid); |
|
3750 |
// Shape shp = geom.getInternalShape(); |
|
3751 |
int osridd = withSrid ? Integer.parseInt(osrid) : 0; |
|
3752 |
STRUCT resp = null; |
|
3753 |
try { |
|
3754 |
resp = geometryToSTRUCT(geom, conn, osridd, agu_bien, withSrid); |
|
3755 |
} catch (SQLException e) { |
|
3756 |
logger.error("While converting to STRUCT: " + e.getMessage()); |
|
3757 |
} |
|
3758 |
return resp; |
|
3749 | 3759 |
} |
3750 | 3760 |
} |
3751 | 3761 |
|
Also available in: Unified diff