Tabnine Logo
RasterIOOptions.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.deegree.coverage.raster.io.RasterIOOptions
constructor

Best Java code snippets using org.deegree.coverage.raster.io.RasterIOOptions.<init> (Showing top 16 results out of 315)

origin: deegree/deegree3

/**
 * Save a raster to a file.
 * 
 * @param raster
 * @param filename
 * @throws IOException
 */
public static void saveRasterToFile( AbstractRaster raster, File filename )
            throws IOException {
  saveRasterToFile( raster, filename, new RasterIOOptions() );
}
origin: deegree/deegree3

@Override
public AbstractRaster load( InputStream stream, RasterIOOptions options )
            throws IOException {
  BufferedReader reader = new BufferedReader( new InputStreamReader( stream ) );
  RasterIOOptions nOpts = options;
  if ( nOpts == null ) {
    nOpts = new RasterIOOptions();
  }
  setID( nOpts );
  return createSimpleRaster( reader, nOpts );
}
origin: deegree/deegree3

/**
 * Return a RasterIOOption object with the format set according to the given file.
 * 
 * @param file
 * @return RasterIOOption proper format.
 */
public static RasterIOOptions forFile( File file ) {
  RasterIOOptions result = new RasterIOOptions();
  String ext = FileUtils.getFileExtension( file );
  result.add( OPT_FORMAT, ext );
  return result;
}
origin: deegree/deegree3

@Override
public void write( OutputStream out )
            throws IOException {
  RasterIOOptions options = new RasterIOOptions();
  // lets fake GeoTiff until we have a real GeoTiff writer (TODO)
  if ( format.equalsIgnoreCase( "GeoTiff" ) ) {
    options.add( RasterIOOptions.OPT_FORMAT, "tiff" );
  } else {
    options.add( RasterIOOptions.OPT_FORMAT, format );
  }
  RasterFactory.saveRasterToStream( result, out, options );
}
origin: deegree/deegree3

/**
 * Return a RasterIOOption object with the format set according to the given file with an optional
 * {@link RasterGeoReference}.
 * 
 * @param file
 * @param envelope
 * @return RasterIOOption proper format.
 */
public static RasterIOOptions forFile( File file, RasterGeoReference envelope ) {
  RasterIOOptions result = new RasterIOOptions( envelope );
  String ext = FileUtils.getFileExtension( file );
  result.add( OPT_FORMAT, ext );
  result.add( READ_WLD_FILE, null );
  return result;
}
origin: deegree/deegree3

RasterIOOptions opts = options;
if ( opts == null ) {
  opts = new RasterIOOptions( ref );
} else {
  RasterGeoReference defRef = options.getRasterGeoReference();
origin: deegree/deegree3

DataType noDataType = DataType.fromString( dataType );
RasterIOOptions options = new RasterIOOptions( originLocation );
options.add( RasterIOOptions.OPT_FORMAT, inputType );
options.add( RasterIOOptions.CRS, crs );
origin: deegree/deegree3

private RasterIOOptions getOptions( MultiResolutionRasterConfig config, ICRS parentCrs ) {
  RasterIOOptions opts = new RasterIOOptions();
  if ( config.getStorageCRS() != null ) {
    opts.add( "CRS", config.getStorageCRS() );
  } else {
    opts.add( "CRS", parentCrs.getAlias() );
  }
  return opts;
}
origin: deegree/deegree3

/**
 * Save a raster to a file.
 * 
 * @param raster
 * @param filename
 * @param options
 *            map with options for the raster writer
 * @throws IOException
 */
public static void saveRasterToFile( AbstractRaster raster, File filename, RasterIOOptions options )
            throws IOException {
  RasterIOOptions opts = new RasterIOOptions();
  opts.copyOf( options );
  if ( !opts.contains( RasterIOOptions.OPT_FORMAT ) ) {
    String format = FileUtils.getFileExtension( filename );
    opts.add( RasterIOOptions.OPT_FORMAT, format );
  }
  RasterWriter writer = getRasterWriter( raster, opts );
  if ( writer == null ) {
    log.error( "couldn't find raster writer for " + filename );
    throw new IOException( "couldn't find raster writer" );
  }
  writer.write( raster, filename, options );
}
origin: deegree/deegree3

  LOG.debug( "Found following files: \n{}", coverageFiles.toString() );
RasterIOOptions opts = new RasterIOOptions();
opts.copyOf( options );
origin: deegree/deegree3

  LOG.debug( "Found following files: \n{}", coverageFiles.toString() );
RasterIOOptions opts = new RasterIOOptions();
opts.copyOf( options );
origin: deegree/deegree3

final RasterIOOptions options = new RasterIOOptions();
options.copyOf( this.rasterOptions );
options.add( RasterIOOptions.CRS, dstSRS.getAlias() );
origin: deegree/deegree3

  imageIndex = rasterFile.getImageIndex();
try {
  RasterIOOptions rOptions = new RasterIOOptions();
  rOptions.copyOf( options );
  if ( config.getOriginLocation() != null ) {
origin: deegree/deegree3

GridFileReader reader = new GridFileReader();
RasterIOOptions options = new RasterIOOptions();
options.setNoData( noDatas );
AbstractRaster filteredRaster = reader.load( tmpGridFile, options );
origin: deegree/deegree3

RasterIOOptions opts = new RasterIOOptions();
opts.add( IMAGE_INDEX, "" + i );
opts.add( OPT_FORMAT, "tiff" );
origin: deegree/deegree3

private AbstractRaster loadFromReader( IIORasterDataReader reader, RasterIOOptions options ) {
  width = reader.getColumns();
  height = reader.getRows();
  RasterIOOptions opts = new RasterIOOptions();
  opts.copyOf( options );
  setID( opts );
org.deegree.coverage.raster.ioRasterIOOptions<init>

Javadoc

An empty constructor, nothing is set. The loading policy is the default value taken from the RasterDataContainerFactory. Worldfile reading is on.

Popular methods of RasterIOOptions

  • add
  • copyOf
    Copies the the values from the given options.
  • forFile
    Return a RasterIOOption object with the format set according to the given file with an optional Rast
  • get
  • getCRS
  • getRasterOriginLocation
  • setNoData
    no data value. The byte[] can be created from an array of Strings by using the RasterIOOptions#creat
  • contains
  • createNoData
    Create a noData array from the given strings. Each string will be interpreted as the given type.
  • getLoadingPolicy
  • getNoDataValue
    Returns the no data value. A no data value should be added to the RasterIOOptions by using RasterIOO
  • getRasterGeoReference
  • getNoDataValue,
  • getRasterGeoReference,
  • hasRasterGeoReference,
  • readWorldFile,
  • setRasterGeoReference

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • BoxLayout (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now