Package com.browseengine.bobo.geosearch.bo

Examples of com.browseengine.bobo.geosearch.bo.CartesianCoordinateUUID


       
        geoConverter = new GeoConverter();
    }
   
    public GeoOnlyHits search(GeoQuery query, int start, int count) throws IOException {
        CartesianCoordinateUUID centroidCoordinate = geoConverter.toCartesianCoordinate(query.getCentroidLatitude(), query.getCentroidLongitude(), EMPTY_UUID);
       
        CartesianCoordinateUUID minCoordinate = buildMinCoordinate(centroidCoordinate, query.getRangeInKm());
        CartesianCoordinateUUID maxCoordinate = buildMaxCoordinate(centroidCoordinate, query.getRangeInKm());

        GeoSegmentReader<IDGeoRecord> segmentReader = getGeoSegmentReader();

        IDGeoRecord minRecord = geoConverter.toIDGeoRecord(minCoordinate);
        IDGeoRecord maxRecord = geoConverter.toIDGeoRecord(maxCoordinate);
View Full Code Here


       
        int totalHits = 0;
        GeoOnlyHitQueue hitQueue = new GeoOnlyHitQueue(start+count);
        while (hitIterator.hasNext()) {
            IDGeoRecord record = hitIterator.next();
            CartesianCoordinateUUID hitCoordinate = geoConverter.toCartesianCoordinate(record);
            if (minCoordinate.x <= hitCoordinate.x && hitCoordinate.x <= maxCoordinate.x
                    && minCoordinate.y <= hitCoordinate.y && hitCoordinate.y <= maxCoordinate.y
                    && minCoordinate.z <= hitCoordinate.z && hitCoordinate.z <= maxCoordinate.z
                    ) {
                totalHits++;
View Full Code Here

    private CartesianCoordinateUUID buildMinCoordinate(CartesianCoordinateUUID centroidCoordinate, float rangeInKm) {
        int rangeInUnits = Conversions.radiusMetersToIntegerUnits(rangeInKm * 1000);
        int minX = Conversions.calculateMinimumCoordinate(centroidCoordinate.x, rangeInUnits);
        int minY = Conversions.calculateMinimumCoordinate(centroidCoordinate.y, rangeInUnits);
        int minZ = Conversions.calculateMinimumCoordinate(centroidCoordinate.z, rangeInUnits);
        return new CartesianCoordinateUUID(minX, minY, minZ, EMPTY_UUID);
    }
View Full Code Here

    private CartesianCoordinateUUID buildMaxCoordinate(CartesianCoordinateUUID centroidCoordinate, float rangeInKm){
        int rangeInUnits = Conversions.radiusMetersToIntegerUnits(rangeInKm * 1000);
        int maxX = Conversions.calculateMaximumCoordinate(centroidCoordinate.x, rangeInUnits);
        int maxY = Conversions.calculateMaximumCoordinate(centroidCoordinate.y, rangeInUnits);
        int maxZ = Conversions.calculateMaximumCoordinate(centroidCoordinate.z, rangeInUnits);
        return new CartesianCoordinateUUID(maxX, maxY, maxZ, EMPTY_UUID);
    }
View Full Code Here

        double longRadians =  Conversions.d2r(longitude);
        int x = getXFromRadians(latRadians, longRadians);
        int y = getYFromRadians(latRadians, longRadians);
        int z = getZFromRadians(latRadians);
       
        return new CartesianCoordinateUUID(x, y, z, uuid);
    }
View Full Code Here

        if ((geoRecord.highOrder & (ONE_AS_LONG << highOrderPosition)) == 0) {
            z = z - Integer.MIN_VALUE;
        }
        highOrderPosition--;

        return new CartesianCoordinateUUID(x, y, z, geoRecord.id);
    }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.geosearch.bo.CartesianCoordinateUUID

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.