polygon label repeated for each tile

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

polygon label repeated for each tile

Ákos Maróy
Hi,

I'm trying to use polygon labeling with SLD to label cities using an OSM
PostGIS database. I tried to use the 'name' attribute of admin_level = 8
administrative boundaries from the OSM database.

this seems to work fine, but there is a problem. as geoserver generates
the various tiles for serving via WMS, the label is generated for each
tile that the polygon is shown on. for cities that span multiple tiles
on a certain zoom level, this means that the name of the city is
repeated as many times as there are tiles spanning the polygon.

is there a way to prevent this from happening?

best regards,


Akos

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

Edward Mac Gillavry
Hi Akos,

Before all attention goes towards the other thread you started, I would like to address this question separately though suggestions have already been provided in the other thread. When others come to the mailing list archives at a future time, they then don't have to search too far for pointers either, hopefully.

What you are experiencing is that for polygons, the anchor point used for labelling is the centroid of the visible portion of the polygon. So for each small tile image that covers your polygon, a new anchor point is computed and the label is drawn.

One course of action to work around this has already been suggested by Al Vigil:

> One way to get around this duplication problem when labeling polygons is to
> create a point file of polygon center points and style the points so they
> are transparent, but are labeled with the name of the polygon.

Thus, there's only one spot where your area label will be drawn instead of having it drawn on each tile that covers the geographic area. The downside of this approach can be, that the very spot you defined has already been taken by another label that has higher priority, for example by a country name or region name. You could then use a desktop GIS to load your PostGIS layer and manually reposition these points.

The other course of action has already been suggested by David Winslow:

> GeoWebCache can help by generating oversized tiles and splitting them up into 256px square tiles for actual serving.

Sticking with your current SLD, GeoWebCache requests are larger image from GeoServer, so there will most likely be less images that cover the geographic area. Thus, the label with have less repetition anyway. Also, as the anchor point used for labelling is the centroid of the visible portion of the polygon in the larger image there is a slight irregularity introduced in the anchor point calculation. Since tile borders hardly ever coincide with geographic borders, there is less chance your label anchor points from different layers (town layer, region layer, country layer) will overlap.

All in all, I suggest to use a tile rendering engine (GeoWebCache, MapProxy, TileCache) anyway, instead of requesting small image from GeoServer and have the tile rendering engine do the tile slicing afterwards. You will have send fewer requests to GeoServer (1 large image instead of multiple small images), so this speeds up the overall tile cache creation time. In a second stage you have to try for your self whether you do a precomputation of the label anchor points or have GeoServer compute the anchor point at the centroid of the visible portion of the polygon on the fly. Also this trade-off can vary across zoom levels.

Kind regards,

Edward

> Date: Tue, 14 Aug 2012 20:49:06 +0200

> From: [hidden email]
> To: [hidden email]
> Subject: [Geoserver-users] polygon label repeated for each tile
>
> Hi,
>
> I'm trying to use polygon labeling with SLD to label cities using an OSM
> PostGIS database. I tried to use the 'name' attribute of admin_level = 8
> administrative boundaries from the OSM database.
>
> this seems to work fine, but there is a problem. as geoserver generates
> the various tiles for serving via WMS, the label is generated for each
> tile that the polygon is shown on. for cities that span multiple tiles
> on a certain zoom level, this means that the name of the city is
> repeated as many times as there are tiles spanning the polygon.
>
> is there a way to prevent this from happening?
>
> best regards,
>
>
> Akos
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

Rahkonen Jukka (Tike)
In reply to this post by Ákos Maróy

Hi,

 

> What you are experiencing is that for polygons, the anchor

> point used for labelling is the centroid of the visible portion

> of the polygon. So for each small tile image that covers your

> polygon, a new anchor point is computed and the label is drawn.

 

There must be something obvious that I cannot see, but why not

to have an option to use the real centroid of the polygon as anchor

point instead of the centroid of the visible portion when the goal

is to create tiles?  When the whole area gets rendered each polygon

would be labeled exactly once.  Anchor point would always be exactly

the same so I guess that rendered partial labels could be set side by side

without any visible seams.  Handling the conflicts with overlapping labels

should be set to a stupid mode so it would not ever move the labels but

only decides whether to render the label or not.  Probably this is the place

there this plan fails. Half  of a label may get rendered into one tile but in

another tile there could be an overlap and the missing part of the label

would not be rendered ever.

 

-Jukka Rahkonen-

 

 

Edward Mac Gillavry wrote:

 

Hi Akos,

Before all attention goes towards the other thread you started, I would like to address this question separately though suggestions have already been provided in the other thread. When others come to the mailing list archives at a future time, they then don't have to search too far for pointers either, hopefully.

What you are experiencing is that for polygons, the anchor point used for labelling is the centroid of the visible portion of the polygon. So for each small tile image that covers your polygon, a new anchor point is computed and the label is drawn.

One course of action to work around this has already been suggested by Al Vigil:

> One way to get around this duplication problem when labeling polygons is to
> create a point file of polygon center points and style the points so they
> are transparent, but are labeled with the name of the polygon.

Thus, there's only one spot where your area label will be drawn instead of having it drawn on each tile that covers the geographic area. The downside of this approach can be, that the very spot you defined has already been taken by another label that has higher priority, for example by a country name or region name. You could then use a desktop GIS to load your PostGIS layer and manually reposition these points.

The other course of action has already been suggested by David Winslow:

> GeoWebCache can help by generating oversized tiles and splitting them up into 256px square tiles for actual serving.

Sticking with your current SLD, GeoWebCache requests are larger image from GeoServer, so there will most likely be less images that cover the geographic area. Thus, the label with have less repetition anyway. Also, as the anchor point used for labelling is the centroid of the visible portion of the polygon in the larger image there is a slight irregularity introduced in the anchor point calculation. Since tile borders hardly ever coincide with geographic borders, there is less chance your label anchor points from different layers (town layer, region layer, country layer) will overlap.

All in all, I suggest to use a tile rendering engine (GeoWebCache, MapProxy, TileCache) anyway, instead of requesting small image from GeoServer and have the tile rendering engine do the tile slicing afterwards. You will have send fewer requests to GeoServer (1 large image instead of multiple small images), so this speeds up the overall tile cache creation time. In a second stage you have to try for your self whether you do a precomputation of the label anchor points or have GeoServer compute the anchor point at the centroid of the visible portion of the polygon on the fly. Also this trade-off can vary across zoom levels.

Kind regards,

Edward

> Date: Tue, 14 Aug 2012 20:49:06 +0200
> From: [hidden email]
> To: [hidden email]
> Subject: [Geoserver-users] polygon label repeated for each tile
>
> Hi,
>
> I'm trying to use polygon labeling with SLD to label cities using an OSM
> PostGIS database. I tried to use the 'name' attribute of admin_level = 8
> administrative boundaries from the OSM database.
>
> this seems to work fine, but there is a problem. as geoserver generates
> the various tiles for serving via WMS, the label is generated for each
> tile that the polygon is shown on. for cities that span multiple tiles
> on a certain zoom level, this means that the name of the city is
> repeated as many times as there are tiles spanning the polygon.
>
> is there a way to prevent this from happening?
>
> best regards,
>
>
> Akos
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

geowolf
On Wed, Aug 15, 2012 at 11:29 AM, Rahkonen Jukka <[hidden email]> wrote:

Hi,

 

> What you are experiencing is that for polygons, the anchor

> point used for labelling is the centroid of the visible portion

> of the polygon. So for each small tile image that covers your

> polygon, a new anchor point is computed and the label is drawn.

 

There must be something obvious that I cannot see, but why not

to have an option to use the real centroid of the polygon as anchor

point instead of the centroid of the visible portion when the goal

is to create tiles? 


There is not reason not to have it indeed, it's just works that needs doing, and code
does not write itself :-p

It's also not easy because by the time the polygon gets to the labelling enging the
polygon is clipped to the viewing area already, an option could be to have a 
filter function called "label point" that  can be used when specifying the geometry:

<TextSymbolizer>
  <Geometry>
     <ogc:Function name="labelPoint">
         <ogc:Property>the_geom</ogc:Property>
    </ogc:Function>
 </Geometry>
...
</TextSymbolizer>

There is this common fallacy that the centroid is a good label point, while try in
most simple cases there is no guarantee it actually falls inside the polygon
(think of a doughnut), a label point instead should always be inside or at worse
on the border (which is something the labeler in its default configuration guarantees instead)

Cheers
Andrea


--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549


-------------------------------------------------------


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

Rahkonen Jukka (Tike)
In reply to this post by Ákos Maróy
Andrea Aime wrote:


> There is this common fallacy that the centroid is a good label point, while try in
> most simple cases there is no guarantee it actually falls inside the polygon
> (think of a doughnut), a label point instead should always be inside or at worse
> on the border (which is something the labeler in its default configuration guarantees instead)

I made a quick test with 22339 rather complicated polygons and PointOnSurface function in Spatialite.  Result looks pretty good with all the points well inside their polygons which was a nice surprise. I was remembering from the past that point on surface is not usable for labeling because when I last tried the same function with Oracle it simply placed the points on surface into the first outer ring vertices. Perhaps Oracle does it in a more clever way nowadays.  Somehow I feel that PostGIS behaves a lot like Spatialite.

I feel that point on surface could be a reasonable candidate for label anchor point. Problem with Geoserver is that all backends would not behave in a similar way. It could perhaps be possible to a sort of a simulation by creating a point layer with PointOnSurface and  use that for labeling. Perhaps it does not tell anything about how well partial labels from adjacent tiles match.

Those who use tiles can motivate themselves to coding by thinking that if the system is able to match partial labels there would be no need for creating oversized metatiles. This could mean less pixels to create when seeding the cache and thus more speed.

By the way, can Geoserver utilize several geometry columns in one table in Oracle, PostGIS and Spatialite? If yes, users could pre-process the data and create label points into their own geometry fields, as well as simplified geometries to be used at small scales.  It would not make database much bigger because there would be no need to copy the attributes.

-Jukka Rahkonen-




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

geowolf
On Wed, Aug 15, 2012 at 4:40 PM, Rahkonen Jukka <[hidden email]> wrote:
I made a quick test with 22339 rather complicated polygons and PointOnSurface function in Spatialite.  Result looks pretty good with all the points well inside their polygons which was a nice surprise. I was remembering from the past that point on surface is not usable for labeling because when I last tried the same function with Oracle it simply placed the points on surface into the first outer ring vertices. Perhaps Oracle does it in a more clever way nowadays.  Somehow I feel that PostGIS behaves a lot like Spatialite.

I feel that point on surface could be a reasonable candidate for label anchor point. Problem with Geoserver is that all backends would not behave in a similar way. It could perhaps be possible to a sort of a simulation by creating a point layer with PointOnSurface and  use that for labeling. Perhaps it does not tell anything about how well partial labels from adjacent tiles match.

If the spatialite algorithm works fine it's worth checking out how that is done. Is it using OGR maybe?
There is a similar function in JTS, but now sure how well that matches a good label point:

We could roll a WPS process to do that, in case people want to use it as a starting point and then
eventually manually edit the data.
However the WPS process (chained with gs:Import to feed the data back in the db) would create
a whole new layer, the user would have to drop the original one by hand.
 

Those who use tiles can motivate themselves to coding by thinking that if the system is able to match partial labels there would be no need for creating oversized metatiles. This could mean less pixels to create when seeding the cache and thus more speed.

Hmm... the metatatiles are actually not oversized afaik, the previous mail stated "oversized tiles" which I believe means metatiles.
 

By the way, can Geoserver utilize several geometry columns in one table in Oracle, PostGIS and Spatialite? If yes, users could pre-process the data and create label points into their own geometry fields, as well as simplified geometries to be used at small scales.  It would not make database much bigger because there would be no need to copy the attributes.
 
Yes, it can

Cheers
Andrea


--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549


-------------------------------------------------------


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

Martin Davis-5


On Wed, Aug 15, 2012 at 9:31 AM, Andrea Aime <[hidden email]> wrote:
On Wed, Aug 15, 2012 at 4:40 PM, Rahkonen Jukka <[hidden email]> wrote:
I made a quick test with 22339 rather complicated polygons and PointOnSurface function in Spatialite.  Result looks pretty good with all the points well inside their polygons which was a nice surprise. I was remembering from the past that point on surface is not usable for labeling because when I last tried the same function with Oracle it simply placed the points on surface into the first outer ring vertices. Perhaps Oracle does it in a more clever way nowadays.  Somehow I feel that PostGIS behaves a lot like Spatialite.

I feel that point on surface could be a reasonable candidate for label anchor point. Problem with Geoserver is that all backends would not behave in a similar way. It could perhaps be possible to a sort of a simulation by creating a point layer with PointOnSurface and  use that for labeling. Perhaps it does not tell anything about how well partial labels from adjacent tiles match.

If the spatialite algorithm works fine it's worth checking out how that is done. Is it using OGR maybe?
There is a similar function in JTS, but now sure how well that matches a good label point:

Looks to me like spatialite is using the GEOS PointOnSurface method, which is the JTS interior point algorithm. 

The JTS algorithm is intended just to find a point which is guaranteed to be in the interior of a polygon, so it isn't trying very hard to find a good point for labelling.  However, it does try and pick a point close to the middle of the geometry if it can, so for many polygons this will be reasonable.  (It would be a nice feature to provide a filter function which explicitly attempts to find a good labelling point) 

We could roll a WPS process to do that, in case people want to use it as a starting point and then
eventually manually edit the data.
However the WPS process (chained with gs:Import to feed the data back in the db) would create
a whole new layer, the user would have to drop the original one by hand.

Or since the JTS method is exposed as the filter function interiorPoint, would it be possible to call this as a geometry transformation in the SLD? 

-- 
Martin Davis
OpenGeo - http://opengeo.org
Expert service straight from the developers.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

Martin Davis-5


On Wed, Aug 15, 2012 at 10:37 AM, Martin Davis <[hidden email]> wrote:

We could roll a WPS process to do that, in case people want to use it as a starting point and then
eventually manually edit the data.
However the WPS process (chained with gs:Import to feed the data back in the db) would create
a whole new layer, the user would have to drop the original one by hand.

Or since the JTS method is exposed as the filter function interiorPoint, would it be possible to call this as a geometry transformation in the SLD? 

Or the existing Transform process can be used to call the interiorPoint function from CQL, avoiding the need to make a new process. 

-- 
Martin Davis
OpenGeo - http://opengeo.org
Expert service straight from the developers.




--
Martin Davis
OpenGeo - http://opengeo.org
Expert service straight from the developers.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

geowolf
In reply to this post by Martin Davis-5
On Wed, Aug 15, 2012 at 7:37 PM, Martin Davis <[hidden email]> wrote:
Or since the JTS method is exposed as the filter function interiorPoint, would it be possible to call this as a geometry transformation in the SLD? 

Yes

Cheers
Andrea
 

--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549


-------------------------------------------------------


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

geowolf
In reply to this post by Martin Davis-5
On Wed, Aug 15, 2012 at 7:42 PM, Martin Davis <[hidden email]> wrote:

Or the existing Transform process can be used to call the interiorPoint function from CQL, avoiding the need to make a new process. 

Indeed, too

Cheers
Andrea
 
-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549


-------------------------------------------------------


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

Edward Mac Gillavry
In reply to this post by geowolf
Hiya,

Thanks for reminding me about the interiorPoint funtion. I actually used this in a recent project, because I didn't want to add an extra geometry column to the PostGIS table and was okay with GeoServer computing the anchor point on the fly, like so:

  <PointSymbolizer>
            <Geometry>
              <ogc:Function name="interiorPoint">
                <ogc:PropertyName>the_polygon_geometry_column</ogc:PropertyName>
              </ogc:Function>
            </Geometry>

            <Graphic>
            ...
            </Graphic>
  </PointSymbolizer>

Regards,

Edward


Date: Wed, 15 Aug 2012 21:37:33 +0200
From: [hidden email]
To: [hidden email]
CC: [hidden email]; [hidden email]
Subject: Re: [Geoserver-users] polygon label repeated for each tile

On Wed, Aug 15, 2012 at 7:37 PM, Martin Davis <[hidden email]> wrote:
Or since the JTS method is exposed as the filter function interiorPoint, would it be possible to call this as a geometry transformation in the SLD? 

Yes

Cheers
Andrea
 

--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549


-------------------------------------------------------


------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Geoserver-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/geoserver-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: polygon label repeated for each tile

geowolf
On Wed, Aug 15, 2012 at 10:20 PM, Edward Mac Gillavry <[hidden email]> wrote:
Hiya,

Thanks for reminding me about the interiorPoint funtion. I actually used this in a recent project, because I didn't want to add an extra geometry column to the PostGIS table and was okay with GeoServer computing the anchor point on the fly, like so:

  <PointSymbolizer>
            <Geometry>
              <ogc:Function name="interiorPoint">
                <ogc:PropertyName>the_polygon_geometry_column</ogc:PropertyName>
              </ogc:Function>
            </Geometry>

            <Graphic>
            ...
            </Graphic>
  </PointSymbolizer>

Doh, and I though it was still not exposed! :-)
/me blushes

Cheers
Andrea
 

--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
==

Ing. Andrea Aime 
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:   +39 0584 962313
mob:   +39  339 8844549


-------------------------------------------------------


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users