aws-samples / aws-last-mile-delivery-hyperlocal

AWS Last Mile Delivery Hyperlocal
Other
42 stars 11 forks source link

replace simulator origin/destination generator mechanism #165

Open sperka opened 1 year ago

sperka commented 1 year ago

Currently we create origin/destination records for the simulator with randomly generated coordinates that lead to routing errors in the dispatcher.

Instead, let's generate these records with real (routable) locations. We still keep the area definitions and radius, but the number will act as a max number.

https://overpass-turbo.eu/ - this open API helps to extract POIs from openstreetmap data, so we can easily run queries like the following and get enough locations back:

[out:json][timeout:25];
(
  node["amenity"~"cafe|restaurant"](around:5000.0,-6.1813448922772185,106.8372344970703);
);
out body;
>;
out skel qt;

Obviously around and lat/long coordinate values will be passed as parameters.

The key amenity seems to be quite extensively filled out (building tag is not e.g.: in Jakarta).

Query language guide here if needed to extend the above query.