Package com.bbn.openmap.proj.coords

Examples of com.bbn.openmap.proj.coords.CoordinateReferenceSystem


        e1.setAttribute("maxy", "90");
        layers.appendChild(e1);
    }

    private void appendSRSBoundingBox(Document doc, Element layers, String crsCode) {
        CoordinateReferenceSystem crs = CoordinateReferenceSystem.getForCode(crsCode);
        BoundingBox bbox = crs.getBoundingBox();
        if (bbox == null) {
            return;
        }
        org.w3c.dom.Element e1 = (org.w3c.dom.Element) node(doc, "BoundingBox");
        e1.setAttribute("SRS", crs.getCode());
        e1.setAttribute("minx", Double.toString(bbox.getMinX()));
        e1.setAttribute("miny", Double.toString(bbox.getMinY()));
        e1.setAttribute("maxx", Double.toString(bbox.getMaxX()));
        e1.setAttribute("maxy", Double.toString(bbox.getMaxY()));
        layers.appendChild(e1);
View Full Code Here


        if (strSRS == null) {
            throw new WMSException("Missing SRS parameter.");
        }
       
        System.out.println("crs: " + strSRS);
        CoordinateReferenceSystem crs = CoordinateReferenceSystem.getForCode(strSRS);
        if (crs == null) {
            throw new WMSException("Invalid SRS/CRS parameter: " + strSRS, WMSException.INVALIDSRS);
        }
        parameters.crs = crs;
    }
View Full Code Here

            double maxY = Double.parseDouble(arrayBBox[3]);
            double medX = ((maxX - minX) / 2d) + minX;
            double medY = ((maxY - minY) / 2d) + minY;

            // use CRS to convert BBOX to latlon values
            CoordinateReferenceSystem crs = parameters.crs;
            parameters.bboxLatLonMinXY = crs.inverse(minX, minY);
            parameters.bboxLatLonMaxXY = crs.inverse(maxX, maxY);
            parameters.bboxLatLonCenter = crs.inverse(medX, medY);

            // TODO: use CRS to check value validity?
        } catch (NumberFormatException e) {
            throw new WMSException(
                    "Invalid BBOX parameter. BBOX parameter must be in the form of minx, miny, maxx, maxy"
View Full Code Here

TOP

Related Classes of com.bbn.openmap.proj.coords.CoordinateReferenceSystem

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.