geomLength Filter function

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

geomLength Filter function

Paulius  Litvinas | InfoEra

Hi,

 

I found strange behavior of geomLength Filter function for line features.

 

I want to display length of line as label with the following SLD:

 

          <sld:Label>
            <ogc:Function name="geomLength">
              <ogc:PropertyName>geometry</ogc:PropertyName>
            </ogc:Function>
          </sld:Label>

 

But unfortunately length value differs on different zoom scales on layer preview (default GeoServer) and is far away from real value. Zooming in or out value is changing by multiplying or dividing by 2 (same as scale).

 

Tried the same labeling SLD for polygon – calculates and shows good.

 

GeoServer 2.5 snapshot on tomcat6 jdk1.6 x64.

 

Checked with QGIS -  that line has only 2 vertices (no duplicates).

PostGIS ST_Length function calculates ok for this line.

 

 

Am I something missing with GeoServer? Or this could be a bug?

 

p.s. my data does not have native SRS, just declared EPSG:3346. But same for line and polygon tables.

 

Sincerely,
Paul

 


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users