comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/Row.java @ 275:9063c5fcebf7

Added the possibility to use Innerselects in SpatialQueries geo-backend/trunk@286 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 05 Nov 2009 15:03:51 +0000
parents 69ddef25e822
children 210716612c30
comparison
equal deleted inserted replaced
274:ff1b7967e6b9 275:9063c5fcebf7
245 mPoint = (SDEPoint[])aList.get(0); 245 mPoint = (SDEPoint[])aList.get(0);
246 if (val.isPoint()){ 246 if (val.isPoint()){
247 returnValue.append("POINT(") 247 returnValue.append("POINT(")
248 .append(mPoint[0].getX()) 248 .append(mPoint[0].getX())
249 .append(" ") 249 .append(" ")
250 .append(mPoint[0].getY()) 250 .append(mPoint[0].getY());
251 .append(" ") 251 if (mPoint[0].is3D()){
252 .append(mPoint[0].getZ()) 252 returnValue.append(" ")
253 .append(")"); 253 .append(mPoint[0].getZ());
254 }
255 returnValue.append(")");
254 }else if (val.isLine()){ 256 }else if (val.isLine()){
255 returnValue.append("LINESTRING("); 257 returnValue.append("LINESTRING(");
256 for (int i = 0; i< mPoint.length;i++){ 258 for (int i = 0; i< mPoint.length;i++){
257 returnValue.append(mPoint[i].getX()) 259 returnValue.append(mPoint[i].getX())
258 .append(" ") 260 .append(" ")
259 .append(mPoint[i].getY()) 261 .append(mPoint[i].getY());
260 .append(" ") 262 if (mPoint[i].is3D()){
261 .append(mPoint[i].getZ()); 263 returnValue.append(" ")
264 .append(mPoint[i].getZ());
265 }
262 if (i < mPoint.length-1){ 266 if (i < mPoint.length-1){
263 returnValue.append(" , "); 267 returnValue.append(" , ");
264 } 268 }
265 } 269 }
266 returnValue.append(")"); 270 returnValue.append(")");
267 } else if (val.isPolygon()){ 271 } else if (val.isPolygon()){
268 returnValue.append("POLYGON(("); 272 returnValue.append("POLYGON((");
269 for (int i = 0; i< mPoint.length;i++){ 273 int length = mPoint.length;
270 returnValue.append(mPoint[i].getX()) 274 for (int i = 0; i< length ;i++){
275 SDEPoint p = mPoint[i];
276 returnValue.append(p.getX())
271 .append(" ") 277 .append(" ")
272 .append(mPoint[i].getY()) 278 .append(p.getY());
273 .append(" ") 279 if (p.is3D()){
274 .append(mPoint[i].getZ()); 280 returnValue.append(" ")
275 if (i < mPoint.length-1){ 281 .append(p.getZ());
276 returnValue.append(" , "); 282 }
277 } 283 if (i < length-1){
284 returnValue.append(" , ");
285 }
278 } 286 }
279 returnValue.append(")"); 287 returnValue.append(")");
280 // TODO Wie werden innere Ringe unterstützt. 288 // TODO Wie werden innere Ringe unterstützt.
281 // for (int i =1 ; i < aList.size(); i++){ 289 // for (int i =1 ; i < aList.size(); i++){
282 // returnValue.append("("); 290 // returnValue.append("(");

http://dive4elements.wald.intevation.org