Mercurial > dive4elements > gnv-client
comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/ArcSDEStatement.java @ 546:210716612c30
Removed Encodingerrors from listed Files. All Files are now UTF-8 compliant.
geo-backend/trunk@517 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 08 Jan 2010 14:40:08 +0000 |
parents | 33f93898cbbf |
children | 23d5cc37dd5b |
comparison
equal
deleted
inserted
replaced
545:347c84467478 | 546:210716612c30 |
---|---|
167 | 167 |
168 Geometry g = null; | 168 Geometry g = null; |
169 int pos = where.indexOf("intersects"); | 169 int pos = where.indexOf("intersects"); |
170 if (pos >= 0 ){ | 170 if (pos >= 0 ){ |
171 String substr = where.substring(pos); | 171 String substr = where.substring(pos); |
172 where = where.substring(0,where.lastIndexOf("intersects")); // TODO auch or unterstützen | 172 where = where.substring(0,where.lastIndexOf("intersects")); |
173 int andPos = where.lastIndexOf("and"); | 173 int andPos = where.lastIndexOf("and"); |
174 if (andPos < 0){ | 174 if (andPos < 0){ |
175 andPos = 0; | 175 andPos = 0; |
176 } | 176 } |
177 where = where.substring(0,andPos); // TODO auch or unterstützen | 177 where = where.substring(0,andPos); // TODO support or also |
178 String intersectsStmt = substr.substring(0, substr.lastIndexOf(")")); // Annahme räumliches Stmt steht am Ende | 178 String intersectsStmt = substr.substring(0, substr.lastIndexOf(")")); // Spatial-Statment is the last one |
179 String wkt = null; | 179 String wkt = null; |
180 if (intersectsStmt.contains("select")){ | 180 if (intersectsStmt.contains("select")){ |
181 // Anstelle eines WKT ist ein InnerSelect zum Bestimmen der Comparatorgeometrie gegeben. | 181 // Anstelle eines WKT ist ein InnerSelect zum Bestimmen der Comparatorgeometrie gegeben. |
182 String stmt = intersectsStmt.substring(intersectsStmt.indexOf("select"),intersectsStmt.lastIndexOf(")")); | 182 String stmt = intersectsStmt.substring(intersectsStmt.indexOf("select"),intersectsStmt.lastIndexOf(")")); |
183 ResultSet resultSet = this.executeQuery(stmt); | 183 ResultSet resultSet = this.executeQuery(stmt); |
184 if (resultSet != null && resultSet.next()){ | 184 if (resultSet != null && resultSet.next()){ |
185 // TODO Selektion von mehreren Geometrien unterstützen. | 185 // TODO: Support the selection of more than one Geometry |
186 wkt = resultSet.getString("SHAPE"); | 186 wkt = resultSet.getString("SHAPE"); |
187 } | 187 } |
188 }else{ | 188 }else{ |
189 wkt = intersectsStmt.substring(intersectsStmt.indexOf("\""), intersectsStmt.lastIndexOf("\"")).replace("\"", "").trim(); | 189 wkt = intersectsStmt.substring(intersectsStmt.indexOf("\""), intersectsStmt.lastIndexOf("\"")).replace("\"", "").trim(); |
190 } | 190 } |