Live data from Hacker News

Protomaps – A free and open source map of the world

protomaps.com

61–70 of 169 posts

Re: Protomaps – A free and open source map of the world

#61
post #36

how did you deal with the china map part? AFAIK it is illegal to distribute accurate geographical data about China without their authorization. You can distribute the one that is slightly inaccurate, such as what provides google maps or apple maps for non chinese users

Illegal in what jurisdiction? I suppose only in China?

Re: Protomaps – A free and open source map of the world

#62
Maplibre[1] + PMTiles + Felt's "tippecanoe"[2] (it can output .pmtiles) are an awesome combination for self-hosted web maps if you're ok with being locked into a Web Mercator projection

for pretty much any geospatial source you can convert to .pmtiles via GDAL[3] and tippecanoe (.shp .gpkg ...) | ogr2ogr -> .geojson | tippecanoe -> .pmtiles

for OpenStreetMap data there's planetiler[4], and and openmaptiles[5] styles that work with Maplibre

with those combinations you've got a great start to something you can host for pennies on AWS S3+CloudFront or Cloudflare R2, with an open source data pipeline

[1] https://maplibre.org/

[2] https://github.com/felt/tippecanoe

[3] https://gdal.org/

[4] https://github.com/onthegomap/planetiler

[5] https://openmaptiles.org/styles/

ps I find GDAL/ogr2ogr documentation pretty hard to parse, as an example to get you started

  ogr2ogr -f GeoJSON counties.json -t_srs EPSG:4326 -nln counties -sql "SELECT STATEFP, COUNTYFP, NAME FROM tl_2022_us_county" /vsizip/tl_2022_us_county.zip

  https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.html

Re: Protomaps – A free and open source map of the world

#63

Earlier quoted context omitted.

Your best bet for this is something like OsmAnd or organic maps, which download countries worth of osm data and make it available offline. The amount of map data for any reasonable area is going to be too large for a PWA, though it would technically be possible to do with existing map viewers and this format. (Eg maplibre or leaflet)

Thanks. I'm OK with a single layer just showing the outlines of coastlines and regions, including the names of regions. I think a suitable simplified world map could fit all this in SVG. edit: Initially underestimated so did some calculations below Key Data Points for Estimate of SVG Size - Radius of Earth: 6371 km - Surface Area of Earth: 510e6 km^2 - Approximate Number of Countries: 250 - Land Area of Earth: 29% of…

I would expect border length scales with the square root of country area, so smaller countries have disproportionally longer borders than larger ones.

There also must be more countries smaller than the average country than there are larger ones (https://www.worldometers.info/geography/largest-countries-in... confirms that. Ukraine is 45th of 223, or about 20% down.)

So, I guess yours is underestimating the size.

You probably get a better estimate by using the Ukraine to estimate the scaling constant (√603,550km²)÷4953km and then use a list of land areas to estimate border lengths.

Re: Protomaps – A free and open source map of the world

#64

Maplibre[1] + PMTiles + Felt's "tippecanoe"[2] (it can output .pmtiles) are an awesome combination for self-hosted web maps if you're ok with being locked into a Web Mercator projection for pretty much any geospatial source you can convert to .pmtiles via GDAL[3] and tippecanoe (.shp .gpkg ...) | ogr2ogr -> .geojson | tippecanoe -> .pmtiles for OpenStreetMap data there's planetiler[4], and and openmaptiles[5] styles…

I'm a student trying to upskill in geospatial/compsci. What kinds of projects could you make with all of this? Any good starting points you'd recommend?

Re: Protomaps – A free and open source map of the world

#66
post #65

We've had quite some success with deploying "serverless" maps, leveraging PMTiles. Have a look at https://github.com/serverlessmaps/serverlessmaps if you're interested to deploy this on AWS CloudFront/Lambda@Edge/S3...

I also wrote a blog post as introduction: https://tobilg.com/serverless-maps-for-fun-and-profit

Re: Protomaps – A free and open source map of the world

#67

Maplibre[1] + PMTiles + Felt's "tippecanoe"[2] (it can output .pmtiles) are an awesome combination for self-hosted web maps if you're ok with being locked into a Web Mercator projection for pretty much any geospatial source you can convert to .pmtiles via GDAL[3] and tippecanoe (.shp .gpkg ...) | ogr2ogr -> .geojson | tippecanoe -> .pmtiles for OpenStreetMap data there's planetiler[4], and and openmaptiles[5] styles…

I'm a student trying to upskill in geospatial/compsci. What kinds of projects could you make with all of this? Any good starting points you'd recommend?

Not OP, but almost anything where "a map" is the output will be a hugely big learning opportunity for you. Static maps, print-quality maps, interactive web maps -- the experience of building any of those will bring lots of learning. (That's how I got started.)

Re: Protomaps – A free and open source map of the world

#68
post #63

Earlier quoted context omitted.

Thanks. I'm OK with a single layer just showing the outlines of coastlines and regions, including the names of regions. I think a suitable simplified world map could fit all this in SVG. edit: Initially underestimated so did some calculations below Key Data Points for Estimate of SVG Size - Radius of Earth: 6371 km - Surface Area of Earth: 510e6 km^2 - Approximate Number of Countries: 250 - Land Area of Earth: 29% of…

I would expect border length scales with the square root of country area, so smaller countries have disproportionally longer borders than larger ones. There also must be more countries smaller than the average country than there are larger ones ( https://www.worldometers.info/geography/largest-countries-in... confirms that. Ukraine is 45th of 223, or about 20% down.) So, I guess yours is underestimating the size. You…

I like your refinements! I may take a look at reviewing the estimate later! Thank you for making this contribution, it's really valuable that you share your intuitive statistical knowledge here :)

Re: Protomaps – A free and open source map of the world

#69

Maplibre[1] + PMTiles + Felt's "tippecanoe"[2] (it can output .pmtiles) are an awesome combination for self-hosted web maps if you're ok with being locked into a Web Mercator projection for pretty much any geospatial source you can convert to .pmtiles via GDAL[3] and tippecanoe (.shp .gpkg ...) | ogr2ogr -> .geojson | tippecanoe -> .pmtiles for OpenStreetMap data there's planetiler[4], and and openmaptiles[5] styles…

I'm a student trying to upskill in geospatial/compsci. What kinds of projects could you make with all of this? Any good starting points you'd recommend?

you can checkout https://github.com/maplibre/awesome-maplibre#users for some examples of what you can do with Maplibre

Re: Protomaps – A free and open source map of the world

#70

Maybe I am overlooking something, but where does Protomaps get its data? Also, is the data open source? The FAQ says the code, etc. is open source, but doesn't mention data: > Is Protomaps open source? / Yes! All core software libraries and formats are open source under permissive licenses, including: ...

It's OpenStreetMap (ODbL) and Natural Earth (public domain) currently

* http://openstreetmap.org

* http://naturalearthdata.com

Post reply on HN