congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RasterIOOptions.forFile
Code IndexAdd Tabnine to your IDE (free)

How to use
forFile
method
in
org.deegree.coverage.raster.io.RasterIOOptions

Best Java code snippets using org.deegree.coverage.raster.io.RasterIOOptions.forFile (Showing top 6 results out of 315)

origin: deegree/deegree3

/**
 * Load a raster from a file.
 * 
 * @param filename
 *            the filename of the raster
 * @return the loaded raster as an AbstractRaster
 * @throws IOException
 */
public static AbstractRaster loadRasterFromFile( File filename )
            throws IOException {
  RasterIOOptions options = RasterIOOptions.forFile( filename );
  return loadRasterFromFile( filename, options, null );
}
origin: deegree/deegree3

/**
 * loads the raster
 * 
 * @param tileBaseDir
 * @return the loaded simpleraster
 * @throws IOException
 */
public AbstractRaster loadRaster( String tileBaseDir )
            throws IOException {
  File file = new File( getFullFileName( tileBaseDir ) );
  RasterReader reader = new IIORasterReader();
  RasterIOOptions options = RasterIOOptions.forFile( file, getEnvelope() );
  return reader.load( file, options );
}
origin: deegree/deegree3

private static void transformRaster( String[] args, String srcCRS, String dstCRS, InterpolationType type,
                   OriginLocation location ) {
  try {
    MemoryTileContainer tileContainer = new MemoryTileContainer();
    for ( int i = 0; i < args.length - 1; i++ ) {
      if ( args[i] != null ) {
        File f = new File( args[i] );
        RasterIOOptions options = RasterIOOptions.forFile( f );
        options.add( RasterIOOptions.GEO_ORIGIN_LOCATION, location.name() );
        tileContainer.addTile( RasterFactory.loadRasterFromFile( f, options ) );
      }
    }
    AbstractRaster srcRaster = new TiledRaster( tileContainer, null );
    RasterTransformer transf = new RasterTransformer( dstCRS );
    srcRaster.setCoordinateSystem( CRSManager.getCRSRef( srcCRS ) );
    AbstractRaster result = transf.transform( srcRaster, type );
    RasterFactory.saveRasterToFile( result, new File( args[args.length - 1] ) );
  } catch ( Exception ex ) {
    System.err.println( "Couldn't transform raster file: " );
    ex.printStackTrace();
    System.exit( 2 );
  }
}
origin: deegree/deegree3

RasterIOOptions nOpts = options;
if ( nOpts == null ) {
  nOpts = RasterIOOptions.forFile( filename );
origin: deegree/deegree3

try {
  LOG.info( "Creating raster from file: {}", filename );
  RasterIOOptions newOpts = RasterIOOptions.forFile( filename );
  newOpts.copyOf( options );
  AbstractRaster raster = RasterFactory.loadRasterFromFile( filename, newOpts );
origin: deegree/deegree3

try {
  LOG.info( "Creating raster from file: {}", filename );
  RasterIOOptions newOpts = RasterIOOptions.forFile( filename );
  newOpts.copyOf( options );
  AbstractRaster raster = RasterFactory.loadRasterFromFile( filename, newOpts, null );
org.deegree.coverage.raster.ioRasterIOOptionsforFile

Javadoc

Return a RasterIOOption object with the format set according to the given file.

Popular methods of RasterIOOptions

  • <init>
    Set the default loading policy to one configured in the RasterDataContainerFactory
  • add
  • copyOf
    Copies the the values from the given options.
  • 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

  • Finding current android device location
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Kernel (java.awt.image)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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