brangerbriz / webroutes

Internet mapping artware
GNU General Public License v3.0
24 stars 8 forks source link

Incorporate country boarder GeoJSON to get crossing number #17

Closed brannondorsey closed 7 years ago

brannondorsey commented 7 years ago

Currently implementing this, and detection is working well with maps/country_borders.geojson, however, we need to exclude (or figure out how to best handle) submarine cable hops so as not to add results like below:

screenshot from 2016-09-06 13 09 01

Which yields:

["United States", "Western Sahara", "Mauritania", "Algeria", "Libyan Arab Jamahiriya", "Egypt", "Sudan", "Saudi Arabia", "Oman", "India"]
brannondorsey commented 7 years ago

This problem is fixed with:

infraAug.addInfrastructureData(lastHop, hop)
// don't check a border crossing if this is a 
// submarine cable hop
if (!lastHop.infrastructure.cable)
    borderCross.addBorderCrossData(lastHop, hop)
else lastHop.countries = []

In geoTracer.on('ordered-hop') in app.js, however, then we lose border crossings if the landing point of the cable is in a different country than the receiving hop. For instance if a hop runs from the US to the Czech Republic, and we don't check borders because it is a submarine cable jump, then we would miss the Germany->Czech Repub. border crossing from the landing point to the hop destination. Ideally we would integrate the landing point logic into the border crossing detection pipeline.

brannondorsey commented 7 years ago

Done. Above comment can be opened in another "low priority" issue if need be.