City Roads – Draw all roads in a city at once
anvaka.github.io
anvaka.github.io
Just wanted to thank you for the comments, feedback and shares! I 'm very happy!
PS: If you liked that project you may find my other stuff interesting: https://twitter.com/search?q=from%3Aanvaka%20min_retweets%3A... - it's just a hobby but I love it :D
A site featured on hn a few weeks ago which showed height renderings of various locales let you do something like that.
Now I feel kind of silly suggesting to this person a great idea that was actually...their own.
> Also within the administrative boundaries of Tokyo Metropolis are two island chains in the Pacific Ocean directly south: the Izu Islands, and the Ogasawara Islands
- Pre-saved color swatches to cycle through, like those at color.adobe.com/trends
- Custom cell phone cases. A bunch like casetify offer affiliate revenue.
Kudos :)
The rendering is done with WebGL. I wrote a silly 2d renderer to learn more about the platform, and never documented it. Thought it would not be very useful.
Ended up using it in a lot of tiny projects, but didn't have chance to document it yet. Here it is https://github.com/anvaka/w-gl
As for the visuals of this map, chances are the MIT license for the repository applies to it as well [1] [not a lawyer].
0: https://wiki.openstreetmap.org/wiki/Legal_FAQ#3a._I_would_li...
The first time it took very long and after a while it said 'still loading'. Then after a while 'sorry this is taking so long'. And then 'trying another server'.
This is great interaction because the user knows what is going on and the app is still busy.
Great job!
Unfortunately it can't seem to find most cities I try. Just one example, typing "New Hartford" only finds one in Iowa, instead of listing all of them [1]. Most other medium-sized towns I tried show no results at all.
I'd also love it if there were a way to export as SVG's -- these seem like they would make amazing posters to frame.
I checked here https://nominatim.openstreetmap.org/search.php?q=New+Hartfor... - looks like all other `New Hartford` have type "node" in the database, which doesn't give boundaries of the cities.
We are thinking about fallback here: https://github.com/anvaka/city-roads/issues/7 but what might work better in short term: try entering a county name, and then zoom in onto the place. It is not as convenient as having a city boundaries, sorry about that.
Since it's not clear you could search by county, may I suggest including that as a tip or something? Otherwise it gives the impression the site is broken somehow.
Or if it's possible, to find the smallest containing item that does have boundaries, whatever it is. (I don't know if OSM supports that performantly?)
https://anvaka.github.io/city-roads/?q=city%20of%20edinburgh...
Specifically, non-motorized walking/biking paths and mountain bike trails (highway=path) are rendered.
Ref: https://anvaka.github.io/city-roads/?q=Marquette%2C%20MI&are...
SVG export would also be pretty useful.
See this for reference: https://wiki.openstreetmap.org/wiki/Key:highway
I believe a driveway would be highway=service.
A few from the Wikipedia list [0] looks nice though.
[0]: https://en.wikipedia.org/wiki/Planned_cities
Quezon City: https://anvaka.github.io/city-roads/?q=Quezon City&areaId=3600106569
Chandigarh: https://anvaka.github.io/city-roads/?q=Chandigarh&areaId=360...
Singapore: https://anvaka.github.io/city-roads/?q=Singapore&areaId=3600...
[1] https://osmand.net/ [2] https://f-droid.org/en/packages/net.osmand.plus/
It says it is contacting openstreetmaps, but the global mapping community is called openstreetmap (no 's').
My wishlist item would be to have an option to render an additional x miles around the city limits boundaries to help incorporate communities that have the same city in their address but are technically not within the city limits.
I'm probably just not in touch with my inner artist and am too quick to look for the functional / business purpose of this.
By the way, really solid work and very kind of the author to share this. I can still appreciate it even if I don't see how I'd ever need to use it.
https://steamcommunity.com/app/255710/discussions/0/14562024...
It sounds like the version someone built later sort of works:
https://steamcommunity.com/sharedfiles/filedetails/comments/...
It's kind of overwhelming, but there's all sorts of tools that can take OSM data and do something with it.
How complicated would it be to add the option of highlighting one or two streets? Something like, make the street line thicker or change its color.
> { "statusError": 504, "message": "Unexpected status code 504 when calling https://overpass.openstreetmap.ru/cgi/interpreter" }
And the referenced url 404s
I think it just does not have data on smaller towns and cities. I've tried several US smaller cities and nothing works. However, your link does. I can get San Diego and Irvine, CA. But I can't get Redlands or Yucaipa, CA. I can't get Polson, MT (nor Kalispell nor Helena).
Edit: Update - Finally got some data on Polson, MT.
That said, I also cached 3,000 cities with population over 100k citizens and try the cache first, before going to overpass. That may be the reason why it is fast in some cases and slow in others.
By the way if someone has more stable/fast overpass endpoints - I will be happy to add them to the list!
I tried Sandy Valley, Nevada. Doesn't get much smaller than that.
Unexpected status code 504 when calling https://overpass.openstreetmap.ru/cgi/interpreter
Compare it's view to Beaverton, Oregon: https://anvaka.github.io/city-roads/?q=Beaverton%2C%20OR&are...
With the Google Maps view: https://www.google.com/maps/@45.5029349,-122.8365195,13.75z
It's like most of the Cedar Hills neighborhood doesn't exist. It also drew a line for a power line where there is no road.
Perhaps in situations like this, "City Roads" might consider ignoring the cut-out enclaves and just using the mulipolygon's outer boundaries.
The power line showing up as a road is a mystery. If you can locate the corresponding feature on OSM you might want to investigate it. (There may in fact be a road or trail of some sort, though -- it's common for powerlines to have a track for maintenance vehicles.)
The source data tends to not be incredibly accurate.
My mailing address is in Beaverton, but OSM thinks it's Aloha. My zip code according to the post office is 97003, but some map software rejects it as non-existent, or forces a change to 97006.
OSM's Portland borders also definitely don't match what mailing addresses are there. I used to live in apartments off of NW 185th near US-26, which most people would call Beaverton, but my mailing address was Portland, but I was at least 4 miles from anywhere people would actually call Portland.
I wonder how common these confusing city limits are in other metro areas.
Denver, CO: https://www.openstreetmap.org/relation/253750
Beaverton, Oregon: https://www.openstreetmap.org/relation/423111
ZIP Codes are not geographical entities and don't correspond to geographical extent; rather, they are a hybrid between a discrete number of finite delivery-points and an abstract way of capturing a postal delivery route. They are often abused as geographical entities, which the Census Bureau has tried to rectify with ZCTAs [1], but it's unclear whether most informal use of ZIP Codes is haphazard, or actually conforms to ZCTAs.
However, ZIP Codes directly map to one preferred place name designated by the USPS, and zero or more acceptable alternative place names. These are usually inspired by, but don't necessarily correspond to municipalities and political units that the lots in question belong under.
For both 97003 and 97006, the USPS recommended place name is "BEAVERTON", and other acceptable names are "ALOHA" and "HILLSBORO".
Beaverton's city limits are complicated [3][4]. The city has a map of annexations as well [5]. Cedar Hill was once supposed to be annexed. A court case about the proposed annexation of the Nike HQ resulted in these plans being put on hold [6].
[1] https://www.census.gov/geo/reference/zctas.html [2] https://about.usps.com/news/state-releases/or/2014/or_2014_0... [3] https://www.beavertonoregon.gov/DocumentCenter/View/9005/Cit... [4] https://www.beavertonoregon.gov/DocumentCenter/View/5554/Bea... [5] https://www.beavertonoregon.gov/DocumentCenter/View/843/Anne... [6] https://www.oregonlive.com/oregonianextra/2006/06/appellate_...
I wonder if something similar was used to create the laser cut wood maps you can find on Etsy[0].
[0] https://www.etsy.com/listing/605571478/kansas-city-wooden-ma...
I guess you cannot really fix it because it probably comes from the data you are using, but for Tokyo the default zoom is broken because a bunch of unrelated places is also displayed.
Do you think you could also include the railroads/subways? I think here it is a more relevant way of finding your path in the city rather than the roads and the result could be quite interesting.
Any thoughts on international support? :)
We need `relationship` osm type to get the boundaries...
There is an ongoing discussion on the repository to give a better fallback: https://github.com/anvaka/city-roads/issues/7
I expected lag on my phone but it works great.
Reminds me of this print I still have on my wall called "All Streets Limited" by Ben Fry.
I think the main feature is buying the rendering as a coffee mug.
I hope it has more potential than art, though art in itself is very strong and inspirational thing!
For example, one could use this tool to debug missing areas in OSM. You could also use it as a source of large natural graphs to study network flow, deseas propgation, etc.
Finally it could also be used for educational purposes: you could show various graph algorithms on this data with something more realistic than abstract graphs :)
We are trying to find a fallback for `node` types here https://github.com/anvaka/city-roads/issues/7 - we basically don't have accurate city boundaries for nodes.
Or SVG?
Most web browsers these days should GPU accelerate line drawing, making the whole lot one single openGL/directX/vulkan api call.
If it doesn't perform equivalently, it's really a browser bug, and ought to be fixed.
I tried disabling ublock but with no changes.
https://anvaka.github.io/city-roads/?q=City%20of%20Cape%20To...