Imran Rajjad wrote:
> I have a polygon layer which also includes feilds such as long/lat. Is
> it possible fo us to use both lat long feilds to place an image label or
> a point along with the polygon shape itself? I am really trying to avoid
> duplicating the layer has a point layer for this small purpose only.

You could try the interiorPoint function, which, "Returns a point that is 
either interior to the geometry, when possible, or sitting on its boundary, 
otherwise". It wouldn't make any use of the lat/lon fields but rather operate 
on the polygon geometry itself.

I think it would work in your SLD like this (not tested):

<FeatureTypeStyle>
  <Rule>
    <PolygonSymbolizer>
      <!-- [your polygon style] -->
    </PolygonSymbolizer>
    <PointSymbolizer>
      <Geometry>
        <ogc:Function name="interiorPoint">
          <ogc:PropertyName>GEOMETRY</ogc:PropertyName>
        </ogc:Function>
      </Geometry>
      <!-- [your point style] -->
    </PointSymbolizer>
  </Rule>
</FeatureTypeStyle>

Note that using filter functions inside the <Geometry> element breaks SLD 
validation.

Regards,

Miles Jordan, Systems Analyst
Australian Antarctic Data Centre | Australian Antarctic Division
Dept. for Sustainability, Environment, Water, Population and Communities
http://data.aad.gov.au




___________________________________________________________________________

    Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not 
the
intended recipient, you are notified that use or dissemination of this 
communication is
strictly prohibited by Commonwealth law. If you have received this transmission 
in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 
3209 and
DELETE the message.
        Visit our web site at http://www.antarctica.gov.au/
___________________________________________________________________________
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to