Meaning of boundingRectanglesC and boundingRectanglesOffset?

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.

Meaning of boundingRectanglesC and boundingRectanglesOffset?

Postby Bernd Welter » Fri Feb 16, 2018 9:55 am

HI there,

yesterday I spoke to a customer who wanted to know how to perform a corridor search with xRoute. We offer various approaches how to deal with this feature and under specific circumstances we recommend to combine various function calls.

One important question in this context is the datasource of the candidates. Though we offer a so-called GEODATASOURCE layer which connects the xServer (xLocate airline search, xMap visualization, xRoute proximity search and corridor search) this feature doesn't work if a direct connect between xServer and database isn't possible.

In such a case the application has to retrieve the candidates from the datasource and to forward them with explicit ID and coordinates to the nearest search (xRoute.searchForNearest). But: sometimes you have a large number of candidates in the database table, even after filtering additional criteria such as skills, openint times, ...
In such a case we offer an additional geographic aspect which enables you to benefit from xRoute's output which is based on drumroll boundingRectanglesC and boundingRectanglesOffset. These two parameters can be used to gather rectangles which can be part of SQL BETWEEN statements. But before I describe the parameters I show you some simple images, based on the same route.
BoundingRectangles_#5_offset10000.PNG
Both routes are equal and also the corridor size of boundingRectanglesOffset=10000m is same for both maps. The difference is the number of rectangles = boundingRectanglesC.
left: boundingRectanglesC = 5
right: boundingRectanglesC= 25
By asking for more rectangles the overlapping area is smaller and so you can filter more candidates.

BoundingRectangles_#25_offset10000_50000.PNG
Both maps have boundingRectanglesC=25
This screenshot compares the horizon of the corridor:
left: boundingRectanglesOffset=10000m, right: boundingRectanglesOffset=50000m.


So the proper description of these rectangles is:
An object(x,y) which is NOT located in at least one of the rectangles is definetly outside an airline corridor of boundingRectanglesOffset.

That's it.
Of course the higher the number of rectangles is the more complex is the evaluation of the BETWEEN statement. But the performance of the corridor search is better afterwards. Find the trade off ;-)

Best regards,
Bernd
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1098
Joined: Mon Apr 14, 2014 10:28 am

Return to PTV xRouteServer

cron