Monday, November 10, 2008

Dagnabbit, it *doesn't* work after all!

Because of the distortion between Latitude & Longitude, and the sparseness (sparsity??) of the data we're using, we found that we had difficulties where we have a sparse road with a dense junction at one end. The "nearest point" in terms of Longitude & Latitude is not necessarily the same as that in terms of Metres.

We now have further options: One is to generate Voronoi Cells around every road & junction, and use those to determine which road section (up to 50m in length) or junction someone is at by checking if their location is within that cell. Another is to oversample the road (required for the generation of the Voronoi Cells in any case) and hope that the existing algorithm works properly in that case - which would probably be much quicker.

I've spent an inordinate amount of time tinkering with a tool called FME, which allows me to throw geometric data about. It's with FME that I created the node map we used to do the routing, although I have also written an exporter in C# using our own Shapefile reader (started by Ben, enriched by myself). FME also allows us to generate the Voronoi Cells, but if we don't need them, we might not even need FME in the long run.

Watch this space!

No comments: