TerraME / terrame

TerraME is a programming environment for spatial dynamical modelling
www.terrame.org
GNU Lesser General Public License v3.0
35 stars 13 forks source link

Bug in distance to polygons #2237

Closed pedro-andrade-inpe closed 5 years ago

pedro-andrade-inpe commented 5 years ago

The distance to polygons strategy does not compute the distance to the Cell's centroid. It computes the shortest distance to any part of the cell. Moreover, when there is an overlap, it uses missing as the returning value, which stops the algorithm with an error as it needs to read the data again. Fix it.

pedro-andrade-inpe commented 5 years ago

Data to reproduce the bug: polygons-problem.zip

avancinirodrigo commented 5 years ago

In fact, there is no option about centroid or another spatial relation to filling a vector to vector attribute.
It can be seen on Attribute Fill GUI in TerraView.

The missing problem was solved, See in the commit below.