Revision 10152 branches/v10/extensions/extJDBC/src/com/iver/cit/gvsig/fmap/drivers/jdbc/oracle/OracleSpatialUtils.java
OracleSpatialUtils.java | ||
---|---|---|
1790 | 1790 |
} |
1791 | 1791 |
|
1792 | 1792 |
|
1793 |
public static GeneralPathX structToGPX(STRUCT st) {
|
|
1793 |
public static GeneralPathX structToGPX(Datum[] aux) {
|
|
1794 | 1794 |
|
1795 | 1795 |
GeneralPathX resp = new GeneralPathX(); |
1796 | 1796 |
ARRAY infoARRAY = null; |
... | ... | |
1803 | 1803 |
boolean next_must_do_first = true; |
1804 | 1804 |
|
1805 | 1805 |
try { |
1806 |
infoARRAY = (ARRAY) st.getOracleAttributes()[3];
|
|
1807 |
ordsARRAY = (ARRAY) st.getOracleAttributes()[4];
|
|
1806 |
infoARRAY = (ARRAY) aux[3];
|
|
1807 |
ordsARRAY = (ARRAY) aux[4];
|
|
1808 | 1808 |
|
1809 | 1809 |
if (polStructIsRectStruct(infoARRAY, ordsARRAY)) { |
1810 | 1810 |
infoARRAY = getDevelopedInfoArray(infoARRAY); |
1811 | 1811 |
ordsARRAY = getDevelopedOrdsArray(ordsARRAY); |
1812 | 1812 |
} |
1813 | 1813 |
|
1814 |
dims = ((NUMBER) st.getOracleAttributes()[0]).intValue() / 1000;
|
|
1814 |
dims = ((NUMBER) aux[0]).intValue() / 1000;
|
|
1815 | 1815 |
if (dims == 0) dims = 2; |
1816 | 1816 |
|
1817 | 1817 |
info_array = (Datum[]) infoARRAY.getOracleArray(); |
... | ... | |
2102 | 2102 |
return FShape.NULL; |
2103 | 2103 |
} |
2104 | 2104 |
|
2105 |
public static int getStructType(STRUCT st) {
|
|
2105 |
public static int getStructType(Datum[] the_data) {
|
|
2106 | 2106 |
int resp = -1; |
2107 | 2107 |
try { |
2108 |
resp = ((NUMBER) st.getOracleAttributes()[0]).intValue() % 1000;
|
|
2108 |
resp = ((NUMBER) the_data[0]).intValue() % 1000;
|
|
2109 | 2109 |
} catch (SQLException se) { |
2110 | 2110 |
logger.error("Error: " + se.getMessage(), se); |
2111 | 2111 |
} |
2112 | 2112 |
return resp; |
2113 | 2113 |
} |
2114 | 2114 |
|
2115 |
public static int getStructSRID(STRUCT st) {
|
|
2115 |
public static int getStructSRID(Datum[] the_data) {
|
|
2116 | 2116 |
int resp = -1; |
2117 | 2117 |
try { |
2118 |
resp = ((NUMBER) st.getOracleAttributes()[1]).intValue();
|
|
2118 |
resp = ((NUMBER) the_data[1]).intValue();
|
|
2119 | 2119 |
} catch (SQLException se) { |
2120 | 2120 |
logger.error("Error: " + se.getMessage(), se); |
2121 | 2121 |
} |
2122 | 2122 |
return resp; |
2123 | 2123 |
} |
2124 | 2124 |
|
2125 |
public static boolean isCircle(STRUCT st) {
|
|
2125 |
public static boolean isCircle(Datum[] the_data) {
|
|
2126 | 2126 |
int[] info = null; |
2127 | 2127 |
try { |
2128 |
info = ((ARRAY) st.getOracleAttributes()[3]).getIntArray();
|
|
2128 |
info = ((ARRAY) the_data[3]).getIntArray();
|
|
2129 | 2129 |
} catch (SQLException se) { |
2130 | 2130 |
logger.error("While cheking circle: " + se.getMessage(), se); |
2131 | 2131 |
return false; |
... | ... | |
2148 | 2148 |
return resp; |
2149 | 2149 |
} |
2150 | 2150 |
|
2151 |
public static double[] getOrds(STRUCT st) {
|
|
2151 |
public static double[] getOrds(Datum[] the_data) {
|
|
2152 | 2152 |
|
2153 | 2153 |
double[] resp = null; |
2154 | 2154 |
try { |
2155 |
ARRAY aux = (ARRAY) st.getOracleAttributes()[4];
|
|
2155 |
ARRAY aux = (ARRAY) the_data[4];
|
|
2156 | 2156 |
if (aux == null) { |
2157 | 2157 |
return null; |
2158 | 2158 |
} |
Also available in: Unified diff