JeremyGelb / spNetwork

An R package to perform spatial analysis on networks.
GNU General Public License v2.0
35 stars 2 forks source link

lines_center raise an error if a line has a length of 0 #2

Closed JeremyGelb closed 3 years ago

JeremyGelb commented 3 years ago

When a line has a length of 0, the function lines_center raise an error. It would be better to just use the coordinates of its single vertex. A simple way to avoid the problem actually is to separate the spatiallinesdataframe and to create the points with the function coordinates for the lines with a 0 length. It will be fixed in the next version.

JeremyGelb commented 3 years ago

This bug is corrected in the dev version now