Examples of BoundingBox


Examples of net.sf.myway.base.db.BoundingBox

      @Override
      public void run() {
        monitor.beginTask(Messages.NewRegionWizard_CreatingRegion + _page3.getRegionName(), 3);
        monitor.worked(1);
        final Region r = new Region();
        r.setBoundingBox(new BoundingBox(north, south, west, east));
        r.setName(name);
        if (!_page.getSelection().isEmpty()
          && _page.getSelection() instanceof IStructuredSelection) {
          final Object f = ((IStructuredSelection) _page.getSelection())
            .getFirstElement();
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

    //info needed: geometry column, bbox coords, epsg code, workspace & layername
     //all client bboxes should be passed as lat-lon coords.  we will need to get the appropriate epsg code for the layer
     //in order to return the file in original projection to the user (will also need to transform the bbox)
    String layerName = this.currentLayer.getLayerNameNS();
    SolrRecord layerInfo = this.currentLayer.getLayerInfo();
    BoundingBox nativeBounds = new BoundingBox(layerInfo.getMinX(), layerInfo.getMinY(), layerInfo.getMaxX(), layerInfo.getMaxY());
    BoundingBox bounds = nativeBounds.getIntersection(this.currentLayer.getRequestedBounds());

    String workSpace = layerInfo.getWorkspaceName();
    Map<String, String> describeLayerInfo = getWfsDescribeLayerInfo();
    int epsgCode = 4326;//we are filtering the bounds based on WGS84
    String geometryColumn = describeLayerInfo.get("geometryColumn");
    String nameSpace = describeLayerInfo.get("nameSpace");
    String bboxFilter = "";
    if (!nativeBounds.isEquivalent(bounds)){
        bboxFilter += "<ogc:Filter>"
          +    "<ogc:BBOX>"
          +      "<ogc:PropertyName>" + geometryColumn + "</ogc:PropertyName>"
          +      bounds.generateGMLEnvelope(epsgCode)
          +    "</ogc:BBOX>"
          "</ogc:Filter>";
    }
    // TODO should be xml
    String getFeatureRequest = "<wfs:GetFeature service=\"WFS\" version=\"1.1.0\""
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

   
  }
 
  private LayerRequest createLayerRequest(SolrRecord solrRecord, String requestedFormat, String[] bounds){
    LayerRequest layer = new LayerRequest(solrRecord, requestedFormat);
    layer.setRequestedBounds(new BoundingBox(bounds[0], bounds[1], bounds[2], bounds[3]));
    layer.setEmailAddress(this.emailAddress);
    layer.setTargetDirectory(this.directoryRetriever.getDownloadDirectory());
    return layer;
  }
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

     
      for (String layer : geoCommonsExportRequest.getLayerIds()){
        //System.out.println(layer);
        logger.info("Attempting to add layer: " + layer);
        try {
          BoundingBox bounds = new BoundingBox(-180.0, -90.0, 180.0, 90.0);
            dataSetLocations.put(layer, this.geoCommonsClient.uploadWmsDataSet(layer));
        } catch (Exception e){
          logger.error("There was an error adding this data set to GeoCommons.");
        }
      }
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

 
  public abstract String getMethod();
 
  public BoundingBox getClipBounds(){
    SolrRecord layerInfo = this.currentLayer.getLayerInfo();
    BoundingBox nativeBounds = new BoundingBox(layerInfo.getMinX(), layerInfo.getMinY(), layerInfo.getMaxX(), layerInfo.getMaxY());
    BoundingBox bounds = nativeBounds.getIntersection(this.currentLayer.getRequestedBounds());
    return bounds;
  }
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

    } catch (Exception e){
      //die gracefully
      this.setAllLayerStatus(Status.FAILED);
      return null;
    }
    BoundingBox bounds = representativeLayer.getRequestedBounds();
    String userEmail = representativeLayer.getEmailAddress();

    String layerQuery = "";
    for (LayerRequest currentLayer: this.layerList){
      layerQuery += "LayerName=" + currentLayer.getLayerInfo().getName() + "&";
    }

    String getFeatureRequest = layerQuery
     + "UserEmail=" + userEmail + "&Clip=true&EmailAdmin=true&AppID=55&EncryptionKey=OPENGEOPORTALROCKS"
     + "&XMin=" + bounds.getMinX() + "&YMin=" + bounds.getMinY() + "&XMax=" + bounds.getMaxX() + "&YMax=" + bounds.getMaxY();
    return getFeatureRequest;
  }
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

    //info needed: geometry column, bbox coords, epsg code, workspace & layername
     //all client bboxes should be passed as lat-lon coords.  we will need to get the appropriate epsg code for the layer
     //in order to return the file in original projection to the user (will also need to transform the bbox)
    String layerName = this.currentLayer.getLayerNameNS();
    SolrRecord layerInfo = this.currentLayer.getLayerInfo();
    BoundingBox nativeBounds = new BoundingBox(layerInfo.getMinX(), layerInfo.getMinY(), layerInfo.getMaxX(), layerInfo.getMaxY());
    BoundingBox bounds = nativeBounds.getIntersection(this.currentLayer.getRequestedBounds());

    String workSpace = layerInfo.getWorkspaceName();
    Map<String, String> describeLayerInfo = getWfsDescribeLayerInfo();
    String geometryColumn = describeLayerInfo.get("geometryColumn");
    String nameSpace = describeLayerInfo.get("nameSpace");
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

     //in order to return the file in original projection to the user (will also need to transform the bbox)
      //all client bboxes should be passed as lat-lon coords.  we will need to get the appropriate epsg code for the layer
    //in order to return the file in original projection to the user

    SolrRecord layerInfo = this.currentLayer.getLayerInfo();
    BoundingBox nativeBounds = new BoundingBox(layerInfo.getMinX(), layerInfo.getMinY(), layerInfo.getMaxX(), layerInfo.getMaxY());
    BoundingBox bounds = nativeBounds.getIntersection(this.currentLayer.getRequestedBounds());
    String layerName = this.currentLayer.getLayerNameNS();

    Map<String, String> describeCoverageInfo = getWcsDescribeLayerInfo();
    int epsgCode = 4326;
    String outputFormat = "image/tiff;subtype=&quot;geotiff&quot;";
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

  public String createDownloadRequest() throws Exception {
    //--generate POST message
    //info needed: geometry column, bbox coords, epsg code, workspace & layername
     //all client bboxes should be passed as lat-lon coords.  we will need to get the appropriate epsg code for the layer
     //in order to return the file in original projection to the user (will also need to transform the bbox)
    BoundingBox bounds = this.getClipBounds();
    String layerName = this.currentLayer.getLayerNameNS();
    /* we're going to use the kml reflector
     * http://localhost:8080/geoserver/wms/kml?layers=topp:states

    kmscore=<value> 0 = force raster, 100 = force vector
    kmattr=[true|false] : whether or not kml has clickable attributes
    The format_options is a container for parameters that are format specific. The options in it are expressed as:
     */
   
    String getFeatureRequest = "BBOX=" + bounds.toString() + "&LAYERS=" + layerName + "&format_options=kmattr:true;";
    if (GeometryType.isVector(GeometryType.parseGeometryType(currentLayer.getLayerInfo().getDataType()))){
      getFeatureRequest += "kmscore:100;";
    } else {
      getFeatureRequest += "kmscore:0;";
    }
View Full Code Here

Examples of org.OpenGeoPortal.Download.Types.BoundingBox

    return layerName;
  }
 
  @Override
  public String createDownloadRequest() throws Exception {
    BoundingBox bounds = this.getClipBounds();
    String layerName = getLayerName();
    String geometry = getDataType();
   
    String getFeatureRequest = "layer=" + layerName + "&bbox=" + bounds.toString() + "&geom=" + geometry;
    return getFeatureRequest;
  }
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.