[gdal-dev] OGC services requests in VRT?
Paolo Corti
pcorti at gmail.com
Thu May 10 08:57:10 EDT 2012
On Thu, May 10, 2012 at 12:49 AM, Ethan Alpert <ealpert at digitalglobe.com> wrote:
> Is it possible to use an OGC call in a VRTRasterBand?
>
I guess you mean a WCS, and I think it is possible, just put the xml
file in SourceFilename under VRTRasterBand.
Very quick sample, create a test.xml file like this:
<WCS_GDAL>
<ServiceURL>http://nsidc.org/cgi-bin/atlas_south?</ServiceURL>
<CoverageName>antarctica_satellite_image</CoverageName>
</WCS_GDAL>
Now if you export this datasource to a vrt:
$ gdal_translate -of vrt test.xml test.vrt
this is the output test.vrt file:
<VRTDataset rasterXSize="48333" rasterYSize="48333">
<SRS>PROJCS["WGS 84 / Antarctic Polar
Stereographic",GEOGCS["WGS
84",DATUM["WGS_1984",SPHEROID["WGS
84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-71],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","3031"]]</SRS>
<GeoTransform> -3.1745125000000000e+06, 1.2500000000000000e+02,
0.0000000000000000e+00, 2.8160125000000000e+06,
0.0000000000000000e+00, -1.2500000000000000e+02</GeoTransform>
<Metadata />
<VRTRasterBand dataType="Int16" band="1">
<Metadata />
<SimpleSource>
<SourceFilename relativeToVRT="1">wcs2.xml</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="48333" RasterYSize="48333"
DataType="Int16" BlockXSize="1024" BlockYSize="512" />
<SrcRect xOff="0" yOff="0" xSize="48333" ySize="48333" />
<DstRect xOff="0" yOff="0" xSize="48333" ySize="48333" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>
p
--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti
More information about the gdal-dev
mailing list