Examples of CouchDBSpatialView


Examples of org.geotools.data.couchdb.client.CouchDBSpatialView

    @Override
    protected ReferencedEnvelope getBoundsInternal(Query query) throws IOException {
        // there appears to be no way to obtain the bbox from couch documents
        // (aka features) without getting all the geometry as well.
        // one approach might be to write a view that only returns bbox?
        CouchDBSpatialView spatialView = getDataStore().getConnection().spatialView(viewName);
        Envelope e = getBBox(query);
        JSONObject results;
        try {
            results = spatialView.get(e.getMinX(),e.getMinY(),e.getMaxX(),e.getMaxY());
        } catch (CouchDBException ex) {
            throw ex.wrap();
        }
        Envelope env  = null;
        JSONArray rows = (JSONArray) results.get("rows");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.