Let’s go to Bonn

It’s time for code sprint in Bonn.
I haven’t been on a code sprint before so it will be exciting.

I have 2 projects that I plan to put effort in, PostGIS and TilelessMap. I haven’t contributed to PostGIS for some years, but I like to identify myself as “core contributor” so I have to do something about it to earn the title. In PostGIS I have mainly 2 functions that I will add to the project.


ST_FilterM, which just filters the vertex points on the m-value. That is usable primary in combination with ST_SetEffectiveArea (which I think was my last contribution to PostGIS). ST_EffectiveArea is the same function behind the scenes as ST_SimplifyVW, but ST_SimplifyVW does the filtering at once. Those functions calculate an “effective area” for a vertex point by using the Visvalingam-Whyatt algorithm. A high effective area means that the vertex point has a high value for describing the geometry. A vertex point on the line between two other vertex points have 0 effective area and can be simplified away without affecting the shape of the geometry. The function ST_SetEffectiveArea saves those areas in the m-dimmension of the geometry. Then, by using the new function ST_FilterM it is possible to simplify geometries very fast without doing any calculations, by just looking at the effective area in m.

ST_ChaikinSmoothing is the next new function. The other day a colleague asked me it was possible to implement Chaikin’s algorithm for smoothing geometries in PostGIS. Chaikin’s algorithm is very simple and very smart. Take a look her. I do now have it working, but need to add documentation and look it over.


My next project is TilelessMap. It is a small map client reading data from SQLite rendering in openGL es2. I have tested it on Linux, Android and Windows (with some hassle on Win). So far it has been a project of my own, but I really hope to get more people interested to dive in. I think the concept have potential. I know of no other mobile app that handles large data sets of spatial data for offline use in a structured way. The Android app is now on F-droid.

Get it on F-Droid

I have also put together a map project for Bonn that can be found here. It is not fully styled as you can see by the screen shot at the bottom of this post, but it will help me at least to find my way (Warning, here is no road names on it).

What I hope from the code sprint about TilelessMap is to find some people interested in taking part of the project. I hope I get the chance to explain what it is and it’s potential compared to other approaches for mobile mapping. There are a lot of topics to discuss and to work on, both coding and documentation.

Hope to see you in Bonn!

Sceenshot of TilelessMap from Bonn.

Foss4G in Boston and TilelessMap

Foss4G 2017 Boston

Are you going to Boston to attend Foss4G 2017?
Lucky you!
I don’t have the possibility to go, but I have put together a map of Boston for TilelessMap.

It is maps from MassGIS packed for the TilelessMap client.

If you want to you can try it out on an Android device, or compile it on Linux (should be fairly easy to compile on other platforms too).
Then you will have a fully offline map (for avoiding roaming)

The Boston Map
You can download the map (a sqlite database with both map data and map project included) from here:
boston.tileless (approx 13 mb)

The application
For Android:
Download the apk:
and install it.

When you start the app it will point to your Download directory where your Boston map is expected to have landed when you downloaded it.

For Linux:
Go to https://github.com/TilelessMap/TilelessMap and follow compile instructions

What you will get
You should get a quite detailed, fully offline map of Boston.

It should show your pgs-position as a green dot.

You can open the Layers menu, select Foss4G in the right column of boxes and then use the info tool to get some information about the Foss4G locations on the map.

Some words about the map
As said above the maps are from MassGis.
What I have done is that I have packed them with the pg_tileless tools.
That packs the geometry data as twkb. That means it has reduced precision on the coordinates but are intact in other ways.
I have reduced precision to 1 meter exept for the buildings where I thought it makes sense to keep 1 dm precision.

tileless Boston map

Last words for now
This is not the best way to show off TilelessMap. It is not built primary for city use. That means it lacks for instance rotatable texts which is important for showing street names.
But when you are out in the forest, rotated street names isn’t first priority :-). It is not a very big thing to implement, but it is not on the top 10 features I would like to implement.

Back again

I haven’t written a blog post for a long time. But now I think the TilelessMap project starts to look so promising so I have to tell about it.
I hopefully will find time to write a series of posts about what it is and how to use it.

I have also changed host for this blog and after a long time a moved over the old posts to here. I haven’t edited all the image links so most posts are wthout images (might do that for some old PostGIS posts where I guess the images are important).

Most of the old posts about the TilelessMap project are out of date. A lot has happened since last autumn.