Package org.geotools.coverage.grid.io.imageio.geotiff

Examples of org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffException


        return parameters;
      }

    } catch (NoSuchIdentifierException e) {
      throw new GeoTiffException(metadata, e.getLocalizedMessage(), e);
    }

    return parameters;
  }
View Full Code Here


      try {
        final String unitSize = metadata.getGeoKey(userDefinedKey);

        // throw descriptive exception if required key is not there.
        if (unitSize == null) {
          throw new GeoTiffException(
              metadata,
              new StringBuffer(
                  "GeoTiffMetadata2CRSAdapter::createUnit:Must define unit length when using a user ")
                  .append("defined unit").toString(), null);
        }

        double sz = Double.parseDouble(unitSize);
        return base.times(sz);
      } catch (NumberFormatException nfe) {
        final IOException ioe = new GeoTiffException(metadata, nfe
            .getLocalizedMessage(), nfe);
        throw ioe;
      }
    } else {
      try {
        // using epsg code for this unit
        return (Unit) this.allAuthoritiesFactory
            .createUnit(new StringBuffer("EPSG:").append(unitCode)
                .toString());
      } catch (FactoryException fe) {
        final IOException io = new GeoTiffException(metadata, fe
            .getLocalizedMessage(), fe);
        throw io;
      }
    }
  }
View Full Code Here

    case GeoTiffPCSCodes.ModelTypeProjected:
      parseProjCRS((ProjectedCRS) crs, metadata);
      break;

    default:
      throw new GeoTiffException(
          null,
          "The supplied grid coverage uses an unsupported crs! You are allowed to use only projected and geographic coordinate reference systems",
          null);
    }
    return metadata;
View Full Code Here

          return response;
        }
      });
    } catch (Throwable e) {
      response.addException(new GeoTiffException(null, "IO error", e));
    } finally {
      listener.complete();
    }
    return response;
  }
View Full Code Here

      // update the access
      Info info = getInfo(null);
      info.setExtent( (GeneralEnvelope) coverage.getGridGeometry().getEnvelope() );
      info.setGeometry( coverage.getGridGeometry() );
    } catch (Throwable e) {
      response.addException(new GeoTiffException(null, "IO error", e));
    } finally {
      this.access.globalLock.writeLock().unlock();
    }

    return response;
View Full Code Here

            // writing ALWAYS the geophysics vew of the data
            writeImage(((GridCoverage2D) gc).geophysics(true)
                    .getRenderedImage(), this.outStream, metadata, gtParams);

        } else
            throw new GeoTiffException(
                    null,
                    "The supplied grid coverage uses an unsupported crs! You are allowed to use only projected and geographic coordinate reference systems",
                    null);
    }
View Full Code Here

                    }
                }
            }

        } else {
            throw new GeoTiffException(
                    null, "The supplied grid coverage uses an unsupported crs! You are allowed to"
                    + " use only projected and geographic coordinate reference systems", null);
        }
    }
View Full Code Here

TOP

Related Classes of org.geotools.coverage.grid.io.imageio.geotiff.GeoTiffException

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.