Ticket #1894 (closed feature: fixed)

Opened 4 years ago

Last modified 3 years ago

Digitizing donut-like polygons

Reported by: jachym Owned by: tschaub
Priority: minor Milestone: 2.11 Release
Component: Handler.Polygon Version: SVN
Keywords: Polygon Cc:
State:

Description

This patch provides possibility to add 'hole' into existing polygon.

How to test:

  • Digitize polygon
  • Press CTRL key and digitize new polygon inside existing one

Where to test:

and others

NOTE: the patch is incoplete, among others, it does not contain any tests and it is not sure, if the solution is optimal. But it works, and it is provided for testing purposes.

Attachments

donut_polygons.patch Download (4.3 KB) - added by jachym 4 years ago.
1894.patch Download (17.8 KB) - added by tschaub 3 years ago.
interior ring digitizing

Change History

Changed 4 years ago by jachym

Changed 4 years ago by crschmidt

  • milestone set to 2.9 Release

Changed 3 years ago by tschaub

  • status changed from new to assigned

The sketch handlers have seen some fairly significant revisions that make this existing patch no longer work.

I'm taking on the task of updating things to work with the trunk.

Changed 3 years ago by tschaub

interior ring digitizing

Changed 3 years ago by tschaub

  • state set to Review

Latest patch adds interior ring digitizing to the Polygon handler. The  example demonstrates its use. Some basic topology rules are enforced while digitizing interior rings:

  • All nodes of interior rings must intersect existing polygon
  • Newly added interior rings must have non-zero area
  • Newly added interior ring cannot intersect any existing interior rings
  • Newly added interior ring cannot contain any existing interior rings

The first rule is enforced while digitizing. The others are enforced when ring digitizing is complete. This allows the creation of more complex rings (like a C shaped ring that nearly encloses another interior ring) while disallowing the most egregious of invalid geometries (as with exterior rings, bow-tie rings are still allowed).

The example works and tests pass in FF 3.6, Chrome 6, and IE 6. Thanks for any review.

Changed 3 years ago by ahocevar

  • state changed from Review to Commit

A great enhancement. Thanks jachym and tschaub for the work on this. I think in OL3 we will want to move topology enforcement functions into a separate geometry package, along with other geometry functions. Anyway, I can confirm that the example works, with neglectable (but unavoidable) glitches in IE due to the inability of VML to render geometries with a 1-dimensional inner ring correctly. Please commit.

Changed 3 years ago by tschaub

  • status changed from assigned to closed
  • state Commit deleted
  • resolution set to fixed

Thanks for the review. In with r10828.

Note: See TracTickets for help on using tickets.