non-closed rings confuse renderer #1649

Closed
strk opened this Issue Dec 14, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

strk commented Dec 14, 2012

Rendering of non-closed rings as polygons lack not only the missing closing segment but also the one before !

Here's an example:

<Map>
<Style name="test" filter-mode="first">
  <Rule>
    <PolygonSymbolizer fill="#ff6600" fill-opacity="0.7" />
  </Rule>
</Style>
<Layer name="test">
    <StyleName>test</StyleName>
    <Datasource>
       <Parameter name="simplify_geometries">true</Parameter>
       <Parameter name="type">postgis</Parameter>
       <Parameter name="geometry_field">g</Parameter>
       <Parameter name="table"><![CDATA[(select $$0103000000010000000400000000000000000000000000000000000000000000000000244000000000000000000000000000002440000000000000244000000000000000000000000000002440$$::geometry as g) as f]]></Parameter>
    </Datasource>
  </Layer>
</Map>

The HEXWKB represent a polygon defined by the vertices: 0,0 10,0 10,10 0,10.
The polygon is invalid (misses the 0,10 -- 0,0 segment) but mapnik does not even render the 10,10-0,10 one.

QGis renders it fine.

Owner

artemp commented Dec 14, 2012

@strk - this is expected in current implementation but I can see it'll be useful to handle un-closed polygons better

Owner

springmeyer commented Mar 13, 2013

@artemp - can this be closed?

Owner

artemp commented Mar 14, 2013

@springmeyer - works for me - closing.

artemp closed this Mar 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment