Re: [gdal-dev] gdalinfo and WMS: is there a way to pass credentials via CLI?

2024-02-23 Thread andy via gdal-dev
Thank you, it works great

On Fri, 23 Feb 2024 at 18:27, Even Rouault 
wrote:

> Hi,
>
> I haven't tested but you should be able to use any of the env variable
> listed for CPLHTTPFetch() at
> https://gdal.org/api/cpl.html#_CPPv412CPLHTTPFetchPKc12CSLConstList
>
> so here GDAL_HTTP_USERPWD
>
> gdalinfo "WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi"; --config
> GDAL_HTTP_USERPWD user:password
>
> And probably that just incorporating it in the URL should work:
>
> gdalinfo "WMS:http://user:passw...@wms.geobase.ca/wms-bin/cubeserv.cgi";
>
> Even
> Le 23/02/2024 à 18:05, andy via gdal-dev a écrit :
>
> Hi,
> is there a way to pass UserPwd parameter via a gdalinfo command?
> Is there a way to pass it, without creating an XML file?
>
> Something like this
>
> gdalinfo "WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi";
> -UserPwd user:password
>
> Thank you
>
> --
> ___
>
> Andrea Borruso
> website: https://medium.com/tantotanto
> 38° 7' 48" N, 13° 21' 9" E, EPSG:4326
> ___
>
> "cercare e saper riconoscere chi e cosa,
>  in mezzo all’inferno, non è inferno,
> e farlo durare, e dargli spazio"
>
> Italo Calvino
>
> ___
> gdal-dev mailing 
> listgdal-dev@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>

-- 
___

Andrea Borruso
website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E, EPSG:4326
___

"cercare e saper riconoscere chi e cosa,
 in mezzo all’inferno, non è inferno,
e farlo durare, e dargli spazio"

Italo Calvino
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdalinfo and WMS: is there a way to pass credentials via CLI?

2024-02-23 Thread Even Rouault via gdal-dev

Hi,

I haven't tested but you should be able to use any of the env variable 
listed for CPLHTTPFetch() at 
https://gdal.org/api/cpl.html#_CPPv412CPLHTTPFetchPKc12CSLConstList


so here GDAL_HTTP_USERPWD

gdalinfo "WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi"; --config 
GDAL_HTTP_USERPWD user:password


And probably that just incorporating it in the URL should work:

gdalinfo "WMS:http://user:passw...@wms.geobase.ca/wms-bin/cubeserv.cgi";

Even

Le 23/02/2024 à 18:05, andy via gdal-dev a écrit :

Hi,
is there a way to pass UserPwd parameter via a gdalinfo command?
Is there a way to pass it, without creating an XML file?

Something like this

gdalinfo "WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi"; 
-UserPwd user:password


Thank you

--
___

Andrea Borruso
website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E, EPSG:4326
___

"cercare e saper riconoscere chi e cosa,
 in mezzo all’inferno, non è inferno,
e farlo durare, e dargli spazio"

Italo Calvino

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev