[gdal-dev] Does WMS TMS minidriver support a local path for <ServerURL>?

Even Rouault even.rouault at mines-paris.org
Mon Mar 21 16:46:08 EDT 2011


Le lundi 21 mars 2011 21:03:50, Jeff Ruby a écrit :

Well, I see I answered a bit too fast in my first answer. I blindly assumed 
that Curl would behave exactly the same way with file:// or http:// URL, but 
actually it doesn't. I have push a change in trunk, in 
http://trac.osgeo.org/gdal/changeset/22007 , to make file:// URL work. Tested 
lightly.

> I get the same result if I use file://c:/temp/7/0/0
> 
> I've also every permutation I can think of, but none seemed to work.
> BTW, I'm trying run gdal_translate:
> 
> gdal_translate  my.xml  my.tif
> 
> I don't think I mentioned that previously.
> 
> Thanks much for your responses, Even.
> 
> On Mon, Mar 21, 2011 at 3:48 PM, Even Rouault
> 
> <even.rouault at mines-paris.org> wrote:
> > Le lundi 21 mars 2011 20:42:37, Jeff Ruby a écrit :
> >> Hmmm...it doesn't seem to work for me.  I get the following error:
> >> 
> >> 0ERROR 1: GDALWMS: Unable to download block 0, 0.
> >>   URL: file:///c:/temp/7/0/0
> >>   HTTP status code: 0, error: Couldn't open file /c:/temp/7/0/0.
> > 
> > --> The error message shows that it tries to open "/c:/temp/7/0/0", note
> > the leading slash. The reason is your URL below where you have the 2
> > slashes of file:// plus one additional slash. Try removing it.
> > 
> >> ERROR 1: IReadBlock failed at X offset 0, Y offset 0
> >> ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
> >> 
> >> 
> >> All my tiles are in c:\temp.  Below is my xml file:
> >> 
> >> <GDAL_WMS>
> >>   <Service name="TMS">
> >>     <ServerUrl>file:///c:/temp/${z}/${x}/${y}</ServerUrl>
> >>     <SRS>EPSG:32618</SRS>
> >>   </Service>
> >>   <DataWindow>
> >>     <UpperLeftX>224270.0</UpperLeftX>
> >>     <UpperLeftY>3731360.0</UpperLeftY>
> >>     <LowerRightX>226811.0</LowerRightX>
> >>     <LowerRightY>3728689.0</LowerRightY>
> >>     <SizeX>25088</SizeX>
> >>     <SizeY>26624</SizeY>
> >>     <TileCountX>49</TileCountX>
> >>     <TileCountY>52</TileCountY>
> >>     <TileLevel>7</TileLevel>
> >>   </DataWindow>
> >>   <Projection>EPSG:32618</Projection>
> >>   <BlockSizeX>25088</BlockSizeX>
> >>   <BlockSizeY>26624</BlockSizeY>
> >>   <BandsCount>3</BandsCount>
> >>   <Cache/>
> >> </GDAL_WMS>
> >> 
> >> On Fri, Mar 18, 2011 at 4:11 PM, Even Rouault
> >> 
> >> <even.rouault at mines-paris.org> wrote:
> >> > Le vendredi 18 mars 2011 21:00:12, Jeff Ruby a écrit :
> >> >> Hi,
> >> >> 
> >> >> I've built a TMS structure using gdal2tiles.  I'd like to access the
> >> >> files directly not via a webserver.
> >> >> 
> >> >> It appears the WMS TMS minidriver may be an option and I'd like to
> >> >> know if <ServerURL> supports reference to a local drive\path.
> >> > 
> >> > Yes, use file://a_directory_name
> >> > 
> >> >> Thanks much,
> >> >> -Jeff
> >> >> _______________________________________________
> >> >> gdal-dev mailing list
> >> >> gdal-dev at lists.osgeo.org
> >> >> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list