OpenMap-java / openmap

OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.
http://openmap-java.org
Other
73 stars 43 forks source link

Add a simple calculator to the GUI, for sampling points along the ribbon #33

Open chunky opened 8 years ago

chunky commented 8 years ago

This is for using the ribbonmaker in combination with the multilos layer:

Given a ribbon {some distance away from a shape}, sample points along the ribbon every {some distance}, and print them out in a little GUI control that I can copy/paste from. The points can be used for whatever [they're semicolon-separated], but they can easily be copied into the multilos layer.

The real key is getPointsAroundPolys(), around line 413; instead of just using every inflection point along the ribbon, we calculate the distance and gracefully return points every {distance} along it, correctly subdividing long edges or crossing over short ones.