Ticket #215 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

Single-sided buffering implementation

Reported by: swongu Owned by: strk
Priority: major Milestone: 3.2.0
Component: Core Version: svn-trunk
Severity: Content Keywords:
Cc:

Description

Hello,

I have provided an implementation for getting a "single-sided buffer" of a LineString geometry. It is based on the raw offset curves but nodes and cleans the edges. Please see an attached picture to see the existing RoundCap? buffer, the new LeftSide? buffer and the BothSides? buffer.

Applications for this single-sided buffering include getting clean offset curves of line geometries.

Stephen W.

Attachments

singlesidedbuffer.jpg Download (39.1 KB) - added by swongu 6 years ago.
singlesidedbuffer.patch Download (13.4 KB) - added by swongu 6 years ago.
singlesidedtesting.patch Download (11.7 KB) - added by swongu 5 years ago.
XML test case of single-sided buffers

Change History

Changed 6 years ago by swongu

Changed 6 years ago by swongu

Changed 6 years ago by swongu

  • type changed from defect to enhancement

Changed 6 years ago by pramsey

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 3.1

Applied by Stephen. Remember to close your tickets!

Changed 6 years ago by anonymous

  • milestone 3.1.0 deleted

Milestone 3.1.0 deleted

Changed 6 years ago by pramsey

  • milestone set to 3.1.0

Changed 6 years ago by swongu

  • status changed from closed to reopened
  • resolution fixed deleted
  • milestone 3.1.0 deleted

I don't think this was ever patched...

Now that JTS 1.9 is synced with GEOS this patch might have trouble landing on the trunk.

Changed 6 years ago by pramsey

Could you try to patch it in, Steven, or are we completely hosed now?

Changed 6 years ago by strk

  • owner changed from geos-devel@… to strk
  • status changed from reopened to new

I'm working on this. Stephen, do you have a set of testcases for this functionality to add to the regression suite ?

Changed 6 years ago by swongu

No tests at the moment, but when I get a chance I'll make testcases - I've got one or two geometries I would like to verify.

If this is blocking you please move forward without the testcases, as there are none as of this writing.

Changed 5 years ago by strk

  • status changed from new to assigned

Changed 5 years ago by pramsey

  • milestone set to 3.2.0

Has this been applied now?

Changed 5 years ago by strk

Yes but there's NO test for it, and no C-API interface for it either. (I'd keep it open till we have a testcase)

Changed 5 years ago by swongu

Here's the first of two tests. The patch includes the following changes:

* XMLtester.cpp is to look for a fourth command-line argument. * Several changes to the single sided buffering that improves on robustness were made. It involves switching the precision model halfway if a reduced precision model is used halfway. * Memory-leaks were fixed in the single sided buffering code.

Changed 5 years ago by swongu

XML test case of single-sided buffers

Changed 5 years ago by strk

For the record: Martin Davis is working on adding single-sided buffering in JTS, this task is postponed to when that is ready for porting.

Changed 5 years ago by strk

For another record... Martin won't work on this in JTS so will be a GEOS-ahead thing. I will be working again on swongu patch and testcase.

Changed 5 years ago by strk

As of r2650 the single-sided patch is back in and proved to work against enough testcases. Tests welcome.

Changed 5 years ago by strk

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.