Live data from Hacker News

City Roads – Draw all roads in a city at once

anvaka.github.io

111–120 of 145 posts

Re: City Roads – Draw all roads in a city at once

#111
post #20

Hey there, I'm the author of the tool! 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

I like the interaction design a lot while loading the data.

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!

Re: City Roads – Draw all roads in a city at once

#112
post #105
post #20

Hey there, I'm the author of the tool! 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

Would love to see a version that renders train/street car tracks

Or bike lanes!

Re: City Roads – Draw all roads in a city at once

#113
post #92

Did you compare to a regular old canvas doing path calls? 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.

Unless you queue up primitives for batch rendering, there is no chance that the canvas API is even remotely as fast as proper WebGL usage due to its design. You need to create a vertex buffer (at least somewhere under hood) and submit it in a single operation (at least under the hood) to get this kind of performance. Looping over lines on the CPU with immediate submission doesn't get you anywhere close.

No browser does immediate submission of canvas draw calls. They all appear synchronous, but the reality is they are all queued until the end of a browser main frame, or until your code does something silly like reading back a pixel.

Re: City Roads – Draw all roads in a city at once

#114
post #66

Earlier quoted context omitted.

Thank you! 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…

Ah the counties work great! Never even would have occurred to me. And honestly, for many medium-sized towns, the county is more intuitive boundary anyways. 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.…

It's not just small cities that counties are useful for - Los Angeles (the city) is really fragmented, snaky thing while Los Angeles (the county) is actually geographically coherent.

Re: City Roads – Draw all roads in a city at once

#115
post #20

Hey there, I'm the author of the tool! 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

It's interesting to note the size of the download for a city. Guess it's related to the complexity of the road network, not necessarily the number of roads. Interesting to think about the "entropy" of a city's network and compare between cities. For instance, Sydney AU is 25Mb, but NYC is only 11Mb. Even tho population of NYC is ~e x Sydney.

Check out Sao Paulo - it was over 500MB! Was very impressed that the map still rendered and was responsive on my 4 year old laptop too.

Re: City Roads – Draw all roads in a city at once

#116
post #20

Hey there, I'm the author of the tool! 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

Can you export it to SVG? I can see this really helping Wikipedia editors.

Re: City Roads – Draw all roads in a city at once

#117
Really great idea and nicely made! Congratulations! I'm considering making a poster out of it, with our home town. I think my wife would love to have it. Seeing it on the wall would probably make us less home-sick.

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.

Post reply on HN