OpenLayers OpenLayers

Ticket #1241 (assigned feature)

Opened 7 months ago

Last modified 2 days ago

basic measurement control

Reported by: tschaub Assigned to: tschaub (accepted)
Priority: minor Milestone: 2.7 Release
Component: Control Version: 2.5
Keywords: Cc:
State:

Description

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

Attachments

measure.patch (15.8 kB) - added by tschaub on 07/18/08 01:22:43.
basic measure control

Change History

01/08/08 05:00:30 changed by tschaub

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

01/21/08 13:59:59 changed by bartvde

  • milestone set to 2.6 Release.

02/08/08 07:58:14 changed by bartvde

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

02/09/08 14:44:01 changed 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.

02/14/08 17:40:06 changed 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.

07/18/08 01:22:43 changed by tschaub

  • attachment measure.patch added.

basic measure control

07/18/08 01:24:40 changed 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.