It might be easier to do this in a custom function in GeoTools rather than
in PostGIS - then you could pass in the scale env variable along with the
feature that you are drawing.

Ian

On Mon, 3 Aug 2020 at 10:15, Richard Duivenvoorde <[email protected]>
wrote:

> Hi,
>
> In QGIS there is something what we call 'Geometry-generators': you
> actually generate a geometry based on some other geometry and some
> parameters, coming from 'expressions'.
>
> In this way it is for example possible to create some kind of polygon
> based on a point layer.
> My goal: create rotated 'wedges/sectors' with a data-based rotation from a
> point layer (talking about GSM 'beams' here), but (tricky part): size
> depending on the current map scale...
>
> My plan to mimic this in a Geoserver WMS:
> - have a point layer in postgis
> - create a postgis function to create a wedge (taking the attribute in
> account)
> - create a SQL view layer which creates a geom by calling this function
>
> Question: is it possible for geoserver to 'insert' the scale (as being
> requested in the WMS request) into this function-call as parameter.
> Something like $SCALE or $SCALE_DENOMINATOR or so, which is to be replaced
> by Geoserver BEFORE handling over the query to postgis?
>
> Looking into the docs[0], it looks like it would be possible with a
> (client site added) parameter. But in this case the 'scale'-information
> should come from the WMS-request-info (as it is not possible to change the
> client apps for us).
>
> Mmm, now I am afraid this is maybe hard as it makes it impossible to
> 'cache' this view...
>
> Anyone idea's?
>
> Regards,
>
> Richard Duivenvoorde
>
>
> [0] https://docs.geoserver.org/stable/en/user/data/database/sqlview.html
>
>
>
>
>
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 
Ian Turton
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to