[MapServer-users] GetMap request inside python script; measuring speed of WMS?
Seth G
sethg at geographika.co.uk
Tue Jan 24 03:55:31 PST 2023
Hi Marcin,
Sorry I thought you wanted to do this within MapScript without a web server.
If you want to simply make WMS requests to any WMS server over HTTP I'd recommend the Python library OWSLib, see for example https://geopython.github.io/OWSLib/notebooks/examples/wms.html
Seth
--
web:https://geographika.net
twitter: @geographika
On Tue, Jan 24, 2023, at 12:02 PM, Marcin Niemyjski wrote:
> Seth,
>
> do I understand it correctly? I need to provide WMS's mapfile to perform request? I assume that I should be mainly interested in code part between 16 and 36 line.
>
> Thank you for quick response,
> Marcin
>
>
>
>
>
<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>
>
> Book time to meet with me <https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>
>
>
>
> *From:* Seth G <sethg at geographika.co.uk>
> *Sent:* Tuesday, January 24, 2023 11:39 AM
> *To:* Marcin Niemyjski <mniemyjski at cloudferro.com>; MapServer Users <mapserver-users at lists.osgeo.org>
> *Subject:* Re: [MapServer-users] GetMap request inside python script; measuring speed of WMS?
>
> Hi Marcin,
>
> Have a look at the example Python script at https://github.com/MapServer/MapServer/blob/main/mapscript/python/examples/wxs.py - this shows creating and calling a WMS request.
>
> Seth
>
> --
> web:https://geographika.net
> twitter: @geographika
>
> On Tue, Jan 24, 2023, at 11:36 AM, Marcin Niemyjski via MapServer-users wrote:
>> Hello,
>>
>> I want to measure how long does it takes for my WMS to response to GetMap request. I have prepared list of extents in form of python list for example:
>> ['38.04778703973034,-17.714089101743628,39.04778703973034,-16.714089101743628', '38.04778703973034,-17.714089101743628,39.04778703973034,-16.714089101743628'...]
>>
>> I'm aiming into itterating over this list and passing it's elements into GetMap request inside python script and then request GetMap and measure how long does it takes to perfome it.
>>
>> Here starts my question: How to do GetMap request inside python script, is it possible? The question is not about creating the url but about function wich does request.
>> Maybe somebody can recommend me some other way of measuring speed of WMS?
>>
>> I would like show my k8s cluster service as use-case at FOSS4G 2023 and i need some statistics for presentation 🙂
>>
>> Best,
>> Marcin
>>
>>
>>
>>
<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>
>>
>> Book time to meet with me <https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>
>>
>> _______________________________________________
>> MapServer-users mailing list
>> MapServer-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230124/677f1552/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-a1f1cvge.png
Type: image/png
Size: 528 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230124/677f1552/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-snopzlg0.png
Type: image/png
Size: 528 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230124/677f1552/attachment-0001.png>
More information about the MapServer-users
mailing list