1

Re: Bounding Box - wizard

We are currently in the midst of transferring from Recorder 2002 to 6 here at Kent, and hopefully moving our reporting from Rplus (Mike Wideli's reporting system for R2002) to XML reports also, with Mike's help. As part of this, I am starting to compare reporting outputs so we can get roughly the same output (or better) than we do currently.

I have started my quest with the report wizard, and the following behaviour confused me mightly until I found Mike's post here. My bounding box area is in blue. Red boxes relate to records that are being picked up correctly, but records at the grid references in green failed to be picked up and those in yellow were picked up when they shouldn't have been. I have zoomed in here (see scale) but records from the whole of the bottom right-hand 1km square were not included, i.e. for a bounding box of TQ4749 to TQ 4999951999 records with a grid reference of TQ4949 are not picked up, even though those for TQ4951 are. From Mike's posts this seems to be a known issue from the wizard using lat/long instead of grid references. I was wondering if there is a reason that lat/long is used in this case - I realise it might be seen as a minor issue as it only affects records near the boundary, but it seems to be an unecessary one?

[img]http://i39.tinypic.com/2zhfiog.jpg[/img]

-----------------
Teresa Frost | Wetland Bird Survey National Organiser | BTO
Other hat  | National Forum for Biological Recording Council
(Old hats  | NBN Board, ALERC Board, CBDC, KMBRC)

2

Re: Bounding Box - wizard

Hi Teresa,
Lat Long is used internally by Recorder, because it supports several different spatial reference systems and can be extended to support many more. The systems are not limited to the area of the British National Grid, and it is possible to have data that mixes up different systems. Therefore when doing a bounding box test, it is necessary to use a single "common denominator" system and Lat Long is chosen as any other system can be mapped onto it. This does, however, lead to some minor errors along the edges of the boxes, because a line drawn between 2 points in a lat long projection will be curved when reprojected onto the easting northing system our grid is based on. I hope this is making sense! In an ideal world, Recorder's code would perform the calculation using the British Grid system if the occurrence data AND the report filter (bounding box) are defined in the British Grid system, and only revert to Lat Long if this is not the case. Unfortunately this would increase the complexity somewhat and probably reduce performance as well.

However, your image is very interesting, because it shows that at least one of the grid squares that is not detected is not aligned with the edge of the box, so this particular problem may not be the cause. I'd be interested to know what the grid ref of the small green square, just left of centre in the blue box and a quarter of the way up, as that is definitely suspicious.

Best Wishes

John van Breda
Biodiverse IT

3

Re: Bounding Box - wizard

Hi John, thanks very much for answering my question. I follow the reasoning, but I guess it means for most users in the UK who only use the BNG XML reports are the better option.

The grid reference you asked for is TQ49854907. There are four other cases which are not right on the boundary for this bounding box:

TQ49294905
TQ49364903
TQ49454903
TQ49994905

My brain starts hurting when I think about projections, but perhaps these are close enough to the boundary to be affected in the same way. I haven't replicated the issue with any other bounding boxes yet, because there has been a server failure which brought our network down in the past couple of days and one of things still not working as a result is Recorder 6 which has hampered our testing somewhat!

-----------------
Teresa Frost | Wetland Bird Survey National Organiser | BTO
Other hat  | National Forum for Biological Recording Council
(Old hats  | NBN Board, ALERC Board, CBDC, KMBRC)

4 (edited by johnvanbreda 23-03-2009 08:36:40)

Re: Bounding Box - wizard

Hi Teresa

Thanks for the information. I can confirm the following test case in Recorder 6.13.2:
1) Create a single observation at grid reference TQ49854907 and make sure it is checked.
2) Run the Report Wizard, filtered by bounding box TQ4749 to TQ 4999951999 for all taxa.
3) The observation is not picked up by the report.

This square is not close enough to the edge to be affected by a projection issue.

Lynn, any chance this could be fed through the system please if it's not already?

Best Wishes

John van Breda
Biodiverse IT

5

Re: Bounding Box - wizard

Hi John/Teresa,

Thanks I have logged this on the system.

Lynn

6

Re: Bounding Box - wizard

Recorder (as does the OS software) converts the latitude for TQ4749 to  51.2207287795978  and the latitude for
TQ49854907 to  51.220616770705 which makes the is not what you would expect as northing 4907 is greater than 4900,  In this instance I think the effect is what you would expect using Lat/Long. 

Mike

Mike Weideli

7

Re: Bounding Box - wizard

Hi

I've just encountered this problem and wonder if there isn't some way it can be avoided?  If was searching for all records in the grid square TQ40K but lots of records along the bottom boundary were missing from the results.  For example, records at TQ4500 were not reported, and it seems the only way to include them is to move the south-west corner 30 metres south (i.e. use TV4397099970 as the south-west corner).

I understand from the above posts that this is related to the curvature of the earth and the translation from easting/northings to lat/long.  However, I wonder if one or more of the following changes would be possible to help improve the report wizard results:

  1. Include some variability in the lat/long comparison to allow for the curvature of the earth.  For example, reduce/increase the lat/long bounding box values by a proportion of the size of the box size, or adjust the record's lat/long position based on it's position in relation to the bounding box (to allow for some outward curvature of the sides of the bounding box.

  2. Allow the user to specify a 'buffer size' to apply to the bounding box.

  3. Allow users to specify if all records must be within the bounding box (which presumably is the default) or must overlap the bounding box (i.e. if any of the corners of the records are within the bounding box.

  4. Add a warning to the report wizard screen to explain that some records near the boundary of the box may not be included.


Many thanks
Andy

Andy Foy
Systems Manager
Greenspace Information for Greater London (GiGL) CIC
www.gigl.org.uk