Package org.OpenGeoPortal.Layer

Examples of org.OpenGeoPortal.Layer.BoundingBox


  public File downloadZipFile(String layerId, BoundingBox bounds) throws Exception{

    SolrRecord layerInfo = layerInfoRetriever.getAllLayerInfo(layerId);
   
    //requests too near the poles are problematic
    BoundingBox requestBounds = null;
    Double requestMinY = bounds.getMinY();
    if (requestMinY < -85.0){
       requestMinY = -85.0;
    }
    Double requestMaxY = bounds.getMaxY();
    if (requestMaxY > 85.0){
       requestMaxY = 85.0;
    }
    requestBounds = new BoundingBox(bounds.getMinX(), requestMinY, bounds.getMaxX(), requestMaxY);
    String workspace = layerInfo.getWorkspaceName();
    String layerName = layerInfo.getName();
    String requestString = "request=GetFeature&version=1.1.0&outputFormat=shape-zip";
    requestString += "&typeName=" + workspace + ":" + layerName;
    requestString += "&srsName=EPSG:4326";
    requestString += "&BBOX=" + requestBounds.toString() + ",EPSG:4326";
    HttpClient httpclient = ogpHttpClient.getHttpClient();
    File outputFile = null;
   
      String wfsLocation = ParseJSONSolrLocationField.getWfsUrl(layerInfo.getLocation());
        HttpGet httpget = new HttpGet(wfsLocation + "?" + requestString);
View Full Code Here


      }
        if (!layerInfo.getAccess().equals(AccessLevel.Public)){
          //throw new SecurityException();
        }
        //needs to be changed to kml service point, format
          BoundingBox bounds = layerInfo.getBounds();
          Double minX = bounds.getMinX();
          Double maxX = bounds.getMaxX();
          Double minY = bounds.getMinY();
          Double maxY = bounds.getMaxY();

        if (minX > maxX){
          //this is supposed to mean that the layer crosses the dateline.  this causes problems with kml & geoserver,
          //so we give the full extent
          minX = -180.0;
View Full Code Here

TOP

Related Classes of org.OpenGeoPortal.Layer.BoundingBox

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.