Examples of BoundingBox


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> describeLayerInfo = getWcsDescribeLayerInfo();
    String epsgCode = describeLayerInfo.get("SRS");
    String domainSubset = "";

    //wcs requires this info, even for full extent
      String gmlLow = describeLayerInfo.get("gridEnvelopeLow");
      String gmlHigh = describeLayerInfo.get("gridEnvelopeHigh");
      String axes = "";
      if (describeLayerInfo.containsKey("axis1")){
        axes += "<gml:axisName>";
        axes += describeLayerInfo.get("axis1");
        axes += "</gml:axisName>";
        if (describeLayerInfo.containsKey("axis2")){
          axes += "<gml:axisName>";
          axes += describeLayerInfo.get("axis2");
          axes += "</gml:axisName>";
        }
      }
      domainSubset = "<domainSubset>"
        +        "<spatialSubset>"
        +          bounds.generateGMLEnvelope(4326)
        +          "<gml:Grid dimension=\"2\">"
        +            "<gml:limits>"
        +              "<gml:GridEnvelope>"
        +                "<gml:low>" + gmlLow + "</gml:low>"
        +                        "<gml:high>" + gmlHigh + "</gml:high>"
View Full Code Here

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

Examples of org.OpenGeoPortal.Layer.BoundingBox

      }
        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

Examples of org.apache.fontbox.util.BoundingBox

    @Override
    public BoundingBox getBoundingBox()
    {
        PDRectangle rect = getFontBBox();
        return new BoundingBox(rect.getLowerLeftX(), rect.getLowerLeftY(),
                               rect.getWidth(), rect.getHeight());
    }
View Full Code Here

Examples of org.axsl.ps.BoundingBox

    /**
     * {@inheritDoc}
     */
    protected String specialXObjectDictEntries() {
        final BoundingBox boundingBox = this.getBoundingBox();
        final float llx = boundingBox.lowerLeftX();
        final float lly = boundingBox.lowerLeftY();
        final float urx = boundingBox.upperRightX();
        final float ury = boundingBox.upperRightY();
        final StringBuilder buffer = new StringBuilder();
        buffer.append("/FormType 1" + EOL);
        buffer.append("/BBox [");
        buffer.append(llx + " ");
        buffer.append(lly + " ");
View Full Code Here

Examples of org.fontbox.util.BoundingBox

     *
     * @return The fonts bouding box.
     */
    public PDRectangle getFontBoundingBox()
    {
        BoundingBox box = afm.getFontBBox();
        PDRectangle retval = null;
        if( box != null )
        {
            retval = new PDRectangle( box );
        }
View Full Code Here

Examples of org.fontbox.util.BoundingBox

            COSNumber urx = (COSNumber)arguments.get( 4 );
            COSNumber ury = (COSNumber)arguments.get( 5 );

            //width = horizontalWidth.intValue();
            //height = verticalWidth.intValue();
            box = new BoundingBox();
            box.setLowerLeftX( llx.floatValue() );
            box.setLowerLeftY( lly.floatValue() );
            box.setUpperRightX( urx.floatValue() );
            box.setUpperRightY( ury.floatValue() );
        }/*
 
View Full Code Here

Examples of org.geowebcache.grid.BoundingBox

            System.out.println(tl.getName());
            if(tl.getName().equals("sf:AggregateGeoFeature")) {
                //tl.isInitialized();
                foudAGF = true;
                GridSubset epsg4326 = tl.getGridSubset(gwcListener.gridSetBroker.WORLD_EPSG4326.getName());
                assertTrue(epsg4326.getGridSetBounds().equals( new BoundingBox(-180.0,-90.0,180.0,90.0)));
                String mime = tl.getMimeTypes().get(1).getMimeType();
                assertTrue(mime.startsWith("image/") || mime.startsWith("application/vnd.google-earth.kml+xml"));
            }
        }
       
View Full Code Here

Examples of org.opengis.geometry.BoundingBox

        Display display=Display.getCurrent();
        Clipboard cp=new Clipboard(display);
        SimpleFeature[] features = UDIGTestUtil.createDefaultTestFeatures("test", 1); //$NON-NLS-1$
        FilterFactory factory= CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
        SimpleFeatureType featureType = features[0].getFeatureType();
        BoundingBox bounds = features[0].getBounds();
        CoordinateReferenceSystem crs= featureType.getCoordinateReferenceSystem();
    BBOX filter = factory.bbox(featureType.getGeometryDescriptor().getName().getLocalPart(), bounds.getMinX(),
            bounds.getMinY(), bounds.getMaxX(), bounds.getMaxY(), CRS.lookupIdentifier(crs, false));
        cp.setContents(new Object[]{filter},new Transfer[]{UDigByteAndLocalTransfer.getInstance()});
        assertSame(filter, cp.getContents(UDigByteAndLocalTransfer.getInstance()));

//        cp.setContents(new Object[]{filter},new Transfer[]{FilterTextTransfer.getInstance()});
//        Filter contents = (Filter) cp.getContents(FilterTextTransfer.getInstance());
View Full Code Here

Examples of org.pdfbox.util.BoundingBox

            {
                fontMetrics.setWeight( readLine() );
            }
            else if( FONT_BBOX.equals( nextCommand ) )
            {
                BoundingBox bBox = new BoundingBox();
                bBox.setLowerLeftX( readFloat() );
                bBox.setLowerLeftY( readFloat() );
                bBox.setUpperRightX( readFloat() );
                bBox.setUpperRightY( readFloat() );
                fontMetrics.setFontBBox( bBox );
            }
            else if( VERSION.equals( nextCommand ) )
            {
                fontMetrics.setFontVersion( readLine() );
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.