The WME Image Overlay addin allows you to display an image of another map over the Waze map image to help with editing. The image is unlikely to be properly aligned with respect to the Waze map, so the addin allows you to rotate, stretch/shrink, and shift E-W and/or N-S to get the image properly aligned. However, it is surprisingly hard to do this accurately. The Align_Overlay spreadsheet makes this task much easier. The spreadsheet is a macro-enabled Excel workbook, with macros needed for calculating Distance and Bearing using spherical trigonometry.
How to align an image
- Identify several prominent features that you can identify on both the Waze map and the overlay
- Delete any existing entries in the "Reference Points (Waze)" and "Reference Points (Overlay)" boxes on the spreadsheet. (ONLY inside the boxes with the thick border.)
- For each feature, enter its lat/long coordinates in the "Reference Points (Waze)" section of the spreadsheet. Preferably enter a description as well, so that you can find it again later.
- Move your pointer to the same feature on the overlay, read the coordinates from the Waze map at that point, and enter them in the "Reference Points (Overlay)" section of the spreadsheet.
- Once you have done two reference points, values should appear in the Scale, Rotation, and Shift sections of the recommendations box at the bottom of the spreadsheet. Don't trust them yet - you need to add at least one more reference point to get an idea of how reliable the recommendations are.
- With sufficient reference points, some of the Recommendations will change from "No change" to "Adjust". The spreadsheet will tell you in which direction to make the adjustment, and how many clicks on the relevant button to use. BEWARE: the effects of the Scale, Shift East, and Shift North buttons depends on the Zoom setting in the editor. The spreadsheet tells you want zoom level to use. The effects may also depend on your Window dimensions, so you may find that they aren't exactly right for your system. They should still get you closer to proper alignment.
- Fine changes in the Rotation (less than 0.5 degree) can be made by reducing the Sensitivity slider in the Image Overlay controls. The spreadsheet will say "Clicks at 10%: nn" to guide you. Be sure to return the slider to 100% before moving on.
- Don't bother adjusting the overlay Shift (east/north) until the Scale and Rotation are roughly right - the recommendations aren't reliable until then.
- You can get an idea of how good the alignment is by looking at the "RMS Error" field, which shows the Root Mean Square of the distance in metres between the real position and the overlay position.
- Make the recommended changes to the alignment, then go back and record the new lat/long for the reference points on the overlay.
- Check the RMS Error to see progress.
- Repeat, making the recommended adjustments until no changes are recommended. If the alignment is still not satisfactory, add more reference points, and re-check the coordinates for any reference points that have a larger Error Distance than the others.
- When should you stop adjusting? When the RMS error is low enough for whatever you're using the overlay for. There's not much point in trying to get the RMS error better than 2-3 metres, because the aerial photography on the Waze map probably isn't aligned as accurately as that.
- When satisfied, don't forget to save the results ("Attach to map").
Choice of reference points
- For the first pass, you want reference points that are unambiguously identifiable on the Waze map and the overlay. such as the centre of a large intersection.
- Avoid having all the reference points clustered in one area - a good spread across the extent of the overlay is better.
- As the overlay gets better aligned, you'll be able to identify reference points that can be more precisely located, such as corners of property boundaries.
- For precise work, don't rely on the location of Waze features, which may have been misplaced. The aerial photography can generally be trusted.
How it works
- Scale: the length of the line between two points on the overlay is compared with the length of the line between the same two points on the Waze map. The ratio of the first length to the second shows how much the overlay needs to be shrunk or stretched to make the lengths match.
- Rotation: the bearing from point A to point B on the overlay is compared with the bearing from point A to B on the Waze map. The difference in bearings show how much the overlay needs to be rotated to make the bearings match.
- Shift: The recommended E/W shift is the average of the E/W shift needed for the various reference points, and similarly for the N/W shift. Because we don't know the centre of rotation of the overlay, the shift figures are not reliable until the scale and rotation are approximately correct.
Using more reference points helps to identify mis-located points and improve accuracy. The calculations are done on weighted averages of the pairs of reference points, giving more weight to longer lines for improved accuracy. The number of clicks needed on the Image Overlay controls is derived from the equations on the "Calibration Constants" sheet of the workbook.
Documentation of the fields on the spreadsheet
- Ref_Id: a short identifier for the reference point. You may want to place a point comment with that name on the Waze map to help you spot it quickly later. The Ref_Id can be anything you want - it's not used by the spreadsheet.
- Description: a more detailed description of the reference point, to help you locate it precisely. For example: "NW corner of triangular block".
- [The Ref_id and Description are automatically repeated in the lower half to aid in identifying points on the overlay.]
- Long/Lat: the position on the Waze map. Record all five fractional digits - a change of 1 in the fifth digit corresponds to about a metre.
- Compare with: the other point which will be used to form the imaginary line used in calculations. By default, the spreadsheet uses the next point down the list (with wraparound), but you can choose a different combination if you wish. Just remember not to select the same point for each end of the line.
- Distance: the length of the line joining the two points
- Bearing: the bearing of the second point from the first
For the lower half only:
- Scale: the ratio of overlay line length to Waze map line length
- Rotate: the rotation needed to make the overlay match the Waze map
- Shift East: the amount to shift the overlay east (negative for west shifts)
- Shift North: the amount to shift the overlay north (negative for south shifts)