Following last week’s post explaining the tile-addressing schema in PMTiles version 3, Brandon Liu now discusses its compression approach reducing the disk space required to store a global tile dataset to only 91.6 MB.
Update: Brandon clarified on Twitter, the 91.6 MB mentioned above only holds the data required to map Z,X,Y coordinates to the corresponding Tile ID. The actual global map data set is 80GB. (15 August 2022)
Kyle Barron demonstrates how to use deck.gl to render data in GeoArrow format, starting with a GeoJSON dataset of one million building footprints in Utah.
We’ve been able to make web maps with GeoJSON data for some time now, and converting GeoJSON to GeoArrow and preparing the data for deck.gl requires extra development work, so why would you want to use GeoArrow? The short answer: It’s incredibly fast.
GeoArrow overlaps almost exactly with the format that deck.gl expects! So deck.gl can render from GeoArrow’s physical representation very efficiently. For point and linestring geometry types, the underlying coordinates array can essentially be copied directly to the GPU with no CPU processing required. For polygon geometries, only polygon tessellation still needs to happen on the CPU.
We’re looking at the not-so-distant future of web mapping here, when we can render millions of features onto a web map without a noticeable impact on performance.
A new version of MapLibre was released just yesterday. Release 2.2.0 is a minor version in semantic-versioning speak, but it adds a major feature: 3D terrain maps, enabling developers to visualise the topography of land surfaces in interactive maps on the Web.
Mapbox introduced a similar feature to Mapbox GL 2.0.0, the first of the library’s releases after moving away from an open-source license. MapLibre is a fork of Mapbox GL that was created to preserve and continue the work under an open-source license. Thanks to the efforts of MapLibre maintainers, developers can now build interactive 3D maps for the Web using open-source technology.
I’ve played around with a small example based on an example by Oliver Wipfli, and the results look really slick. Some minor issues still exist, for example, the hill shade disappearing when you tilt the map close to a horizontal view.
MapLibre's 3D terrain in action; also demonstrating smaller issues when tilting the map close to a horizontal view.
It’s great to see the project under such active development. Mapbox has paved the way for modern web mapping with vector tiles, but it’s good to have more competition in the space — even better when the competition is open-source.
PMTiles version 3 introduces a new tile-addressing schema. Instead of using Z,X,Y tile coordinates, the new schema uses tile IDs based on the tile’s position within a series of Hilbert curves:
The TileId 36052 corresponds to the Z,X,Y position of 8,40,87. The calculation of ID uses a pyramid of Hilbert curves starting at TileId=0 for zoom level 0. The next zoom level, a 2x2 square, occupies the next four IDs in the ID space TileId=(1,2,3,4), the next level being the next 16 IDs, and so on.
And to not duplicate tiles that contain virtually no information (for example, tiles just showing water) the RunLength indicates how many times a tile will be repeated within the Hilbert curve, so vast areas of the ocean can be represented with just one tile.
Ocean tiles are not only repetitive, but sparse and often contiguous in Hilbert space. This entry:
means that the 44 byte vector tile with a single square in the layer ocean is repeated over 100,000 times, starting at Z,X,Y=11,285,1311 and ending at 11,19,1304.
Neat.
Update: A new post outlines the disk layout and compression approach of PMTiles version 3. (15 August 2022)
Outreachy is an internship program designed for young people to make their first mark in open-source software development, specifically people from underrepresented groups in the tech industry. (So, if you’re a European white dude, you don’t need to apply.) The internships come with a $7,000 stipend for three months and are fully remote.
The mentoring projects for the next round will only be announced at the end of September. Still, it usually includes projects with a data-collection and data-management focus, some with a geospatial element. The most recently completed round included interns at Ushahidi and ODK-X.
The program is an excellent opportunity to get into open source and add a fantastic project to your portfolio. I’ve mentored Outreachy interns before, and some went to build successful careers at big names such as RedHat and Google. (Obviously, because my former mentees are smart and driven software engineers and not because I’m a particularly great mentor.)
We have a new advanced filter feature available in ohsome dashboard. Now you can globally analyze arbitrary combinations of tags and geometry types over the history of OSM.
The Ohsome Dashboard lets you explore the history of OpenStreetMap by looking at arbitrary combinations of tags, OSM object types, periods of time, and areas of interest. Using a more practical description, you see how the length of all ways tagged with highway=primary has developed over the last five years and compare those numbers between Germany, France, and the UK.
Ohsome showing changes of length of primary highways on OpenStreetMap in Germany, France, and the UK.
Amazingly, these results can be produced on the fly. Sure it takes a minute or two to compute, but we’re dealing with vast amounts of data here. The data-exploration products from HeiGIT and the GIScience group at Heidelberg University have come a long way in the last ten years. OSMatrix, which we first released in 2012, was nice to look at, but it wasn’t nearly as helpful in exploring OpenStreetMap’s vast dataset. All of OSMatrix’s data was precomputed into hexagonal bins, and comparisons were only possible for a tiny area.
Django 4.1 brings two new features for handling geographic geometries; allowing developers to create valid and canonical geometries more easily:
GEOSGeometry.make_valid() returns a valid representation of a geometry. Unless the geometry is already valid, then the geometry is returned without changes. The function is very similar to ST_MakeValid in PostGIS.
GEOSGeometry.normalize() returns the canonical, or standardised, representation of a geometry. The method now accepts the optional clone keyword indicating that the normalisation must not change the geometry and instead return a new geometry object.
Additionally, support for GDAL 2.1 and PostGIS 2.4 has been removed, and the Django Admin’s OpenLayersWidget is now deprecated.
Check the release notes for all other changes in Django 4.1.
There’s not a lot of geo content in this episode. Instead, it’s a trip down Memory Lane with James and Ed reminiscing about the good old days of blogging. That time during the mid-noughties when people were writing blogs, linking and discussing each other’s work — and before everyone went to Twitter to complain. I’ve been feeling a bit nostalgic recently about that time, so this episode hit a spot.
Good content is still out there, except everything is now hidden away on Substack or Medium, and even indy sites rarely publicise RSS feeds. Flashy images, memes and hot takes create clicks, so well-written 500-word stories aren’t widely shared. It’s one of the main reasons I started this blog. I want it to be a place to share content, cool projects, and long-form writing beyond three 280-character blocks of words topped off with a meme.
Kyle Onda with a concise overview of file-based and web-API vector data formats. The post looks specifically at the applicability of sharing water data, but the conclusions can easily be transferred to other domains.
Humanitarian OpenStreetMap Team has teamed up with local organising partners to host community events in several locations around the world.
Instead of hosting a single event, this year we are investing our time and resources in supporting global, regional, and local conferences and community events around the world to bring the spirit of the Summit to thousands of new people.
I love this idea. Instead of flying-in people to one big event hosted in Europe or Northern America, surely excluding many people from attending because of travel costs and visa requirements, HOT brings the event closer to the community and the people who benefit from their work.
Twelve events are currently planned until the end of 2022: