Examples of toWKT()


Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

        st.setDouble(index + 3, box.getMaxY());

        if (box.getCoordinateReferenceSystem() != null) {
            CoordinateReferenceSystem crs = box.getCoordinateReferenceSystem();
            if (storeCRSAsWKT) {
                st.setString(index+4, crs.toWKT());
            }
            else {
                try {
                    st.setString(index+4, "EPSG:"+ CRS.lookupEpsgCode(crs, true));
                }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

            .key("maxx").value(bbox.getMaxX())
            .key("maxy").value(bbox.getMaxY());

        CoordinateReferenceSystem crs = bbox.getCoordinateReferenceSystem();
        if (crs != null) {
            json.key("crs").value(crs.toWKT());
        }

        json.endObject();
    }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

            Integer epsgCode = EPSG_LOOKUP_CACHE.lookupEPSGCode(crs);
            if (epsgCode != null) {
                epsgCrs = CRS.decode("EPSG:" + epsgCode);
            }
            if (epsgCrs != null) {
                String epsgWKT = epsgCrs.toWKT();
                FileUtils.writeStringToFile(getPrjFile(), epsgWKT);
            }
        }
        catch (FactoryException e) {
            throw (IOException) new IOException().initCause(e);
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

                cropEnvelope = CRS.transform(cropEnvelope, sourceCRS);
            }
        } catch (TransformException e) {
            throw new WCS20Exception("Unable to initialize subsetting envelope",
                    WCS20Exception.WCS20ExceptionCode.SubsettingCrsNotSupported,
                    subsettingCRS.toWKT(), e);
        }

        GridCoverage2D cropped = WCSUtils.crop(coverage, cropEnvelope);
        cropped = GridCoverageWrapper.wrapCoverage(cropped, coverage, null, null, false);
        return cropped;
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

            st.setNull(index, Types.VARCHAR);
        }
        else {
            CoordinateReferenceSystem crs = (CoordinateReferenceSystem) value;
            try {
                st.setString(index, storeAsWKT ? crs.toWKT() : "EPSG:"+CRS.lookupEpsgCode(crs, true));
            }
            catch(Exception e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

        assertFalse(window.isShown());
       
        tester.clickLink("form:crs:wkt", true);
        assertTrue(window.isShown());
       
        tester.assertModelValue("form:crs:popup:content:wkt", crs.toWKT());
    }
   
    @Test
    public void testPopupWindowNoCRS() throws Exception {
        // see GEOS-3207
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

        st.setDouble(index + 3, box.getMaxY());

        if (box.getCoordinateReferenceSystem() != null) {
            CoordinateReferenceSystem crs = box.getCoordinateReferenceSystem();
            if (storeCRSAsWKT) {
                st.setString(index+4, crs.toWKT());
            }
            else {
                try {
                    st.setString(index+4, "EPSG:"+ CRS.lookupEpsgCode(crs, true));
                }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

            //

            // prepare native CRS
            CoordinateReferenceSystem nativeCRS = DownloadUtilities.getNativeCRS(coverageInfo);
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("Native CRS is " + nativeCRS.toWKT());
            }

            //
            // STEP 0 - Push ROI back to native CRS (if ROI is provided)
            //
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

            final ProgressListener progressListener) throws Exception {

        // prepare native CRS
        CoordinateReferenceSystem nativeCRS = DownloadUtilities.getNativeCRS(resourceInfo);
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("Native CRS is " + nativeCRS.toWKT());
        }

        //
        // STEP 0 - Push ROI back to native CRS (if ROI is provided)
        //
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem.toWKT()

        }

        // prepare native CRS
        CoordinateReferenceSystem nativeCRS = DownloadUtilities.getNativeCRS(resourceInfo);
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("Native CRS is " + nativeCRS.toWKT());
        }

        //
        // STEP 0 - Push ROI back to native CRS (if ROI is provided)
        //
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.