Revision 44035 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/ProjectSymbolTable.java
ProjectSymbolTable.java | ||
---|---|---|
27 | 27 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
28 | 28 |
import org.gvsig.fmap.geom.Geometry; |
29 | 29 |
import org.gvsig.fmap.geom.primitive.Envelope; |
30 |
import org.gvsig.fmap.geom.primitive.Point; |
|
30 | 31 |
import org.gvsig.fmap.mapcontext.MapContext; |
31 | 32 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
32 | 33 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
33 | 34 |
import org.gvsig.fmap.mapcontrol.AreaAndPerimeterCalculator; |
35 |
import org.gvsig.temporarystorage.TemporaryStorageGroup; |
|
36 |
import org.gvsig.temporarystorage.TemporaryStorageLocator; |
|
37 |
import org.gvsig.temporarystorage.TemporaryStorageManager; |
|
34 | 38 |
|
35 | 39 |
/** |
36 | 40 |
* |
... | ... | |
311 | 315 |
|
312 | 316 |
} |
313 | 317 |
|
318 |
|
|
319 |
private class SavedPointFunction extends AbstractFunction { |
|
320 |
|
|
321 |
public SavedPointFunction() { |
|
322 |
super( |
|
323 |
"Project", |
|
324 |
"savedpoint", |
|
325 |
Range.is(1), |
|
326 |
"Return the value of the saved point with the name indicated.\n" |
|
327 |
+ "If the named point do not exists return null.", |
|
328 |
"savedpoint({{name}})", |
|
329 |
new String[]{ |
|
330 |
"name - String value with the name of the point" |
|
331 |
}, |
|
332 |
"Geometry" |
|
333 |
); |
|
334 |
} |
|
335 |
|
|
336 |
@Override |
|
337 |
public Object call(Interpreter interpreter, Object[] args) throws Exception { |
|
338 |
TemporaryStorageManager manager = TemporaryStorageLocator.getTemporaryStorageManager(); |
|
339 |
TemporaryStorageGroup storage = manager.create("Points",Point.class); |
|
340 |
Geometry value = (Geometry) storage.get(getStr(args, 0)); |
|
341 |
return value; |
|
342 |
} |
|
343 |
|
|
344 |
} |
|
345 |
|
|
314 | 346 |
private class AreaFunction extends AbstractFunction { |
315 | 347 |
|
316 | 348 |
public AreaFunction() { |
... | ... | |
466 | 498 |
this.addFunction(new PropertyFunction()); |
467 | 499 |
this.addFunction(new AreaFunction()); |
468 | 500 |
this.addFunction(new PerimeterFunction()); |
501 |
this.addFunction(new SavedPointFunction()); |
|
469 | 502 |
} |
470 | 503 |
|
471 | 504 |
private MapContext getMapContext(Feature feature) { |
Also available in: Unified diff