Show HN: howfar.nyc
3 points| ahmedoo | 25 days ago |howfar.nyc
I pulled some GTFS data and pre-computed transit travel times with Open Trip Planner for every intersection in NYC and some urban hubs in the tri-state area. The transit data includes MTA, CT Transit, Septa, and NJ Transit. The polygons are stored with PostGIS, and leaflet makes quick work of rendering them as GeoJSON layers. I have a few mapping projects on the same stack written in clojure/script so it was a natural extension.
Happy to answer any questions.
Note: Most transit agencies willingly provide their own GTFS data, but Amtrak's had to be FOIA'd so I used a third party cleaned up version of it.
geokon|25 days ago
It's cool to see sleek projects like this. I made an application that needed to make heatmaps, but I just made a grid of colored squares and cropping some GeoJSON contours and I ended up generating SVGs .. A bit goofy reimplementing a mapping library, but I needed to do some heavy math, so this way it was all JVM code
ahmedoo|24 days ago
Your project sounds really cool, I'd love to read that code. The implementation in this project largely utilises Leaflet's GeoJSON layers (https://leafletjs.com/examples/geojson/) which does render out to SVGs (there's an optional canvas renderer, too). One of the trickier parts was figuring out how to layer each isochrone band so that those closest to the point (i.e. 15 minute band) were painted on top of the bands further away (https://www.geeksforgeeks.org/dsa/painters-algorithm-in-comp...). That and pre-computing the distances per NYC intersection across the tri-state area which required a lot of messing around with OpenTripPlanner configuration files, GTFS data, and parallelising the code to finish in a reasonable time span (few days).