[Gdal-dev] GDAL WMS Questions..
Adam Nowacki
nowak at xpam.de
Fri Mar 7 19:11:33 EST 2008
Fodder wrote:
> mchapman wrote:
>> I think you just pass the file path of the XML file to the GDALOpen
>> method.
>> That's how the WMS client works. Then just call RasterIO() and work with
>> it
>> the same way you would any other raster. That is my guess anyway.
>>
>> Martin
>>
>
> Thanks, I tried this at first but when I pass the filepath to the GDALOpen
> method I just get a nil object back (the code works for other images). I'm
> just using the demo xml from the gdal.org site:
>
> <GDAL_WMS>
> <Service name="TileService">
> <Version>1</Version>
>
> <ServerUrl>http://s0.tileservice.worldwindcentral.com/getTile?</ServerUrl>
> <Dataset>za.johannesburg_2006_20cm</Dataset>
> </Service>
> <DataWindow>
> <UpperLeftX>-180.0</UpperLeftX>
> <UpperLeftY>90.0</UpperLeftY>
> <LowerRightX>180.0</LowerRightX>
> <LowerRightY>-90.0</LowerRightY>
> <SizeX>268435456</SizeX>
> <SizeY>134217728</SizeY>
> <TileLevel>19</TileLevel>
> </DataWindow>
> <Projection>EPSG:4326</Projection>
> <OverviewCount>16</OverviewCount>
> <BlockSizeX>512</BlockSizeX>
> <BlockSizeY>512</BlockSizeY>
> <BandsCount>3</BandsCount>
> </GDAL_WMS>
If you're getting null (0) and no error message then either you have no
wms driver built in or the xml doesnt start with <GDAL_WMS>.
More information about the gdal-dev
mailing list