mapnik / mapnik

Mapnik is an open source toolkit for developing mapping applications

Home Page:http://mapnik.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simplify-algorithm="radial-distance" modifies ends of the lines

zdila opened this issue · comments

I think that radial-distance should not modify start and end of the line, but in Mapnik it does.

without simplification:

image

with simplification:

image

@zdila can you post minimal data to replicate this behaviour, Ideally, XML style with inline geojson ?

It seems only end of the line is affected.

<Map background-color="white">
  <Layer srs="+init=epsg:4326">
    <StyleName>main</StyleName>

    <Datasource>
      <Parameter name="type">geojson</Parameter>

      <Parameter name="inline">
        {
          "type": "FeatureCollection",
          "features": [
            {
              "type": "Feature",
              "properties": {},
              "geometry": {
                "type": "LineString",
                "coordinates": [
                  [ 19.142567664384842, 48.3706356666503 ],
                  [ 19.142550230026245, 48.370662393892225 ],
                  [ 19.14250060915947, 48.3706410120998 ],
                  [ 19.142511337995526, 48.37067843023063 ],
                  [ 19.142455011606216, 48.37066328480004 ],
                  [ 19.142434895038605, 48.37070693926422 ],
                  [ 19.142334312200546, 48.37066328480004 ],
                  [ 19.142264574766156, 48.37066773933893 ],
                  [ 19.141123294830322, 48.37120406297177 ],
                  [ 19.139556884765625, 48.37073366646874 ],
                  [ 19.138290882110596, 48.371104282258486 ],
                  [ 19.136853218078613, 48.37050559387277 ],
                  [ 19.136536717414856, 48.37027752025531 ],
                  [ 19.136252403259277, 48.37040224814144 ],
                  [ 19.136129021644592, 48.370291774886326 ],
                  [ 19.135984182357788, 48.37035948432918 ],
                  [ 19.135871529579163, 48.37029533854344 ],
                  [ 19.135748147964474, 48.37038442989068 ],
                  [ 19.135624766349792, 48.370345229717124 ],
                  [ 19.135655611753464, 48.37040759361542 ],
                  [ 19.135591238737106, 48.37041026635223 ],
                  [ 19.13558855652809, 48.37044323009447 ]
                ]
              }
            }
          ]
        }
      </Parameter>
    </Datasource>
  </Layer>

  <Style name="main">
    <Rule>
      <LineSymbolizer stroke="black" stroke-width="1" simplify="10000" />
    </Rule>
  </Style>
</Map>

Original:

image

Simplified:

image

#4348 <-- related

@zdila Closing as fixed. Re-open if you see any issues, thanks.