Package org.geoserver.catalog

Examples of org.geoserver.catalog.ProjectionPolicy


        }

        public void validate(final Form form) {
            CoordinateReferenceSystem nativeCrs;
            CoordinateReferenceSystem declaredCrs;
            ProjectionPolicy policy;

            nativeCrs = (CoordinateReferenceSystem) nativeCRS.getConvertedInput();
            declaredCrs = (CoordinateReferenceSystem) declaredCRS.getConvertedInput();
            policy = (ProjectionPolicy) projectionPolicy.getConvertedInput();
            if (policy == ProjectionPolicy.REPROJECT_TO_DECLARED) {
View Full Code Here


            featureType.setName( ftInfoReader.name() );
        }
       
        featureType.setSRS("EPSG:" + ftInfoReader.srs());
       
        ProjectionPolicy pp = ProjectionPolicy.get( ftInfoReader.srsHandling() );
        featureType.setProjectionPolicy(pp);
       
        featureType.setTitle(ftInfoReader.title());
        featureType.setAbstract(ftInfoReader.abstrct());
        featureType.getKeywords().addAll(ftInfoReader.keywords());
View Full Code Here

    }

    public ReferencedEnvelope boundingBox() throws Exception {
      CoordinateReferenceSystem declaredCRS = getCRS();
      CoordinateReferenceSystem nativeCRS = getNativeCRS();
      ProjectionPolicy php = getProjectionPolicy();
     
      ReferencedEnvelope nativeBox = this.nativeBoundingBox;
      if (nativeBox == null) {
          //back project from lat lon
          try {
View Full Code Here

            featureType.setName( ftInfoReader.name() );
        }
       
        featureType.setSRS("EPSG:" + ftInfoReader.srs());
       
        ProjectionPolicy pp = ProjectionPolicy.get( ftInfoReader.srsHandling() );
        featureType.setProjectionPolicy(pp);
       
        featureType.setTitle(ftInfoReader.title());
        featureType.setAbstract(ftInfoReader.abstrct());
        featureType.getKeywords().addAll(ftInfoReader.keywords());
View Full Code Here

        }

        public void validate(final Form form) {
            CoordinateReferenceSystem nativeCrs;
            CoordinateReferenceSystem declaredCrs;
            ProjectionPolicy policy;

            nativeCrs = (CoordinateReferenceSystem) nativeCRS.getConvertedInput();
            declaredCrs = (CoordinateReferenceSystem) declaredCRS.getConvertedInput();
            policy = (ProjectionPolicy) projectionPolicy.getConvertedInput();
            if (policy == ProjectionPolicy.REPROJECT_TO_DECLARED) {
View Full Code Here

                            AbstractGridCoverage2DReader reader = (AbstractGridCoverage2DReader) cinfo.getGridCoverageReader(null, GeoTools.getDefaultHints());

                            // get  bounds
                            final ReferencedEnvelope bounds = new ReferencedEnvelope(reader.getOriginalEnvelope());
                            // apply the bounds, taking into account the reprojection policy if need be
                            final ProjectionPolicy projectionPolicy=resourceInfo.getProjectionPolicy();
                            if (projectionPolicy != ProjectionPolicy.NONE && bounds != null) {
                                // we need to fix the registered grid for this coverage
                                final GridGeometry grid = cinfo.getGrid();
                                cinfo.setGrid(new GridGeometry2D(grid.getGridRange(),grid.getGridToCRS(), resourceInfo.getCRS()));
                            }
View Full Code Here

     * @return the native {@link CoordinateReferenceSystem} for the provided {@link ResourceInfo}.
     * @throws IOException in case something bad happems!
     */
    static CoordinateReferenceSystem getNativeCRS(ResourceInfo resourceInfo) throws IOException {
        // prepare native CRS
        ProjectionPolicy pp = resourceInfo.getProjectionPolicy();
        if (pp == null || pp == ProjectionPolicy.FORCE_DECLARED) {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.log(Level.FINE, "PropjectionPolicy null or FORCE_DECLARED");
            }
            return resourceInfo.getCRS();
View Full Code Here

                    // get bounds
                    final ReferencedEnvelope bounds = new ReferencedEnvelope(
                            reader.getOriginalEnvelope());
                    // apply the bounds, taking into account the reprojection policy if need be
                    final ProjectionPolicy projectionPolicy = resourceInfo.getProjectionPolicy();
                    if (projectionPolicy != ProjectionPolicy.NONE && bounds != null) {
                        // we need to fix the registered grid for this coverage
                        final GridGeometry grid = cinfo.getGrid();
                        cinfo.setGrid(new GridGeometry2D(grid.getGridRange(), grid.getGridToCRS(),
                                resourceInfo.getCRS()));
View Full Code Here

        }

        public void validate(final Form form) {
            CoordinateReferenceSystem nativeCrs;
            CoordinateReferenceSystem declaredCrs;
            ProjectionPolicy policy;

            nativeCrs = (CoordinateReferenceSystem) nativeCRS.getConvertedInput();
            declaredCrs = (CoordinateReferenceSystem) declaredCRS.getConvertedInput();
            policy = (ProjectionPolicy) projectionPolicy.getConvertedInput();
            if (policy == ProjectionPolicy.REPROJECT_TO_DECLARED) {
View Full Code Here

    }

    public ReferencedEnvelope boundingBox() throws Exception {
      CoordinateReferenceSystem declaredCRS = getCRS();
      CoordinateReferenceSystem nativeCRS = getNativeCRS();
      ProjectionPolicy php = getProjectionPolicy();
     
      ReferencedEnvelope nativeBox = this.nativeBoundingBox;
      if (nativeBox == null) {
          //back project from lat lon
          try {
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.ProjectionPolicy

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.