Re: [Geoserver-devel] sld filter function 'area' returning area in pixels?

2016-11-30 Thread Richard Duivenvoorde
On 30-11-16 18:25, Torben Barsballe wrote:
> I wonder if we could tie the area calculation to UOM
> ?
> Looks like currently UOM is an attribute on the symbolizer, so not quite
> in the right place to work with area, but might be something to think about.
>
> In the interim, you may be able to use the wms_scale_denominator
> environment variable
> 
> to calculate the proper area from the area in pixels.

Ah! That is a cool trick. Did not come up on this one, Thanks!
For me it does not have to be very precise, I just want to have some 
artificial treshold to say "and now it is a point".
So I think if I can pull wms_scale_denominator into my function I'm happy.

Regards,

Richard



--
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Re: [Geoserver-devel] sld filter function 'area' returning area in pixels?

2016-11-30 Thread Torben Barsballe
I wonder if we could tie the area calculation to UOM
?
Looks like currently UOM is an attribute on the symbolizer, so not quite in
the right place to work with area, but might be something to think about.

In the interim, you may be able to use the wms_scale_denominator environment
variable

to calculate the proper area from the area in pixels.

Torben

On Wed, Nov 30, 2016 at 2:57 AM, Andrea Aime 
wrote:

> On Wed, Nov 30, 2016 at 10:51 AM, Richard Duivenvoorde <
> rdmaili...@duif.net> wrote:
>
>> QUESTION:
>> - is this supposed behaviour or is this a bug?
>>
>
> I don't think it was ever given much of a thought, but I'd classify it as
> a bug. One somewhat hard to
> fix, geometries are generalized, reprojected and transformed in screen
> space "in place" to limit
> garbage generation, so the label should be evaluated before that happens.
>
> Fixing that without causing a visible performance regression in normal
> rendering might be tricky business, but should be doable.
> I'd open a ticket.
>
> Cheers
> Andrea
>
>
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
> loro utilizzo è consentito esclusivamente al destinatario del messaggio,
> per le finalità indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> darcene notizia via e-mail e di procedere alla distruzione del messaggio
> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
>
>
> The information in this message and/or attachments, is intended solely for
> the attention and use of the named addressee(s) and may be confidential or
> proprietary in nature or covered by the provisions of privacy act
> (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure, reproduction,
> copying, distribution, or either dissemination, either whole or partial, is
> strictly forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender
> does not give any warranty or accept liability as the content, accuracy or
> completeness of sent messages and accepts no responsibility  for changes
> made after they were sent or for other risks which arise as a result of
> e-mail transmission, viruses, etc.
>
> ---
>
> 
> --
>
> ___
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
--
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Re: [Geoserver-devel] sld filter function 'area' returning area in pixels?

2016-11-30 Thread Andrea Aime
On Wed, Nov 30, 2016 at 10:51 AM, Richard Duivenvoorde 
wrote:

> QUESTION:
> - is this supposed behaviour or is this a bug?
>

I don't think it was ever given much of a thought, but I'd classify it as a
bug. One somewhat hard to
fix, geometries are generalized, reprojected and transformed in screen
space "in place" to limit
garbage generation, so the label should be evaluated before that happens.

Fixing that without causing a visible performance regression in normal
rendering might be tricky business, but should be doable.
I'd open a ticket.

Cheers
Andrea


-- 
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility  for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

---
--
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


[Geoserver-devel] sld filter function 'area' returning area in pixels?

2016-11-30 Thread Richard Duivenvoorde

Hi Devs,

having a polygon dataset, I want to show small polygons (<1m2) different 
from the rest of the polygons

I thought to use the 'area' function which according to this:
http://docs.geoserver.org/stable/en/user/filter/function_reference.html
would give:
"The area of the specified geometry. Works in a Cartesian plane, the 
result will be in the same unit of measure as the geometry coordinates 
(which also means the results won’t make any sense for geographic data)"

But what I observe here is that it returns the size in pixels, while 
data is in meters.

Because zooming in I saw the style of some bigger polygons change (while 
off course the geometry area itself stays the same).
Also showing the area in a label shows that on zooming in the area is 
changing on every zoomlevel...

QUESTION:
- is this supposed behaviour or is this a bug?
- IS it possible to use the geometry area in filters/labels

Note: Tried both Area and area

Regards,

Richard Duivenvoorde

PS: example rule below

 
 poly
 poly
 
 
 
 GEOM
 
 1.0


 
 
 
 #104DAF
 
 0.4
 
 
 
 #104DAF
 1
 
 



 
 
 
 GEOM
 
 
 
   Arial
   14
   normal
   bold
 
 
   
 
   0.5
   0.5
 
   
 
 
   #00
 
   

 

 
 point
 point
 
 
 
 GEOM
 
 1

 
 
 
 
 
 image/svg+xml
  
 
 
 
 
 #ff
 
 0.4
 
 
 
 #ff
 1
 
 

 

--
___
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel