Revision 40382
branches/v2_0_0_prep/libraries/libFMap_controls/src/org/gvsig/fmap/mapcontrol/MapControl.java | ||
---|---|---|
2439 | 2439 |
double minDist = mapTolerance; |
2440 | 2440 |
double middleTol = mapTolerance * 0.5; |
2441 | 2441 |
Point2D mapPoint = point; |
2442 |
org.gvsig.fmap.geom.primitive.Envelope r; |
|
2443 |
com.vividsolutions.jts.geom.Envelope e = null; |
|
2442 |
org.gvsig.fmap.geom.primitive.Envelope r = null;
|
|
2443 |
// com.vividsolutions.jts.geom.Envelope e = null;
|
|
2444 | 2444 |
try { |
2445 | 2445 |
r = |
2446 | 2446 |
geomManager.createEnvelope(mapPoint.getX() - middleTol, |
... | ... | |
2448 | 2448 |
mapPoint.getY() + middleTol, SUBTYPES.GEOM2D); |
2449 | 2449 |
|
2450 | 2450 |
// e = Converter.convertEnvelopeToJTS(r); |
2451 |
e = ((com.vividsolutions.jts.geom.Geometry) r.getGeometry().invokeOperation(ToJTS.CODE, null)).getEnvelopeInternal(); |
|
2451 |
// e = ((com.vividsolutions.jts.geom.Geometry) r.getGeometry().invokeOperation(ToJTS.CODE, null)).getEnvelopeInternal();
|
|
2452 | 2452 |
|
2453 | 2453 |
} catch (Exception e1) { |
2454 | 2454 |
LOG.info("Error creating the envelope", e1); |
... | ... | |
2466 | 2466 |
// La lista de snappers est? siempre ordenada por prioridad. Los |
2467 | 2467 |
// de mayor |
2468 | 2468 |
// prioridad est?n primero. |
2469 |
List geoms = cache.query(e);
|
|
2469 |
List geoms = cache.query(r);
|
|
2470 | 2470 |
|
2471 | 2471 |
for (int i = 0; i < mapControlManager.getSnapperCount(); i++) |
2472 | 2472 |
{ |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/store/postgresql/PostgreSQLHelper.java | ||
---|---|---|
205 | 205 |
if (data == null) { |
206 | 206 |
return null; |
207 | 207 |
} |
208 |
initializeFromWKBOperation(); |
|
209 |
fromWKBContext.setData(data); |
|
210 |
Geometry geom = |
|
211 |
(Geometry) fromWKB.invoke(null, fromWKBContext); |
|
212 | 208 |
|
209 |
Geometry geom = geomManager.createFrom(data); |
|
210 |
|
|
213 | 211 |
fullEnvelope = geom.getEnvelope(); |
214 | 212 |
|
215 | 213 |
return fullEnvelope; |
branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/store/mysql/MySQLHelper.java | ||
---|---|---|
124 | 124 |
|
125 | 125 |
final String sql = strb.toString(); |
126 | 126 |
|
127 |
try { |
|
128 |
initializeFromWKBOperation(); |
|
129 |
} catch (BaseException e1) { |
|
130 |
throw new ReadException(this.name, e1); |
|
131 |
} |
|
132 |
|
|
133 | 127 |
this.open(); |
134 | 128 |
return (Envelope) getResource().execute(new ResourceAction() { |
135 | 129 |
public Object run() throws Exception { |
... | ... | |
153 | 147 |
continue; |
154 | 148 |
} |
155 | 149 |
|
156 |
fromWKBContext.setData(data); |
|
157 |
Geometry geom = |
|
158 |
(Geometry) fromWKB.invoke(null, fromWKBContext); |
|
150 |
Geometry geom = geomManager.createFrom(data); |
|
159 | 151 |
|
160 | 152 |
if (fullEnvelope == null) { |
161 | 153 |
fullEnvelope = geom.getEnvelope(); |
Also available in: Unified diff