Opened 15 years ago

Closed 15 years ago

#215 closed enhancement (fixed)

Single-sided buffering implementation

Reported by: swongu Owned by: strk
Priority: major Milestone: 3.2.0
Component: Core Version: main
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 (3)

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

Download all attachments as: .zip

Change History (19)

by swongu, 15 years ago

Attachment: singlesidedbuffer.jpg added

by swongu, 15 years ago

Attachment: singlesidedbuffer.patch added

comment:1 by swongu, 15 years ago

Type: defectenhancement

comment:2 by pramsey, 15 years ago

Milestone: 3.1
Resolution: fixed
Status: newclosed

Applied by Stephen. Remember to close your tickets!

comment:3 by (none), 15 years ago

Milestone: 3.1.0

Milestone 3.1.0 deleted

comment:4 by pramsey, 15 years ago

Milestone: 3.1.0

comment:5 by swongu, 15 years ago

Milestone: 3.1.0
Resolution: fixed
Status: closedreopened

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.

comment:6 by pramsey, 15 years ago

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

comment:7 by strk, 15 years ago

Owner: changed from geos-devel@… to strk
Status: reopenednew

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

comment:8 by swongu, 15 years ago

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.

comment:9 by strk, 15 years ago

Status: newassigned

comment:10 by pramsey, 15 years ago

Milestone: 3.2.0

Has this been applied now?

comment:11 by strk, 15 years ago

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)

comment:12 by swongu, 15 years ago

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.

by swongu, 15 years ago

Attachment: singlesidedtesting.patch added

XML test case of single-sided buffers

comment:13 by strk, 15 years ago

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.

comment:14 by strk, 15 years ago

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.

comment:15 by strk, 15 years ago

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

comment:16 by strk, 15 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.