1

Re: Polygon searches - documentation of algorithm?

One for the pot.

How reliable is the polygon search facility? 
I know in older versions there were REAL issues, but is recorder now using 'foolproof' algorithms for returning records?
Or, is their still a margin of error.

As Recorder is not a proper GIS I wouldnt expect it to be foolproof - but as such I woud be keen to know where the errors might lie, and hence how reliant I am on its spatial capabilities.

"Include overlapping grid squares in report results. "

Is just not that simple. Are we using MCP's, the four corner vertices, a true point in polygon search for each vertex?

Is this documented and available?

I currently do use polygon searches within the software, but Im not sure I should be...

thanks

MAtt

Cumbria Biodiversity Data Centre
Tullie House Museum

2

Re: Polygon searches - documentation of algorithm?

Hi Matt,

Whilst I can't answer your question specifically as I'm not privy to Recorder's source code, I think it uses a spatial library made by a company called Graticule. I did some tests of early versions of recorder and found errors in it's spatial selections,  I don't know how well the latest version deals with this.

Do you have an external GIS that could be used to derive a test polygon?

If your interested in algorithms there are a few solutions to the "point in polygon" problem. One of the most common being to count the intersections of a horizontal line drawn through the point and polygon. If the number of intersections is odd the point is inside the polygon. [1]

[1] Principles of Geographical Information Systems, Burrough and McDonnell, p64, 1998.

Kind Regards,

Dave Cope,
Biodiversity Technology Officer,
Biodiversity Information Service for Powys and Brecon Beacons National Park.

3

Re: Polygon searches - documentation of algorithm?

My understanding is that "Include overlapping grid squares in report results. " is based on an algorithm provided by JNCC.  I assume they would  be willing to make this available to anyone interested.

I think it  was stated somewhere  that   while this  algorithm was not perfect  it would give substantially more accurate results.  My testing would suggest  that this in in fact the case.

Mike Weideli

4

Re: Polygon searches - documentation of algorithm?

We can make the algortithm available. In essence Dave is correct - that is how you test a point. For a grid quare you do the same thing for each point of the square and find how many ware within the polygon. ie. some in , some out = overlapping. All in = inside (but need to check for holes in the polyogon). All out - outside but check for complete overlap of the polygon etc.
As I say I can provide more but Dorset could also provide more info on exactly what was implemented in the actual code.
Steve

5

Re: Polygon searches - documentation of algorithm?

I think Matt's question is a good one as it raises the question of accuracy. This may have some bearing on those who use Recorder in conjunction with applications that could have legal issues - e.g.. planning.  Having a defined set of errors for spatial selection would be invaluable in such cases. Having said that I suspect most people export to external GIS for such work.

I have used both the Lat/Lon and OSGB references in the SAMPLES table to generate external spatial tables and both correlate.

Dave Cope,
Biodiversity Technology Officer,
Biodiversity Information Service for Powys and Brecon Beacons National Park.