5 ms·
This is an advertisement, I was hoping it would be about cartography. I don't mind plugging your product at the end but "Why are maps so hard to make?" is never
by phabricator 4y ago
This is an advertisement, I was hoping it would be about cartography. I don't mind plugging your product at the end but "Why are maps so hard to make?" is never answered.
> creating and collaborating a map today is not much easier than it was in the 90s
Yes, yes it is. It is MUCH easier. This product looks nice but there's no insight here.
- deleted 4y ago[deleted]
- moffkalast 4y agoWell if you're looking for some insight, I've recently had the (dis?)pleasure of implementing tile rendering for a web satnav type thing for a mobile robot with OpenStreetMap. Tile servers are an interesting thing, there's 70 TB of data composed of 256x256 prerendered images on one end, and a user wanting a picture that goes below some weird angles they have on the other. They call the map setup a "slippy map", and it's composed of up to around 20 zoom levels, each one being a subdivision of the previous one. So the first tile covers the entire planet, the next one is split into 4, and then into 16, etc. Level 20 zoom which is used to be the max offered by OSM (now only 19 it seems) is roughly a trillion tiles, each measuring up to about a 40 meter square. https://wiki.openstreetmap.org/wiki/Zoom_levels https://wiki.openstreetmap.org/wiki/Zoom_levels Anyhow, these tile servers let you request tiles in a somewhat standard format of http://url.com/zoom/x/y.png http://url.com/zoom/x/y.png. X and Y not being the latitude and longitude of course, but they are tile indexes which have an entire wiki page on their calculation in most languages you'd want: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames But wait, we live on a spheroid don't we? Projecting a sphere onto a flat plane has always been a futile endeavour (https://xkcd.com/977/ https://xkcd.com/977/) but what's used by functional maps at large seems to be Mercator. It's mostly fine, but it does have this tiny issue that the tiles aren't all the same size in all places. So for example at max zoom Saudi Arabia gets 0.149 m/pixel while Iceland only gets 0.06 m/pixel, which means you need more tiles the further away from the equator you go. How many do you need at the poles you ask? Well... I'm not entirely sure how this tile size fits together with the fixed subdivision setup, but boy am I glad I didn't need to figure that out. Luckily if you're rendering just one part of the map at high zoom you can just scale it properly, tile it sequentially, and you can forget the rest of these shenanigans and treat it like it's linear space. If you can live with that it's not too hard.
- okok3857 4y agoThe tile size doesn't change, but the number of pixels per meter does as you note--distortion being greater the farther you get from the equator (in the Mercator projection). The protomaps blog has some heady stuff you may enjoy reading: https://protomaps.com/blog/free-tier-maps https://protomaps.com/blog/free-tier-maps. Felt apparently uses protomaps.js, which you can learn more about in that blog as well.
- moffkalast 4y agoWell tile size in meters changes. Pixels stay the same but when a tile is rendered at a specific zoom level of meters/pixel on the screen it needs to be scaled differently and you may even need to request another ring of tiles to fill up the same FoV. Perhaps that was just a specific quirk of my application since I needed to overlay a metric grid with other data. Thanks for the link, that was an interesting read. Though it seems odd to me that they insist on using AWS and complain about bandwidth when there are providers like Scaleway that do not charge for bandwidth usage at all. Though on the other hand they do only have EU locations so you can't use the CDN principle to reduce latency. But I'm sure people would wait a second longer if it meant a free API.
- MichaelZuo 4y agoI don’t get it, projecting a curved surface onto a flat surface given some constraints isn’t even grad school level math. The 2D Map is hard because it requires knowledge of undergrad Math? Assuming your not not seeking to create a perfect representation of 3D reality since that is impossibly hard.
- joecool1029 4y ago> Assuming your not not seeking to create a perfect representation of 3D reality since that is impossibly hard. Come on Micheal, English isn't hard. Even an undergrad can write better than this.
- MichaelZuo 4y ago