[gdal-dev] OGC services requests in VRT?

Paolo Corti pcorti at gmail.com
Thu May 10 09:00:25 EDT 2012


On Thu, May 10, 2012 at 2:57 PM, Paolo Corti <pcorti at gmail.com> wrote:
> 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:
>

sorry, this is the correct output vrt file:

<VRTDataset rasterXSize="48333" rasterYSize="48333">
  <SRS>PROJCS[&quo...........</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">test.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>

-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti


More information about the gdal-dev mailing list