#6 Improvement in class DouglasPeuckerLineSimplifier

Unstable (example)
open
Dr JTS
None
5
2014-04-30
2013-12-26
No

Unnecessary to create a new instance of Coordinate in simplify() method of DouglasPeuckerLineSimplifier class.

Chance:

if (usePt[i]) {
     coordList.add(new Coordinate(pts[i]));
}

To:

if (usePt[i]) {
    coordList.add(pts[i]);
}

This way you can send N instances of a subclass Coordinate with other information of each point (eg the date).

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks