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 / STCoversFunction.java @ 44006
History | View | Annotate | Download (550 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 | public class STCoversFunction extends AbstractFunction { |
||
8 | |||
9 | public STCoversFunction() {
|
||
10 | super("OGC", "ST_Covers", Range.is(2)); |
||
11 | } |
||
12 | |||
13 | @Override
|
||
14 | 43521 | jjdelcerro | public Object call(Interpreter interpreter, Object[] args) throws Exception { |
15 | 43512 | jjdelcerro | boolean r = getGeom(args, 0).covers(getGeom(args, 1)); |
16 | return r;
|
||
17 | } |
||
18 | |||
19 | } |