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 / STYFunction.java @ 44009
History | View | Annotate | Download (607 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 STYFunction extends AbstractFunction { |
8 | 43512 | jjdelcerro | |
9 | 43518 | jjdelcerro | public STYFunction() {
|
10 | super("OGC", "ST_Y", 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 | double r = getPoint(args, 0).getY(); |
21 | 43512 | jjdelcerro | return r;
|
22 | } |
||
23 | |||
24 | } |