Package org.OpenGeoPortal.Solr

Examples of org.OpenGeoPortal.Solr.SolrRecord


    return augmentedSolrRecordRetriever.getOgcDataInfo(layerId);
  }
 
  @RequestMapping(value="ogp", method=RequestMethod.GET, produces="application/json")
  public @ResponseBody SolrRecord ogcSolrInfo(@RequestParam("OGPID") String layerId, @RequestParam(value="full", defaultValue="false") Boolean includeMetadata) throws Exception {
    SolrRecord record = layerInfoRetriever.getAllLayerInfo(layerId);
    if (includeMetadata){
      return record;
    } else {
      record.setFgdcText(null);
     
      return record;
    }
  }
View Full Code Here


  }
 
  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

    //--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)
    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");
    int epsgCode = 4326;//we are filtering the bounds based on WGS84
   
View Full Code Here

     //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)
      //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;
View Full Code Here

     //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)
      //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> describeLayerInfo = getWcsDescribeLayerInfo();
    String epsgCode = describeLayerInfo.get("SRS");
View Full Code Here

  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)
    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();
    //for now we'll force wgs84.  we'll revisit if we need something different
    int epsgCode = 4326;
    /*
geoserver/wms?VERSION=1.3.0&REQUEST=GetMap&CRS=epsg:4326&BBOX=-90,-180,90,180&...

The format_options is a container for parameters that are format specific. The options in it are expressed as:

param1:value1;param2:value2;...

The currently recognized format options are:

    antialiasing (on, off, text): allows to control the use of antialiased rendering in raster outputs.
    dpi: sets the rendering dpi in raster outputs. The OGC standard dpi is 90, but if you need to perform
    high resolution printouts it is advised to grab a larger image and set a higher dpi. For example, to
    print at 300dpi a 100x100 image it is advised to ask for a 333x333 image setting the dpi value at 300.
    In general the image size should be increased by a factor equal to targetDpi/90 and the target dpi set
    in the format options.
      */
    //height and width should be calculated based on the bounds
    Map<String,String> requestDimensions = this.calculateDimensions(bounds.getAspectRatio());
   
    String format = this.currentLayer.getRequestedFormat();
    if (format.toLowerCase().equals("geotiff")){
      format = "image/geotiff";
    }
    String getFeatureRequest = "SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=epsg:" +
        epsgCode + "&BBOX=" + bounds.toString() + "&LAYERS=" + layerName +
        "&HEIGHT=" + requestDimensions.get("height") + "&WIDTH=" + requestDimensions.get("width") +
        "&FORMAT=" + format;
    if (!format.equals("kmz")){
      getFeatureRequest += "&TILED=no";
    } else {
      if (GeometryType.isVector(GeometryType.parseGeometryType(layerInfo.getDataType()))){
        getFeatureRequest += "&format_options=kmattr:true;kmscore:100;";
      } else {
        getFeatureRequest += "&format_options=kmattr:true;kmscore:0;";
      }
    }
View Full Code Here

TOP

Related Classes of org.OpenGeoPortal.Solr.SolrRecord

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.