svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.expressionevaluator / org.gvsig.expressionevaluator.lib / org.gvsig.expressionevaluator.lib.impl / src / main / java / org / gvsig / expressionevaluator / impl / function / spatial / STAsTextFunction.java @ 44207
History | View | Annotate | Download (629 Bytes)
1 | 43512 | jjdelcerro | package org.gvsig.expressionevaluator.impl.function.spatial; |
---|---|---|---|
2 | |||
3 | import org.apache.commons.lang3.Range; |
||
4 | 43521 | jjdelcerro | import org.gvsig.expressionevaluator.Interpreter; |
5 | 43512 | jjdelcerro | import org.gvsig.expressionevaluator.spi.AbstractFunction; |
6 | |||
7 | 43518 | jjdelcerro | public class STAsTextFunction extends AbstractFunction { |
8 | 43512 | jjdelcerro | |
9 | 43518 | jjdelcerro | public STAsTextFunction() {
|
10 | super("OGC", "ST_AsText", Range.is(1)); |
||
11 | 43512 | jjdelcerro | } |
12 | |||
13 | @Override
|
||
14 | 44009 | jjdelcerro | public boolean allowConstantFolding() { |
15 | return true; |
||
16 | } |
||
17 | |||
18 | @Override
|
||
19 | 43521 | jjdelcerro | public Object call(Interpreter interpreter, Object[] args) throws Exception { |
20 | 43518 | jjdelcerro | String r = getGeom(args, 0).convertToWKT(); |
21 | 43512 | jjdelcerro | return r;
|
22 | } |
||
23 | |||
24 | } |