Package org.geotools.data.ows

Examples of org.geotools.data.ows.CRSEnvelope


     */
    private void checkGetMap(WebMapServer wms, Layer layer, CoordinateReferenceSystem crs)
            throws Exception {
       
        layer.clearCache();
        CRSEnvelope latLon = layer.getLatLonBoundingBox();
        GeneralEnvelope envelope = wms.getEnvelope(layer, crs);
        assertFalse(envelope.isEmpty() || envelope.isNull() || envelope.isInfinite());
        assertNotNull("Envelope "+CRS.toSRS(crs), envelope);

        GetMapRequest getMap = wms.createGetMapRequest();
View Full Code Here


     */
    private void checkGetFeatureInfo(WebMapServer wms, Layer layer, CoordinateReferenceSystem crs)
            throws Exception {
       
        layer.clearCache();
        CRSEnvelope latLon = layer.getLatLonBoundingBox();
        GeneralEnvelope envelope = wms.getEnvelope(layer, crs);
        assertFalse(envelope.isEmpty() || envelope.isNull() || envelope.isInfinite());
        assertNotNull("Envelope "+CRS.toSRS(crs), envelope);
   
        GetMapRequest getMap = wms.createGetMapRequest();
View Full Code Here

            if (layer.getBoundingBoxes().isEmpty()) {
                env = layer.getEnvelope(DefaultGeographicCRS.WGS84);
            }
            else {
                CRSEnvelope bbox;
                String epsg4326 = "EPSG:4326";
                String epsg4269 = "EPSG:4269";
                if (layer.getBoundingBoxes().containsKey(epsg4326)) {
                    bbox = layer.getBoundingBoxes().get(epsg4326);
                } else if (layer.getBoundingBoxes().containsKey(epsg4269)) {
                    bbox = layer.getBoundingBoxes().get(epsg4269);
                } else {
                    bbox = layer.getBoundingBoxes().values().iterator().next();
                }
               
                try {
                    crs = CRS.decode(bbox.getEPSGCode());
                    env = new ReferencedEnvelope(bbox.getMinX(), bbox.getMaxX(), bbox.getMinY(),
                            bbox.getMaxY(), crs);
                } catch (NoSuchAuthorityCodeException e) {
                    crs = DefaultGeographicCRS.WGS84;
                    env = layer.getEnvelope(crs);
                } catch (FactoryException e) {
                    crs = DefaultGeographicCRS.WGS84;
View Full Code Here

                    re = new ReferencedEnvelope(miny, maxy, minx, maxx, wli.getNativeCRS());
                }
            }
            wli.setNativeBoundingBox(re);
        }
        CRSEnvelope llbbox = layer.getLatLonBoundingBox();
        if (llbbox != null) {
            ReferencedEnvelope re = new ReferencedEnvelope(llbbox.getMinX(), llbbox.getMaxX(),
                    llbbox.getMinY(), llbbox.getMaxY(), DefaultGeographicCRS.WGS84);
            wli.setLatLonBoundingBox(re);
        } else if (wli.getNativeBoundingBox() != null) {
            try {
                wli.setLatLonBoundingBox(wli.getNativeBoundingBox().transform(
                        DefaultGeographicCRS.WGS84, true));
View Full Code Here

            ReferencedEnvelope re = new ReferencedEnvelope(envelope.getMinimum(0), envelope
                    .getMaximum(0), envelope.getMinimum(1), envelope.getMaximum(1), wli
                    .getNativeCRS());
            wli.setNativeBoundingBox(re);
        }
        CRSEnvelope llbbox = layer.getLatLonBoundingBox();
        if (llbbox != null) {
            ReferencedEnvelope re = new ReferencedEnvelope(llbbox.getMinX(), llbbox.getMaxX(),
                    llbbox.getMinY(), llbbox.getMaxY(), DefaultGeographicCRS.WGS84);
            wli.setLatLonBoundingBox(re);
        } else if (wli.getNativeBoundingBox() != null) {
            try {
                wli.setLatLonBoundingBox(wli.getNativeBoundingBox().transform(
                        DefaultGeographicCRS.WGS84, true));
View Full Code Here

                GridSubsetFactory.createGridSubSet(gridSetBroker.WORLD_EPSG3857, bounds3785, 0, 30));

        if (additionalBounds != null && additionalBounds.size() > 0) {
            Iterator<CRSEnvelope> iter = additionalBounds.values().iterator();
            while (iter.hasNext()) {
                CRSEnvelope env = iter.next();
                SRS srs = null;
                if (env.getEPSGCode() != null) {
                    srs = SRS.getSRS(env.getEPSGCode());
                }

                if (srs == null) {
                    log.error(env.toString() + " has no EPSG code");
                } else if (srs.getNumber() == 4326 || srs.getNumber() == 900913
                        || srs.getNumber() == 3857) {
                    log.debug("Skipping " + srs.toString() + " for " + name);
                } else {
                    String gridSetName = name + ":" + srs.toString();
                    BoundingBox extent = new BoundingBox(env.getMinX(), env.getMinY(),
                            env.getMaxX(), env.getMaxY());

                    GridSet gridSet = GridSetFactory.createGridSet(gridSetName, srs, extent, false,
                            25, null, GridSetFactory.DEFAULT_PIXEL_SIZE_METER, 256, 256, false);
                    grids.put(gridSetName, GridSubsetFactory.createGridSubSet(gridSet));
                }
View Full Code Here

       
        List<Layer> layers = new LinkedList<Layer>();
       
        Layer l = new Layer();
        l.setName("Foo");
        l.setLatLonBoundingBox(new CRSEnvelope());
        layers.add(l);
       
        globalConfig.setDefaultValues(capture(layerCapture)); expectLastCall().times(layers.size());
       
        expect(cap.getLayerList()).andReturn(layers);
View Full Code Here

TOP

Related Classes of org.geotools.data.ows.CRSEnvelope

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.