mapshaper icon indicating copy to clipboard operation
mapshaper copied to clipboard

Improve simplify documentation about coefficients

Open simonepri opened this issue 6 years ago • 1 comments

Here there are some information about the weighting coefficient that the Visvalingam algorithm uses to do semplifications.

Are there some resources that can be added to the Wiki to let users understand better how to use that coefficient?

EG:

  • Why 0.7 was chosen as default?
  • What is the possible range?
  • What's the really difference between weighted and unweighted?
  • How that coefficient is used from the algorithm?
  • How that coefficient interact with the interval option?

simonepri avatar Sep 04 '17 08:09 simonepri

@mbloch The docs says:

interval=Specify simplification amount in units of distance.
Uses meters when simplifying unprojected datasets in 3D space (see planar option below),
otherwise uses the same units as the source data.

Then this example is provided:

# Use Douglas-Peucker simplification with a 100 meter threshold.
mapshaper states.shp -simplify dp interval=100 -o simplified/

100 means 100 meters because states.shp is unprojected in this case right?

What happen if I do this?

mapshaper states.shp -proj +init=epsg:4326 -simplify dp interval=100 -o simplified/

What 100 means in this case? Is not 100° for sure, because otherwise I should get an empty polygon. So is still 100 meters?

Thank you!

simonepri avatar Nov 29 '17 10:11 simonepri