[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[&quot;WGS 84 / Antarctic Polar
Stereographic&quot;,GEOGCS[&quot;WGS
84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS
84&quot;,6378137,298.257223563,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&quot;,0,AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],UNIT[&quot;degree&quot;,0.0174532925199433,AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],PROJECTION[&quot;Polar_Stereographic&quot;],PARAMETER[&quot;latitude_of_origin&quot;,-71],PARAMETER[&quot;central_meridian&quot;,0],PARAMETER[&quot;scale_factor&quot;,1],PARAMETER[&quot;false_easting&quot;,0],PARAMETER[&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],AXIS[&quot;Easting&quot;,EAST],AXIS[&quot;Northing&quot;,NORTH],AUTHORITY[&quot;EPSG&quot;,&quot;3031&quot;]]</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