Rounded buffer end stoking toloerance
Steve Morgan
Old GIS GuyTrusted User
Guru,
I've got a case where I'm using small rounded buffers in order to join some sloppy linework (ie: lots of lines with free endpoints that I can't join in mass using Digitizer). I use very thin standard (not rectangular) buffers to accomplish this since they tend to provide the overlap on the ends to find the adjacent element I want to combine with.
I've noticed that the standard buffer takes many times longer to process than the rectangular and this appears to be caused by the number of vertices generated to approximate the curve of the buffer ends. This all makes sense. I expect you are doing this based on some set arc sweep for each vertex to make the 180 degree sweep for the buffer end? Is there a way to adjust this "stroking tolerance" so as to reduce the number of vertices and increase the processing speed?
This may be more of a suggestion. Instead of rounded vs. rectangular one might ask how many segments are desired for the buffer end. This might also save a later step where one might need to Simplify the buggers in case they need to be combined as there is a secondary hit in Combining if there are lots of vertices in the buffers.
Steve
I've got a case where I'm using small rounded buffers in order to join some sloppy linework (ie: lots of lines with free endpoints that I can't join in mass using Digitizer). I use very thin standard (not rectangular) buffers to accomplish this since they tend to provide the overlap on the ends to find the adjacent element I want to combine with.
I've noticed that the standard buffer takes many times longer to process than the rectangular and this appears to be caused by the number of vertices generated to approximate the curve of the buffer ends. This all makes sense. I expect you are doing this based on some set arc sweep for each vertex to make the 180 degree sweep for the buffer end? Is there a way to adjust this "stroking tolerance" so as to reduce the number of vertices and increase the processing speed?
This may be more of a suggestion. Instead of rounded vs. rectangular one might ask how many segments are desired for the buffer end. This might also save a later step where one might need to Simplify the buggers in case they need to be combined as there is a secondary hit in Combining if there are lots of vertices in the buffers.
Steve
Comments
-
Steve,
Rather than adding an option I decided to make the buffering option just do this itself. Now for very small buffers you get less vertices at the curved end points than you do for much larger buffers. The smallest buffers (< 0.2 meters) will just have 5 vertices tracing the curve at the end. This should make the combine operation a decent amount faster.
I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14_64bit.zip .
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
gmsupport@bluemarblegeo.com
http://www.bluemarblegeo.com/ -
Mike,
That sounds like a good solution to avoid the Simplification step and reduce overall processing time and it solves the problem.
In my case I'm working with architectural drawings where walls are represented as parallel lines for each face of the wall (sometimes not exactly snapped at end points) and where walls intersect (say a T-bone intersection) there is no "break" to allow one to connect the lines. Trying to Connect linework and thus create Area features for the walls is fraught with problems since it seems to work fine for two lines but not many and where the lines "intersect", like at the T-bone, there is no vertex to intersect with and hence the Connect function gets confused. Hence the buffer is useful to overcome this problem since I can generate a small (tiny) buffer around the linework and then Combine the buffers to effectively give me connected walls. Your solution of using 5 vertices for buffers <.2 Meters should work OK as mine are on the order of .005 meters.
I'll give this fix a shot as it will solve much of the problems I'm seeing and I thank you for that.
Steve
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website