Package com.geophile.z

Examples of com.geophile.z.SpatialObject


            } else if ("_center_radius".equals(func.getFunction())) {
                BigDecimal lat = decimalConstant(operands.get(0));
                BigDecimal lon = decimalConstant(operands.get(1));
                BigDecimal r = decimalConstant(operands.get(2));
                if ((lat != null) && (lon != null) && (r != null)) {
                    SpatialObject box = BoxLatLon.newBox(lat.subtract(r).doubleValue(),
                                                         lat.add(r).doubleValue(),
                                                         lon.subtract(r).doubleValue(),
                                                         lon.add(r).doubleValue());
                    long[] zValues = new long[box.maxZ()];
                    space.decompose(box, zValues);
                    for (int i = 0; i < box.maxZ(); i++) {
                        long z = zValues[i];
                        if (z != -1L) {
                            ExpressionNode lo = new ConstantExpression(Space.zLo(z), InternalIndexTypes.LONG.instance(true));
                            ExpressionNode hi =  new ConstantExpression(Space.zHi(z), InternalIndexTypes.LONG.instance(true));
                            CostEstimate zScanCost =
View Full Code Here


        TInstance yinst = index.getAllColumns().get(lonColumn).getColumn().getType();
        xLo = TBigDecimal.getWrapper(loExpressions.value(latColumn), xinst).asBigDecimal().doubleValue();
        xHi = TBigDecimal.getWrapper(hiExpressions.value(latColumn), xinst).asBigDecimal().doubleValue();
        yLo = TBigDecimal.getWrapper(loExpressions.value(lonColumn), yinst).asBigDecimal().doubleValue();
        yHi = TBigDecimal.getWrapper(hiExpressions.value(lonColumn), yinst).asBigDecimal().doubleValue();
        SpatialObject box = BoxLatLon.newBox(xLo, xHi, yLo, yHi);
        long[] zValues = new long[box.maxZ()];
        space.decompose(box, zValues);
        for (int i = 0; i < zValues.length; i++) {
            long z = zValues[i];
            if (z != -1L) {
                IndexRowType physicalRowType = keyRange.indexRowType().physicalRowType();
View Full Code Here

TOP

Related Classes of com.geophile.z.SpatialObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.