classConnection: Connection of raster objects.

ursaConnectionR Documentation

Connection of raster objects.

Description

Class ursaConnection is a part of class ursaRaster. It defines storage of raster images and manipulations with reading and writing.

Usage

## S3 method for class 'ursaConnection'
print(x, ...)

## S3 method for class 'ursaConnection'
seek(con, where = NA, origin = "start", rw = "", ...)

Arguments

x

ursaConnection object in function print.

con

ursaConnection object in function seek.

where

Passed to seek for class connection.

origin

Passed to seek for class connection.

rw

Passed to seek for class connection.

...

print: Further arguments passed to generic functions print and str.
seek: Further arguments passed to function seek for class connection.

Details

ursaConnection get item $con from ursaRaster object.

Functions print and is.con are for developers rather than users.

Non-public function .con.skeleton() is used to generate the blank ursaConnection object. This approach provides unified sequence of list's items:

Value

ursaConnection is a list. The most of names have a relation to specification of ENVI Header Files. Items:

driver

Character. Keyword of supported image formats. Allowed "ENVI" or "GDAL".

samples

Integer. Number of image columns (samples)

lines

Integer. Number of image rows (lines)

bands

Integer. Number of image bands (channels, layers)

datatype

Integer. Keyword for data type (4 - 32-bit floating point, 2 - 16-bit signed integer, etc)

interleave

Character "bsq", "bil", "bip". Data interleave - streams of bytes in storage.

byteorder

Integer, 0 or 1. The order of bytes. byteorder=0 less significant byte first, byteorder=1 most significant byte first

endian

Character. See ⁠\dQuote{endian}⁠ argument in readBin and writeBin

swap

Integer 0 or 1. Passed to C-funcions fread and fwrite

signed

Logical. Derived from $datatype

offset

Integer. Header offset in binary file. Default is 0.

wkt

Logical. In ENVI Header files wkt=TRUE forced to use “coordinate system string” field instead of “projection info” field

nodata

Numeric. Replacement NA values in the storage.

mode

Character. storage.mode of data

sizeof

Integer, positive. Size in bytes for stored values. Extracted from $datatype

indexC

Integer vector. Sample indices in spatial cropping.

indexR

Integer vector. Line indices in spatial cropping.

indexZ

Integer vector. Band indices

posC

Integer vector. Sample indices in partial reading.

posR

Integer vector. Line indices in partial reading.

posZ

Integer vector. Band indices in spatial crottping or partial reading.

fname

Character. File name. If driver=ENVI, then full path for ENVI binary file.

connection

Character. See connections

compress

Signed integer. 0L no compressing, -1L comressed file plus decompressed file,-2L decompressed file, 1L - file will be compressed.

seek

Logical. Does connection support seek?

handle

connections in fact

Author(s)

Nikita Platonov platonov@sevin.ru

See Also

ursa(obj,"con")

Examples

session_grid(NULL)
print(methods(class="ursaConnection"))

a <- pixelsize()
write_envi(rep(a,5),"tmp1",compress=FALSE)
## change spatial domain for cropping example
g <- session_grid(regrid(lim=c(-1200000,-1400000,1600000,1800000)))
print(g)
b <- open_envi("tmp1")
d <- b[,30:70]
print(ursa(d[2:3],"con"))
close(b)
envi_remove("tmp1")

ursa documentation built on Sept. 30, 2024, 9:35 a.m.