VRT Raster (GDAL Virtual Format) Reader Parameters
Dataset
This parameter allows you to choose different naming schemes, and the number of feature types generated for the reader.
Feature type name choices:
- From File Name(s): Generates one feature type per source filename.
- From Format Name: Produces only a single feature type containing the format name.
Use this parameter to get additional metadata from source files referenced in the VRT file. Metadata information will be stored generically as format attributes on the output raster feature and may not be the same as the format attributes output generated from the underlying reader (such as GeoPackage in the following example).
Example
A VRT with the following source (a GeoPackage tiles file):
<SimpleSource> <SourceFilename relativeToVRT="1">my_geopackage.gpkg</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="8" RasterYSize="8" DataType="Byte" BlockXSize="256" BlockYSize="256" /> <SrcRect xOff="0" yOff="0" xSize="8" ySize="8" /> <DstRect xOff="0" yOff="0" xSize="8" ySize="8" /> </SimpleSource>
will expose the GeoPackage metadata as attributes in this form:
vrt_raster_band{0}.source{0}.metadata{0}.name=INTERLEAVE
vrt_raster_band{0}.source{0}.metadata{0}.value=PIXEL
vrt_raster_band{0}.source{0}.metadata{1}.name=IDENTIFIER
vrt_raster_band{0}.source{0}.metadata{1}.value=SOME_IDENTIFIER
vrt_raster_band{0}.source{0}.metadata{2}.name=ZOOM_LEVEL
vrt_raster_band{0}.source{0}.metadata{2}.value=17
Note: VRT files containing other VRT files are supported up to arbitrary depth. For example, if the above example was a VRT pulling in a band from another VRT, which was pulling a band from the above GeoPackage file (VRT <– VRT <– GeoPackage), we would see attributes of the form:
vrt_raster_band{0}.source{0}.band_metadata{0}.source{0}.metadata{0}.name=INTERLEAVE
vrt_raster_band{0}.source{0}.band_metadata{0}.source{0}.metadata{0}.value=PIXEL
Encoding
Specifies the character encoding mechanism of the underlying data source. If not specified, the reader assumes the encoding mechanism of the current system.
By default, the GCP information is preserved as properties on the raster geometry.
If you select this checkbox, the GCP information, including a GCP projection, will be read from the file and applied to the raster data as an affine transformation.
Specifies the interpolation method used to apply a GCP projection to the raster data.
- Nearest Neighbor: Applies a projection based on the value of the pixel closest to the GCP. This method is the least resource-intensive, but also produces the lowest resolution GCP.
- Bilinear: Applies a projection by averaging the closest 2x2 neighborhood of pixel values surrounding the GCP. This method produces higher-quality results than Nearest Neighbor.
- Bicubic: Applies a projection by applying a weighted average of the closest 4x4 neighborhood of pixel values surrounding the GCP, with closer pixels weighted higher than farther pixels. Bicubic interpolation requires the most amount of processing time.
Schema Attributes
Use this parameter to expose Format Attributes in Workbench when you create a workspace:
- In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
- In a non-dynamic scenario, you can use this parameter to expose additional attributes on multiple feature types.
Use Search Envelope
Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that intersect with the bounding box are returned.
If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.
When selected, this parameter removes any portions of imported features being read that are outside the Search Envelope.
The example below illustrates the results of the Search Envelope when Clip to Search Envelope is not selected (set to No) and when it is selected (set to Yes).
- No: Any features that cross the search envelope boundary will be read, including the portion that lies outside of the boundary.
- Yes: Any features that cross the search envelope boundary will be clipped at the boundary, and only the portion that lies inside the boundary will be read. The underlying function for the Clip to Search Envelope function is an intersection; however, when Clip to Search Envelope is selected, a clipping operation is also performed in addition to the intersection.