Dear Andrea,

> It seems to me what you want is a "single side buffer". JTS offers it,
> but it's not mapped to a filter function, some coding is needed back
> in Geotools. Have a look at FilterFunction_buffer in the GeoTools main
> module for inspiration, and see META-INF/services to see how they are
> registered in the plugin system. Cheers Andrea 
I see - thank you for the pointers, will take a look.

in the meantime, I figured that the intersection of the buffer and of
the original geometry should give me what I'm looking for - the inside
part of the buffer (as the intersection would cut off the outside part
of the buffer, and also the part of the geometry that is more inside
than the buffer).

interestingly this does not seem to be the case, see the image attached.
the blue part (with alpha 0.3) is the buffer, and the red part (with
alpha 0.3) is the intersection - which seems the the same as the
original shape. here is the SLD I have:

                    <sld:PolygonSymbolizer 
uom="http://www.opengeospatial.org/se/units/metre";>
                        <sld:Geometry>
                            <ogc:Function name="intersection">
                                <ogc:Function name="buffer">
                                    <ogc:PropertyName>way</ogc:PropertyName>
                                    <ogc:Literal>100</ogc:Literal>
                                </ogc:Function>
                                <ogc:PropertyName>way</ogc:PropertyName>
                            </ogc:Function>
                        </sld:Geometry>
                        <sld:Fill>
                            <sld:CssParameter 
name="fill">#FF0000</sld:CssParameter>
                            <sld:CssParameter 
name="fill-opacity">0.3</sld:CssParameter>
                        </sld:Fill>
                    </sld:PolygonSymbolizer>
                    <sld:PolygonSymbolizer 
uom="http://www.opengeospatial.org/se/units/metre";>
                        <sld:Geometry>
                            <ogc:Function name="buffer">
                                <ogc:PropertyName>way</ogc:PropertyName>
                                <ogc:Literal>100</ogc:Literal>
                            </ogc:Function>
                        </sld:Geometry>
                        <sld:Fill>
                            <sld:CssParameter 
name="fill">#0000FF</sld:CssParameter>
                            <sld:CssParameter 
name="fill-opacity">0.3</sld:CssParameter>
                        </sld:Fill>
                    </sld:PolygonSymbolizer>


maybe I'm mis-interpreting the intersection function?


Akos


<<attachment: intersection.png>>

------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to