Re: [Geoserver-users] proper use of sld to display wms layer

2022-09-21 Thread Julien Robitaille
gt;> écrit :
>>>
>>>> Please remember to include the user list (so others can answer you) and
>>>> yeah sorry it does not support pictures.
>>>>
>>>> Where is the resolution of your raster determined?
>>>>
>>>> Jody
>>>>
>>>> On Thu, Sep 8, 2022 at 12:31 PM Julien Robitaille 
>>>> wrote:
>>>>
>>>>> hello,
>>>>> As a follow up, I would just need another specification.
>>>>> Here is the rendering when the dpi is set to 200:
>>>>>
>>>>> And here is the rendering when set to 60:
>>>>>
>>>>
>>>> As you can see, the resolution of the image didnt change (same number
>>>>> of arrows for the same zoom level). Only the size of the arrows have.
>>>>> Is it the expected result? What I am looking for is a way to decrease
>>>>> resolution for specific user cases.
>>>>> Thanks again!
>>>>> Julien
>>>>>
>>>>> Le jeu. 8 sept. 2022 à 12:22, Jody Garnett  a
>>>>> écrit :
>>>>>
>>>>>> aside: Your messages are being held because of the attached images;
>>>>>> here is my reply.
>>>>>>
>>>>>> The challenge faced here is not particular to geoserver - it is a
>>>>>> design challenge on how you wish to adapt your map to different
>>>>>> environments.
>>>>>>
>>>>>> You can supply GeoServer with the dpi of the display used  (have
>>>>>> openlayers pass this information in as a format option) . GeoSerer will
>>>>>> adjust the sizes appropriately. Much of the other information is 
>>>>>> available
>>>>>> as env variables for use when styling.
>>>>>>
>>>>>> Reference:
>>>>>> -
>>>>>> https://docs.geoserver.org/latest/en/user/services/wms/vendor.html?highlight=dpi#format-options
>>>>>> -
>>>>>>
>>>>>> https://docs.geoserver.org/latest/en/user/styling/sld/extensions/substitution.html#sld-variable-substitution
>>>>>>
>>>>>>
>>>>>> On Thu, Sep 8, 2022 at 8:17 AM Julien Robitaille 
>>>>>> wrote:
>>>>>>
>>>>>>> Hello!
>>>>>>> I found out that the difference in size from one zoom level to
>>>>>>> another one comes from openlayers.
>>>>>>>
>>>>>>> But in any cases, what I would like to do is to increase the sizes
>>>>>>> of the arrows, so it is easier to see. The problem is that the display 
>>>>>>> of
>>>>>>> those arrows depends a lot on whether the user uses a computer or a
>>>>>>> smartphone.
>>>>>>> Here is an example. The first picture is from my computer, and the
>>>>>>> second one is from my phone.
>>>>>>> As you can see, the resolution of the arrows is not the same, even
>>>>>>> at the approximate same zoom level.
>>>>>>>
>>>>>>> (images removed)
>>>>>>>
>>>>>>
>>>>>>> As you can see, increasing the size of the arrows would make the app
>>>>>>> unreadable on the phone.
>>>>>>> Does anyone know how to address this problem? Is it something that
>>>>>>> can be fixed by geoserver, or is it more of an openlayers' problem?
>>>>>>>
>>>>>>> Thanks a lot for your help!
>>>>>>> Julien
>>>>>>>
>>>>>>> Le mar. 6 sept. 2022 à 10:08, Olivier Gagnon 
>>>>>>> a écrit :
>>>>>>>
>>>>>>>> Hi Julien (je suis aussi du Québec) !
>>>>>>>>
>>>>>>>> Have you tried using a fixed value for the Size attribute ?
>>>>>>>>
>>>>>>>> ex: 8
>>>>>>>>
>>>>>>>> As I can see in your sld, the size is modified using the Categorize
>>>>>>>> function.
>>>>>>>>
>>>>>>>> Hope this helps

Re: [Geoserver-users] proper use of sld to display wms layer

2022-09-18 Thread Jody Garnett
gt;>>>> Here is an example. The first picture is from my computer, and the
>>>>>> second one is from my phone.
>>>>>> As you can see, the resolution of the arrows is not the same, even at
>>>>>> the approximate same zoom level.
>>>>>>
>>>>>> (images removed)
>>>>>>
>>>>>
>>>>>> As you can see, increasing the size of the arrows would make the app
>>>>>> unreadable on the phone.
>>>>>> Does anyone know how to address this problem? Is it something that
>>>>>> can be fixed by geoserver, or is it more of an openlayers' problem?
>>>>>>
>>>>>> Thanks a lot for your help!
>>>>>> Julien
>>>>>>
>>>>>> Le mar. 6 sept. 2022 à 10:08, Olivier Gagnon  a
>>>>>> écrit :
>>>>>>
>>>>>>> Hi Julien (je suis aussi du Québec) !
>>>>>>>
>>>>>>> Have you tried using a fixed value for the Size attribute ?
>>>>>>>
>>>>>>> ex: 8
>>>>>>>
>>>>>>> As I can see in your sld, the size is modified using the Categorize
>>>>>>> function.
>>>>>>>
>>>>>>> Hope this helps. Good Luck!
>>>>>>>
>>>>>>> Olivier
>>>>>>>
>>>>>>> Envoyé à partir d’Outlook <http://aka.ms/weboutlook>
>>>>>>>
>>>>>>> --
>>>>>>> *De :* Julien Robitaille 
>>>>>>> *Envoyé :* 6 septembre 2022 08:53
>>>>>>> *À :* geoserver-users@lists.sourceforge.net <
>>>>>>> geoserver-users@lists.sourceforge.net>
>>>>>>> *Objet :* [Geoserver-users] proper use of sld to display wms layer
>>>>>>>
>>>>>>> Hello!
>>>>>>> I have a raster layer that displays surface currents.
>>>>>>> Everything works great, but there are some details that I wish to get 
>>>>>>> rid
>>>>>>> of but dont know how to.
>>>>>>> Below, the two pictures show what the layer looks like at a
>>>>>>> different zoom level. The first one is zoomed out compared to the second
>>>>>>> one. As you can see, the arrows are smaller on the second one. I wish it
>>>>>>> wasnt like this. I'm trying to make it so that the arrows stay the same
>>>>>>> size.
>>>>>>> I've tried to play around with the wms_scale_denominator property in
>>>>>>> my sld, but it doesnt seem to do the trick.
>>>>>>>
>>>>>>> (images removed)
>>>>>>>
>>>>>>> Here is my SLD:
>>>>>>>
>>>>>>> 
>>>>>>> >>>>>>xsi:schemaLocation="http://www.opengis.net/sld
>>>>>>> StyledLayerDescriptor.xsd"
>>>>>>>xmlns="http://www.opengis.net/sld;
>>>>>>>xmlns:ogc="http://www.opengis.net/ogc;
>>>>>>>xmlns:xlink="http://www.w3.org/1999/xlink;
>>>>>>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
>>>>>>>   
>>>>>>>currents
>>>>>>>
>>>>>>>  currents
>>>>>>>  
>>>>>>>
>>>>>>>  
>>>>>>>
>>>>>>>  data
>>>>>>>
>>>>>>>
>>>>>>>  interpolation
>>>>>>>  InterpolationBilinear
>>>>>>>
>>>>>>>  
>>>>>>>   
>>>>>>>   
>>>>>>> Heading
>>>>>>> 
>>>>>>>  
>>>>>>>
>>>>>>>  extshape://narrow
>>>>>>>  
>>>>>>>
>>>>>>> 
>>>>>>>   
>>>>>>> 
>>>>>>>  
>>>>>>>

Re: [Geoserver-users] proper use of sld to display wms layer

2022-09-09 Thread Julien Robitaille
Thanks for your input. I've looked at the DOTS_PER_INCH, but I dont think
it is still a valid parameter in openlayers (at least since the version 6).
But I found out that the arrow density seems to depend on
the devicePixelRatio of the window. As a matter of fact, if I increase
the devicePixelRatio of my browser (to a value similar to the one of my
phone) by zooming it in, I get the same arrow density as the layer
displayed on a smartphone.
So with that information I will be able to create two different sld styles,
one for higher devicePixelRatio (usually smartphones), and one for
lower devicePixelRatio (usually computers).
Thanks everyone for your help!
Julien

Le ven. 9 sept. 2022 à 10:26, Russ Hore  a écrit :

> I am no expert in OpenLayers but could the OpenLayers option;
>
> OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;
>
> help? Can it force the DPI to be the same no matter what the Device DPI is.
>
>
> On 9 Sep 2022, at 14:39, Julien Robitaille  wrote:
>
> By resolution, do you mean the dpi resolution? Or maybe the "resolution"
> of my raster layer (size of georeferenced cells)? The best way to play with
> the concentration of arrows that I found was to play with
> the wms_scale_denominator. So I thought I could make two different sld
> styles, one for computers, and another one for smartphones, with different
> values of wms_scale_denominator. And depending on the screen size and/or
> resolution of screen of the user, one of the two styles would be applied to
> the layer.
> Thanks again,
> Julien
>
> Le jeu. 8 sept. 2022 à 18:16, Jody Garnett  a
> écrit :
>
>> Please remember to include the user list (so others can answer you) and
>> yeah sorry it does not support pictures.
>>
>> Where is the resolution of your raster determined?
>>
>> Jody
>>
>> On Thu, Sep 8, 2022 at 12:31 PM Julien Robitaille 
>> wrote:
>>
>>> hello,
>>> As a follow up, I would just need another specification.
>>> Here is the rendering when the dpi is set to 200:
>>>
>>> And here is the rendering when set to 60:
>>>
>>
>> As you can see, the resolution of the image didnt change (same number of
>>> arrows for the same zoom level). Only the size of the arrows have.
>>> Is it the expected result? What I am looking for is a way to decrease
>>> resolution for specific user cases.
>>> Thanks again!
>>> Julien
>>>
>>> Le jeu. 8 sept. 2022 à 12:22, Jody Garnett  a
>>> écrit :
>>>
>>>> aside: Your messages are being held because of the attached images;
>>>> here is my reply.
>>>>
>>>> The challenge faced here is not particular to geoserver - it is a
>>>> design challenge on how you wish to adapt your map to different
>>>> environments.
>>>>
>>>> You can supply GeoServer with the dpi of the display used  (have
>>>> openlayers pass this information in as a format option) . GeoSerer will
>>>> adjust the sizes appropriately. Much of the other information is available
>>>> as env variables for use when styling.
>>>>
>>>> Reference:
>>>> -
>>>> https://docs.geoserver.org/latest/en/user/services/wms/vendor.html?highlight=dpi#format-options
>>>> -
>>>>
>>>> https://docs.geoserver.org/latest/en/user/styling/sld/extensions/substitution.html#sld-variable-substitution
>>>>
>>>>
>>>> On Thu, Sep 8, 2022 at 8:17 AM Julien Robitaille 
>>>> wrote:
>>>>
>>>>> Hello!
>>>>> I found out that the difference in size from one zoom level to another
>>>>> one comes from openlayers.
>>>>>
>>>>> But in any cases, what I would like to do is to increase the sizes of
>>>>> the arrows, so it is easier to see. The problem is that the display of
>>>>> those arrows depends a lot on whether the user uses a computer or a
>>>>> smartphone.
>>>>> Here is an example. The first picture is from my computer, and the
>>>>> second one is from my phone.
>>>>> As you can see, the resolution of the arrows is not the same, even at
>>>>> the approximate same zoom level.
>>>>>
>>>>> (images removed)
>>>>>
>>>>
>>>>> As you can see, increasing the size of the arrows would make the app
>>>>> unreadable on the phone.
>>>>> Does anyone know how to address this problem? Is it something that can
>>>>> be fixed by geoserver, or is it more of an openl

Re: [Geoserver-users] proper use of sld to display wms layer

2022-09-09 Thread Russ Hore
I am no expert in OpenLayers but could the OpenLayers option;

OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

help? Can it force the DPI to be the same no matter what the Device DPI is.


> On 9 Sep 2022, at 14:39, Julien Robitaille  wrote:
> 
> By resolution, do you mean the dpi resolution? Or maybe the "resolution" of 
> my raster layer (size of georeferenced cells)? The best way to play with the 
> concentration of arrows that I found was to play with the 
> wms_scale_denominator. So I thought I could make two different sld styles, 
> one for computers, and another one for smartphones, with different values of 
> wms_scale_denominator. And depending on the screen size and/or resolution of 
> screen of the user, one of the two styles would be applied to the layer.
> Thanks again,
> Julien
> 
> Le jeu. 8 sept. 2022 à 18:16, Jody Garnett  <mailto:jody.garn...@gmail.com>> a écrit :
> Please remember to include the user list (so others can answer you) and yeah 
> sorry it does not support pictures.
> 
> Where is the resolution of your raster determined? 
> 
> Jody
> 
> On Thu, Sep 8, 2022 at 12:31 PM Julien Robitaille  <mailto:robitail...@ogsl.ca>> wrote:
> hello,
> As a follow up, I would just need another specification. 
> Here is the rendering when the dpi is set to 200:
> 
> And here is the rendering when set to 60:
> 
> As you can see, the resolution of the image didnt change (same number of 
> arrows for the same zoom level). Only the size of the arrows have. 
> Is it the expected result? What I am looking for is a way to decrease 
> resolution for specific user cases. 
> Thanks again! 
> Julien
> 
> Le jeu. 8 sept. 2022 à 12:22, Jody Garnett  <mailto:jody.garn...@gmail.com>> a écrit :
> aside: Your messages are being held because of the attached images; here is 
> my reply.
> 
> The challenge faced here is not particular to geoserver - it is a design 
> challenge on how you wish to adapt your map to different environments.
> 
> You can supply GeoServer with the dpi of the display used  (have openlayers 
> pass this information in as a format option) . GeoSerer will adjust the sizes 
> appropriately. Much of the other information is available as env variables 
> for use when styling.
> 
> Reference:
> - 
> https://docs.geoserver.org/latest/en/user/services/wms/vendor.html?highlight=dpi#format-options
>  
> <https://docs.geoserver.org/latest/en/user/services/wms/vendor.html?highlight=dpi#format-options>
> - 
> https://docs.geoserver.org/latest/en/user/styling/sld/extensions/substitution.html#sld-variable-substitution
>  
> <https://docs.geoserver.org/latest/en/user/styling/sld/extensions/substitution.html#sld-variable-substitution>
> 
> 
> On Thu, Sep 8, 2022 at 8:17 AM Julien Robitaille  <mailto:robitail...@ogsl.ca>> wrote:
> Hello! 
> I found out that the difference in size from one zoom level to another one 
> comes from openlayers.
> 
> But in any cases, what I would like to do is to increase the sizes of the 
> arrows, so it is easier to see. The problem is that the display of those 
> arrows depends a lot on whether the user uses a computer or a smartphone.
> Here is an example. The first picture is from my computer, and the second one 
> is from my phone. 
> As you can see, the resolution of the arrows is not the same, even at the 
> approximate same zoom level.
> 
> (images removed)
> 
> As you can see, increasing the size of the arrows would make the app 
> unreadable on the phone. 
> Does anyone know how to address this problem? Is it something that can be 
> fixed by geoserver, or is it more of an openlayers' problem? 
> 
> Thanks a lot for your help!
> Julien
> 
> Le mar. 6 sept. 2022 à 10:08, Olivier Gagnon  <mailto:mcno...@hotmail.com>> a écrit :
> Hi Julien (je suis aussi du Québec) !
> 
> Have you tried using a fixed value for the Size attribute ? 
> 
> ex: 8
> 
> As I can see in your sld, the size is modified using the Categorize function.
> 
> Hope this helps. Good Luck!
> 
> Olivier
> 
> Envoyé à partir d’Outlook <http://aka.ms/weboutlook>
> 
> De : Julien Robitaille mailto:robitail...@ogsl.ca>>
> Envoyé : 6 septembre 2022 08:53
> À : geoserver-users@lists.sourceforge.net 
> <mailto:geoserver-users@lists.sourceforge.net> 
>  <mailto:geoserver-users@lists.sourceforge.net>>
> Objet : [Geoserver-users] proper use of sld to display wms layer
>  
> Hello! 
> I have a raster layer that displays surface currents. Everything works great, 
> but there are some details that I wish to get rid of but dont know how to. 
> Below, the two pictures show what the layer looks like at a different zoo

Re: [Geoserver-users] proper use of sld to display wms layer

2022-09-09 Thread Julien Robitaille
By resolution, do you mean the dpi resolution? Or maybe the "resolution" of
my raster layer (size of georeferenced cells)? The best way to play with
the concentration of arrows that I found was to play with
the wms_scale_denominator. So I thought I could make two different sld
styles, one for computers, and another one for smartphones, with different
values of wms_scale_denominator. And depending on the screen size and/or
resolution of screen of the user, one of the two styles would be applied to
the layer.
Thanks again,
Julien

Le jeu. 8 sept. 2022 à 18:16, Jody Garnett  a
écrit :

> Please remember to include the user list (so others can answer you) and
> yeah sorry it does not support pictures.
>
> Where is the resolution of your raster determined?
>
> Jody
>
> On Thu, Sep 8, 2022 at 12:31 PM Julien Robitaille 
> wrote:
>
>> hello,
>> As a follow up, I would just need another specification.
>> Here is the rendering when the dpi is set to 200:
>>
>> And here is the rendering when set to 60:
>>
>
> As you can see, the resolution of the image didnt change (same number of
>> arrows for the same zoom level). Only the size of the arrows have.
>> Is it the expected result? What I am looking for is a way to decrease
>> resolution for specific user cases.
>> Thanks again!
>> Julien
>>
>> Le jeu. 8 sept. 2022 à 12:22, Jody Garnett  a
>> écrit :
>>
>>> aside: Your messages are being held because of the attached images; here
>>> is my reply.
>>>
>>> The challenge faced here is not particular to geoserver - it is a design
>>> challenge on how you wish to adapt your map to different environments.
>>>
>>> You can supply GeoServer with the dpi of the display used  (have
>>> openlayers pass this information in as a format option) . GeoSerer will
>>> adjust the sizes appropriately. Much of the other information is available
>>> as env variables for use when styling.
>>>
>>> Reference:
>>> -
>>> https://docs.geoserver.org/latest/en/user/services/wms/vendor.html?highlight=dpi#format-options
>>> -
>>>
>>> https://docs.geoserver.org/latest/en/user/styling/sld/extensions/substitution.html#sld-variable-substitution
>>>
>>>
>>> On Thu, Sep 8, 2022 at 8:17 AM Julien Robitaille 
>>> wrote:
>>>
>>>> Hello!
>>>> I found out that the difference in size from one zoom level to another
>>>> one comes from openlayers.
>>>>
>>>> But in any cases, what I would like to do is to increase the sizes of
>>>> the arrows, so it is easier to see. The problem is that the display of
>>>> those arrows depends a lot on whether the user uses a computer or a
>>>> smartphone.
>>>> Here is an example. The first picture is from my computer, and the
>>>> second one is from my phone.
>>>> As you can see, the resolution of the arrows is not the same, even at
>>>> the approximate same zoom level.
>>>>
>>>> (images removed)
>>>>
>>>
>>>> As you can see, increasing the size of the arrows would make the app
>>>> unreadable on the phone.
>>>> Does anyone know how to address this problem? Is it something that can
>>>> be fixed by geoserver, or is it more of an openlayers' problem?
>>>>
>>>> Thanks a lot for your help!
>>>> Julien
>>>>
>>>> Le mar. 6 sept. 2022 à 10:08, Olivier Gagnon  a
>>>> écrit :
>>>>
>>>>> Hi Julien (je suis aussi du Québec) !
>>>>>
>>>>> Have you tried using a fixed value for the Size attribute ?
>>>>>
>>>>> ex: 8
>>>>>
>>>>> As I can see in your sld, the size is modified using the Categorize
>>>>> function.
>>>>>
>>>>> Hope this helps. Good Luck!
>>>>>
>>>>> Olivier
>>>>>
>>>>> Envoyé à partir d’Outlook <http://aka.ms/weboutlook>
>>>>>
>>>>> --
>>>>> *De :* Julien Robitaille 
>>>>> *Envoyé :* 6 septembre 2022 08:53
>>>>> *À :* geoserver-users@lists.sourceforge.net <
>>>>> geoserver-users@lists.sourceforge.net>
>>>>> *Objet :* [Geoserver-users] proper use of sld to display wms layer
>>>>>
>>>>> Hello!
>>>>> I have a raster layer that displays surface currents. Everything works
>>>>>

Re: [Geoserver-users] proper use of sld to display wms layer

2022-09-08 Thread Jody Garnett
Please remember to include the user list (so others can answer you) and
yeah sorry it does not support pictures.

Where is the resolution of your raster determined?

Jody

On Thu, Sep 8, 2022 at 12:31 PM Julien Robitaille 
wrote:

> hello,
> As a follow up, I would just need another specification.
> Here is the rendering when the dpi is set to 200:
>
> And here is the rendering when set to 60:
>

As you can see, the resolution of the image didnt change (same number of
> arrows for the same zoom level). Only the size of the arrows have.
> Is it the expected result? What I am looking for is a way to decrease
> resolution for specific user cases.
> Thanks again!
> Julien
>
> Le jeu. 8 sept. 2022 à 12:22, Jody Garnett  a
> écrit :
>
>> aside: Your messages are being held because of the attached images; here
>> is my reply.
>>
>> The challenge faced here is not particular to geoserver - it is a design
>> challenge on how you wish to adapt your map to different environments.
>>
>> You can supply GeoServer with the dpi of the display used  (have
>> openlayers pass this information in as a format option) . GeoSerer will
>> adjust the sizes appropriately. Much of the other information is available
>> as env variables for use when styling.
>>
>> Reference:
>> -
>> https://docs.geoserver.org/latest/en/user/services/wms/vendor.html?highlight=dpi#format-options
>> -
>>
>> https://docs.geoserver.org/latest/en/user/styling/sld/extensions/substitution.html#sld-variable-substitution
>>
>>
>> On Thu, Sep 8, 2022 at 8:17 AM Julien Robitaille 
>> wrote:
>>
>>> Hello!
>>> I found out that the difference in size from one zoom level to another
>>> one comes from openlayers.
>>>
>>> But in any cases, what I would like to do is to increase the sizes of
>>> the arrows, so it is easier to see. The problem is that the display of
>>> those arrows depends a lot on whether the user uses a computer or a
>>> smartphone.
>>> Here is an example. The first picture is from my computer, and the
>>> second one is from my phone.
>>> As you can see, the resolution of the arrows is not the same, even at
>>> the approximate same zoom level.
>>>
>>> (images removed)
>>>
>>
>>> As you can see, increasing the size of the arrows would make the app
>>> unreadable on the phone.
>>> Does anyone know how to address this problem? Is it something that can
>>> be fixed by geoserver, or is it more of an openlayers' problem?
>>>
>>> Thanks a lot for your help!
>>> Julien
>>>
>>> Le mar. 6 sept. 2022 à 10:08, Olivier Gagnon  a
>>> écrit :
>>>
>>>> Hi Julien (je suis aussi du Québec) !
>>>>
>>>> Have you tried using a fixed value for the Size attribute ?
>>>>
>>>> ex: 8
>>>>
>>>> As I can see in your sld, the size is modified using the Categorize
>>>> function.
>>>>
>>>> Hope this helps. Good Luck!
>>>>
>>>> Olivier
>>>>
>>>> Envoyé à partir d’Outlook <http://aka.ms/weboutlook>
>>>>
>>>> --
>>>> *De :* Julien Robitaille 
>>>> *Envoyé :* 6 septembre 2022 08:53
>>>> *À :* geoserver-users@lists.sourceforge.net <
>>>> geoserver-users@lists.sourceforge.net>
>>>> *Objet :* [Geoserver-users] proper use of sld to display wms layer
>>>>
>>>> Hello!
>>>> I have a raster layer that displays surface currents. Everything works
>>>> great, but there are some details that I wish to get rid of but dont know
>>>> how to.
>>>> Below, the two pictures show what the layer looks like at a different
>>>> zoom level. The first one is zoomed out compared to the second one. As
>>>> you can see, the arrows are smaller on the second one. I wish it wasnt like
>>>> this. I'm trying to make it so that the arrows stay the same size.
>>>> I've tried to play around with the wms_scale_denominator property in my
>>>> sld, but it doesnt seem to do the trick.
>>>>
>>>> (images removed)
>>>>
>>>> Here is my SLD:
>>>>
>>>> 
>>>> >>>xsi:schemaLocation="http://www.opengis.net/sld
>>>> StyledLayerDescriptor.xsd"
>>>>xmlns="http://www.opengis.net/sld;
>>>>xmlns:ogc="http://www.opengis.net/ogc

Re: [Geoserver-users] proper use of sld to display wms layer

2022-09-08 Thread Jody Garnett
aside: Your messages are being held because of the attached images; here is
my reply.

The challenge faced here is not particular to geoserver - it is a design
challenge on how you wish to adapt your map to different environments.

You can supply GeoServer with the dpi of the display used  (have openlayers
pass this information in as a format option) . GeoSerer will adjust the
sizes appropriately. Much of the other information is available as env
variables for use when styling.

Reference:
-
https://docs.geoserver.org/latest/en/user/services/wms/vendor.html?highlight=dpi#format-options
-
https://docs.geoserver.org/latest/en/user/styling/sld/extensions/substitution.html#sld-variable-substitution


On Thu, Sep 8, 2022 at 8:17 AM Julien Robitaille 
wrote:

> Hello!
> I found out that the difference in size from one zoom level to another one
> comes from openlayers.
>
> But in any cases, what I would like to do is to increase the sizes of the
> arrows, so it is easier to see. The problem is that the display of those
> arrows depends a lot on whether the user uses a computer or a smartphone.
> Here is an example. The first picture is from my computer, and the second
> one is from my phone.
> As you can see, the resolution of the arrows is not the same, even at the
> approximate same zoom level.
>
> (images removed)
>

> As you can see, increasing the size of the arrows would make the app
> unreadable on the phone.
> Does anyone know how to address this problem? Is it something that can be
> fixed by geoserver, or is it more of an openlayers' problem?
>
> Thanks a lot for your help!
> Julien
>
> Le mar. 6 sept. 2022 à 10:08, Olivier Gagnon  a
> écrit :
>
>> Hi Julien (je suis aussi du Québec) !
>>
>> Have you tried using a fixed value for the Size attribute ?
>>
>> ex: 8
>>
>> As I can see in your sld, the size is modified using the Categorize
>> function.
>>
>> Hope this helps. Good Luck!
>>
>> Olivier
>>
>> Envoyé à partir d’Outlook <http://aka.ms/weboutlook>
>>
>> --
>> *De :* Julien Robitaille 
>> *Envoyé :* 6 septembre 2022 08:53
>> *À :* geoserver-users@lists.sourceforge.net <
>> geoserver-users@lists.sourceforge.net>
>> *Objet :* [Geoserver-users] proper use of sld to display wms layer
>>
>> Hello!
>> I have a raster layer that displays surface currents. Everything works
>> great, but there are some details that I wish to get rid of but dont know
>> how to.
>> Below, the two pictures show what the layer looks like at a different
>> zoom level. The first one is zoomed out compared to the second one. As
>> you can see, the arrows are smaller on the second one. I wish it wasnt like
>> this. I'm trying to make it so that the arrows stay the same size.
>> I've tried to play around with the wms_scale_denominator property in my
>> sld, but it doesnt seem to do the trick.
>>
>> (images removed)
>>
>> Here is my SLD:
>>
>> 
>> >xsi:schemaLocation="http://www.opengis.net/sld
>> StyledLayerDescriptor.xsd"
>>xmlns="http://www.opengis.net/sld;
>>xmlns:ogc="http://www.opengis.net/ogc;
>>xmlns:xlink="http://www.w3.org/1999/xlink;
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
>>   
>>currents
>>
>>  currents
>>  
>>
>>  
>>
>>  data
>>
>>
>>  interpolation
>>  InterpolationBilinear
>>
>>  
>>   
>>   
>> Heading
>> 
>>  
>>
>>  extshape://narrow
>>  
>>
>> 
>>   
>> 
>>  
>>u
>>u
>>  
>>  
>>v
>>v
>>  
>> 
>>   
>>   #e0e2e6
>>   0.514
>>   #96ade4
>>   1.03
>>   #376AE2
>>   1.542
>>   #249D53
>>   2.056
>>   #F98308
>>   2.57
>>   #F91A08
>> 
>>
>>