RPCCoefficientTag
Rational Polynomial Coefficients Tag
Description
RPCCoefficientTag
contains the Rational Polynomial
Coefficients (RPC) TIFF tag, which describes the relationship of latitude, longitude,
and height locations with row and column locations in an image.
The RPCCoefficientTag
object contains properties with names and
permissible values corresponding to the tag elements listed in the technical note
RPCs in GeoTIFF technical note, viewable at http://geotiff.maptools.org/rpc_prop.html.
Creation
Read an
RPCCoefficientTag
object from a GeoTIFF file by using thegeorasterinfo
orgeotiffinfo
function.Create an
RPCCoefficientTag
object by using themap.geotiff.RPCCoefficientTag
function (described here).
Description
rpctag = map.geotiff.RPCCoefficientTag
creates a default RPCCoefficientTag
object.
rpctag = map.geotiff.RPCCoefficientTag(
creates an tiffTagValue
)RPCCoefficientTag
object and sets the property
values to the corresponding values in the 92-element vector specified in
tiffTagValue
.
Input Arguments
tiffTagValue
— Value of RPCCoefficientTag
properties
92-element vector
Value of RPCCoefficientTag
properties, specified as
a 92-element vector.
Data Types: double
Properties
BiasErrorInMeters
— Root mean square bias error in meters per horizontal axis
-1
(default) | nonnegative scalar
Root mean square bias error in meters per horizontal axis, specified as
the number -1
or a nonnegative scalar. The value is
-1
only if BiasErrorInMeters
is
not specified
Data Types: double
RandomErrorInMeters
— Root mean square random error in meters per horizontal axis
-1
(default) | nonnegative scalar
Root mean square random error in meters, specified as the number
-1
or a nonnegative scalar. The value is
-1
only if RandomErrorInMeters
is not specified.
Data Types: double
LineOffset
— Line offset in pixels
0
(default) | nonnegative scalar
Line offset in pixels, specified as a nonnegative scalar, with a value of
0
by default.
Data Types: double
SampleOffset
— Sample offset in pixels
0
(default) | nonnegative scalar
Sample offset in pixels, specified as a nonnegative scalar, with a value
of 0
by default.
Data Types: double
GeodeticLatitudeOffset
— Geodetic latitude offset in degrees
0
(default) | numeric scalar
Geodetic latitude offset in degrees, specified as a numeric scalar. The
value can range from -90 <= value <= 90
.
Data Types: double
GeodeticLongitudeOffset
— Geodetic longitude offset in degrees
0
(default) | numeric scalar
Geodetic longitude offset in degrees, specified as a numeric scalar. The
value can range from -180 <= value <= 180
.
Data Types: double
GeodeticHeightOffset
— Geodetic height offset in meters
0
(default) | numeric scalar
Geodetic height offset in meters, specified as a numeric scalar.
Data Types: double
LineScale
— Line scale factor in pixels
1 (default) | positive scalar
Line scale factor in pixels, specified as a positive scalar.
Data Types: double
SampleScale
— Sample scale factor in pixels
1 (default) | positive scalar
Sample scale factor in pixels, specified as a positive scalar.
Data Types: double
GeodeticLatitudeScale
— Geodetic latitude scale in degrees
1
(default) | positive scalar
Geodetic latitude scale in degrees, specified as a positive scalar in the range (0,90].
Data Types: double
GeodeticLongitudeScale
— Geodetic longitude scale in degrees
1
(default) | positive scalar
Geodetic longitude scale in degrees, specified as positive scalar in the range (0, 180].
Data Types: double
GeodeticHeightScale
— Geodetic height scale factor in meters
1
(default) | positive scalar
Geodetic height scale factor in meters, specified as a positive scalar.
Data Types: double
LineNumeratorCoefficients
— Coefficients for the polynomial in the numerator of the r(n) equation
20-element row vector of zeros (default) | 20-element row vector
Coefficients for the polynomial in the numerator of the
r(n) equation, specified as a 20-element row vector
of class double
.
Data Types: double
LineDenominatorCoefficients
— Coefficients for the polynomial in the denominator of the r(n) equation
20-element row vector of zeros (default) | 20-element row vector
Coefficients for the polynomial in the denominator of the
r(n) equation, specified as a 20-element row vector
of class double
.
Data Types: double
SampleNumeratorCoefficients
— Coefficients for the polynomial in the numerator of the c(n) equation
20-element row vector of zeros (default) | 20-element row vector
Coefficients for the polynomial in the numerator of the
c(n) equation, specified as a 20-element row vector
of class double
.
Data Types: double
SampleDenominatorCoefficients
— Coefficients for the polynomial in the denominator of the c(n) equation
20-element row vector of zeros (default) | 20-element row vector
Coefficients for the polynomial in the denominator of the
c(n) equation, specified as a 20-element row vector
of class double
.
Data Types: double
Object Functions
double | Convert TIFF tag property values to row vector of doubles |
Examples
Create RPCCoefficientTag Object with Default Properties
Call the RPCCoefficientTag class constructor with no arguments.
rpctag = map.geotiff.RPCCoefficientTag
rpctag = RPCCoefficientTag with properties: BiasErrorInMeters: -1 RandomErrorInMeters: -1 LineOffset: 0 SampleOffset: 0 GeodeticLatitudeOffset: 0 GeodeticLongitudeOffset: 0 GeodeticHeightOffset: 0 LineScale: 1 SampleScale: 1 GeodeticLatitudeScale: 1 GeodeticLongitudeScale: 1 GeodeticHeightScale: 1 LineNumeratorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] LineDenominatorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SampleNumeratorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SampleDenominatorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
Write Raw RPC Coefficient Metadata to GeoTIFF File
This example shows how to write RPC coefficient metadata to a TIFF file. In a real workflow, you would create the RPC coefficient metadata according to the TIFF extension specification. This example does not show the specifics of how to create valid RPC metadata. To simulate raw RPC metadata, the example creates a sample TIFF file with RPC metadata and then uses imfinfo
to read this RPC metadata in raw, unprocessed form from the file. The example then writes this raw RPC metadata to a file using the geotiffwrite
function.
Create Raw RPC Coefficient Metadata
To simulate raw RPC metadata, create a simple test file and write some RPC metadata to the file. For this test file, create a toy image and a referencing object associated with the image.
myimage = zeros(180,360); latlim = [-90 90]; lonlim = [-180 180]; R = georefcells(latlim,lonlim,size(myimage));
Create an RPCCoefficientTag
metadata object and set some of the fields. The toolbox uses the RPCCoefficientTag
object to represent RPC metadata in human readable form.
rpctag = map.geotiff.RPCCoefficientTag; rpctag.LineOffset = 1; rpctag.SampleOffset = 1; rpctag.LineScale = 2; rpctag.SampleScale = 2; rpctag.GeodeticHeightScale = 500;
Write the image, the associated referencing object, and the RPCCoefficientTag
object to a file.
geotiffwrite('myfile',myimage,R,'RPCCoefficientTag',rpctag)
Read Raw RPC Coefficient Metadata
Read the RPC coefficient metadata from the test file using the imfinfo
function. When it encounters unfamiliar metadata, imfinfo
returns the data, unprocessed, in the UnknownTags
field. Note that the UnknownTags
field contains an array of 92 doubles. This is the raw RPC coefficient metadata, read from the file in unprocessed form.
info = imfinfo('myfile.tif');
info.UnknownTags
ans = struct with fields:
ID: 50844
Offset: 10680
Value: [-1 -1 1 1 0 0 0 2 2 1 1 500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
Write Raw RPC Metadata to a File
Write the raw RPC metadata to a file. First, extract the RPC coefficient metadata from the info structure.
value = info.UnknownTags.Value;
Then, construct an RPCCoefficientTag
object, passing the raw RPC metadata (array of 92 doubles) as an argument.
rpcdata = map.geotiff.RPCCoefficientTag(value)
rpcdata = RPCCoefficientTag with properties: BiasErrorInMeters: -1 RandomErrorInMeters: -1 LineOffset: 1 SampleOffset: 1 GeodeticLatitudeOffset: 0 GeodeticLongitudeOffset: 0 GeodeticHeightOffset: 0 LineScale: 2 SampleScale: 2 GeodeticLatitudeScale: 1 GeodeticLongitudeScale: 1 GeodeticHeightScale: 500 LineNumeratorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] LineDenominatorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SampleNumeratorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SampleDenominatorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
Pass the RPCCoefficientTag
object to the geotiffwrite
function and write the RPC metadata to a file.
geotiffwrite('myfile2',myimage,R,'RPCCoefficientTag',rpcdata)
To verify that the data was written to the file, read the RPC metadata from the TIFF file using geotiffinfo
. Compare the returned RPC metadata with the metadata written to the test file.
ginfo = geotiffinfo('myfile2');
ginfo.GeoTIFFTags.RPCCoefficientTag
ans = RPCCoefficientTag with properties: BiasErrorInMeters: -1 RandomErrorInMeters: -1 LineOffset: 1 SampleOffset: 1 GeodeticLatitudeOffset: 0 GeodeticLongitudeOffset: 0 GeodeticHeightOffset: 0 LineScale: 2 SampleScale: 2 GeodeticLatitudeScale: 1 GeodeticLongitudeScale: 1 GeodeticHeightScale: 500 LineNumeratorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] LineDenominatorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SampleNumeratorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SampleDenominatorCoefficients: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
Version History
Introduced in R2015b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)