Ticket #1241 (closed feature: fixed)

Opened 5 years ago

Last modified 5 years ago

basic measurement control

Reported by: tschaub Owned by: tschaub
Priority: major Milestone: 2.7 Release
Component: Control Version: 2.5
Keywords: Cc:
State: Complete

Description

Provide a control for drawing geometries and returning basic metrics (length / area).

Attachments

measure.patch Download (15.8 KB) - added by tschaub 5 years ago.
basic measure control
measure.2.patch Download (8.2 KB) - added by tschaub 5 years ago.
basic measure control
measure.3.patch Download (13.2 KB) - added by tschaub 5 years ago.
basic measure control

Change History

Changed 5 years ago by tschaub

  • owner set to tschaub
  • status changed from new to assigned

Changed 5 years ago by bartvde

  • milestone set to 2.6 Release

Changed 5 years ago by bartvde

Tim, should the handler persist issues be treated in another ticket?

Changed 5 years ago by crschmidt

  • milestone changed from 2.6 Release to 2.7 Release

In talking with Tim about this, we decided that it's probably best to not put this into 2.6. The reason is that the measurements are not really accurate: a 'real' measurement would:

  • Check if reprojection is possible back to degrees (using proj4js or internal projections)
  • If so, reproject points to degrees
  • Use dist/area Vincenty formulas to do the math instead of just doing linear measurement.

This is too much work to be done before 2.6, but we look forward to working on it after 2.6 is branched.

Changed 5 years ago by tschaub

I'll add that this is still a sticky issue. Reprojecting points and assuming Vincenty distances is not always what people expect. Open a map in WGS84, draw a segment from Alaska to Kamchatka. That segment crosses Europe on your map, but the distance calculated is based on a segment that does not. Add points to your segment (keeping the line straight on the map) and the Vincenty distance gets longer (though the line on your map does not look longer). Draw a rectangle (four points) encompassing as much of the map as you can. The Vincenty area does not include all of the area that is covered by your box. Anyway, I just mean to say that there is not one "real" measurement.

Changed 5 years ago by tschaub

basic measure control

Changed 5 years ago by tschaub

The measure.patch now contains modifications to add a persist and multi properties to sketch handlers. These should be addressed as separate issues in separate tickets.

Changed 5 years ago by crschmidt

  • priority changed from minor to critical

Changed 5 years ago by euzuro

  • priority changed from critical to major

Changed 5 years ago by tschaub

This now depends on #1697 and #1698. I'll update this patch soon.

Changed 5 years ago by tschaub

basic measure control

Changed 5 years ago by tschaub

This second patch needs the example from the first patch (and some tests).

Changed 5 years ago by euzuro

  • state set to Needs More Work

Changed 5 years ago by euzuro

warning: this is getting moved to 2.8 unless it can gets reviewed and committed in the next 30 hours or so....

Changed 5 years ago by crschmidt

#1634 was booted to 2.8; this goes with it

Changed 5 years ago by crschmidt

  • milestone changed from 2.7 Release to 2.8 Release

Changed 5 years ago by crschmidt

  • milestone changed from 2.8 Release to 2.7 Release

Er, sorry. Misread; I thought 1638 was something other than what it was

Changed 5 years ago by tschaub

basic measure control

Changed 5 years ago by tschaub

  • state changed from Needs More Work to Review

Patch updated with example. As before, this depends on review of #1698.

Changed 5 years ago by elemoine

tschaub, measure.3.patch misses the appropriate change to lib/OpenLayers.js. And I'd love that we include unit tests for this before it go into trunk.

Changed 5 years ago by elemoine

  • state changed from Review to Commit

Ok, if unit tests can't be written by the 2.7 RC1 release date, I'd say: let's go ahead and commit, and make sure we (I) write tests during the RC cycle.

Changed 5 years ago by euzuro

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

(In [7965]) Added a control for drawing geometries and returning basic metrics (length / area). Patch by tschaub, review by elemoine. (Closes #1241)

Changed 5 years ago by tschaub

(In [7971]) Missing change that should have been in r7965. r=me (see #1241)

Changed 5 years ago by crschmidt

  • status changed from closed to reopened
  • state changed from Complete to Pullup
  • resolution fixed deleted

Changed 5 years ago by tschaub

In addition to r7965 and r7971, the following changes were part of this same issue: r7970, r7972, r7973, and r7974. All should be pulled into 2.7.

Changed 5 years ago by euzuro

(In [8012]) Batch merge for rc2 of 2.7. 'svn merge -r7967:HEAD from trunk

Changed 5 years ago by euzuro

  • status changed from reopened to closed
  • state changed from Pullup to Complete
  • resolution set to fixed
Note: See TracTickets for help on using tickets.