by linsomniac · 8y ago · 0 comments
We already have our own aerial tiles, built off the free NAIP imagery, and I just went through rebuilding the 2017 NAIP tiles last week to make them higher quality and fix some seam issues.
This combination is pretty good and lets us take control of our map tile destiny.
References I used in setting things up:
https://github.com/zavpyj/osm-tiles-docker https://switch2osm.org/ https://ircama.github.io/osm-carto-tutorials/tile-server-ubu...
I have set it up on a Centos 7 server using more or less the instructions from here https://switch2osm.org/manually-building-a-tile-server-16-04... (yes they are for Ubuntu but you'll get the idea) and everything works great. Even if you don't really need it, I recommend trying it to understand how it works; it has some very intuitive ideas.
Beyond the tile server I am also proposing GeoServer (http://geoserver.org) for hosting the geo points on the maps (it can integrate with PostGIS and various other datasources and output the geo points in various different formats). You can then use Leaflet (https://leafletjs.com) to actually display the map and points!
The download is an SQLite database with a standard-ish structure (MBTiles), you can either write a small server or use theirs.
I needed vector tiles in other projections — WGS84 equirectangualar, an Arctic one, and an Antarctic one. Generating those took many hours on a cluster.
However, as an example, the one-time $40 for Colorado is likely to be much cheaper than generating them yourself, and is probably adequate if you don't need to keep up to date.
Has anybody else been able to try this?
With a commercial license, the tiles are from 2 July.
I assume the commercial tiles are a few days behind as it's just not worth most people's effort to stay up-to-the-hour — different map services can offer that, this company is making easy self-hosted map tile packages.
The free license is presumably using older data to encourage an upgrade.
Much better than the NAIP aerial imagery, which takes around 3TB for the source data, 280GB for the resulting tiles, and around a full day to generate.
Source: https://github.com/peermaps/peermaps
Also writeup about the architecture: https://github.com/digidem/osm-p2p-db/blob/master/doc/archit...
And then you need to think of how to do data updates. OSM updates minutely.
One major advantage of not updating your data very often is that the tile-images won't need to be re-generated thus you save a lot of (CPU intensive) resources! I think that another commenter mentioned that he generated the tiles in a CPU intensive system and then just off-loaded the images to not-so-fast system for serving.
I rendered all of Estonia from zoom levels 0 to 18 (~16.5M tiles) which is around 20GB and host the tiles on a cheap DigitalOcean instance.
* What is the recommended procedure for backup + restore?
I find a lot of projects in this space make you go through an manual copy-paste setup process like if it was a one-time thing - it is not - updating OSM data is a crucial part in this process and should be part of it.
I haven't investigated it because we are probably moving to Vector tiles over the next month or two, and we don't need up to the minute map updates. On one of our sites, we have been rendering navteq tiles and we only get updates for those quarterly. It was only our public site that we were using Google Maps for.
Backup and restore we are just doing via normal backup programs. The tilecache is stored in meta tiles, which is a d duplicated set of 64 tiles in a single file. So we are only dealing with about a million files in a directory structure totaling 25 gigabytes.
If we needed to restore or update our tiles, we would probably just spin up a new box and rerun ansible to deploy it. I have it all encoded Within a Playbook.
Living in Germany, I find the map quality of OSM much better than Google Maps. Sure, it lacks the integration with the other Google services like a good search and live traffic, but speaking about the pure map quality, Google is lacking a lot of detail here.
"Which maps should we investigate deeper?
Some options we could reject quickly for various reasons. OpenStreetMap is not supposed to be directly used by commercial sites. Apple Maps, even though we wouldn't mind having Apple logo on our site somewhere, was just released as beta and requires Apple developer account to test properly."
How difficult would it be to build a competitor to Mapbox? Well, if all you care about are map tiles, it's no big deal. If you want to build a business around it, that's always work. You're going to need to build the tiles, have infrastructure to serve it, monitoring, staff to manage it, billing and charging infrastructure, etc...
* what is the workflow to update the OSM data?
* what is your recommendation for a good geocoder?https://wiki.openstreetmap.org/wiki/Nominatim is an OK geocoder, definitely worth trying out at least. Though the pay services will definitely be better.
This is the platform Maps.me is based on, correct? I ask because I downloaded Maps.me the other day, after reading HN, and have found it to be missing most businesses that I've attempted to search for. In addition, there seems to be no obvious way to suggest missing destinations.
I too want Google/Apple maps alternatives to succeed, but my limited trial so far has not been promising.
You might try looking at OsmAnd. It too uses OpenStreetMap data, but it does allow you to add some amount of missing data as well (see https://osmand.net/features?id=osm-editing-plugin).
This, of course, is part of the advantage of OpenStreetMap, you notice something missing, you add it, and now it is no longer missing.
That's strange. I just checked Maps.me on Android, and if you open the hamburger menu there's an "add a place to the map" option.
Maps is based on Maps.me.