Category: Geohashing
Show routes to current geohash
The Plan
My geohashing alert2016-01-13 15:28-system at 123k.org shows the current geohash for my home graticule. The plan is to the nearest route which passes by.
Finding Something
As mentioned earlier I have all points i ever visited in a collection.
This collection holds a geospatial index. Therefore I can issue mongo queries with
the $nearSphere command. This command finds the first points from a given location.
So this just works. But what about other routes which may also be nice and just around the corner? We can select many points around the hash point and check which routes they’re on.
Category: Leaflet
Many Clickable Points on a Leaflet Map With Leaflet.glify
Problem
As seen in the post before we collected some 12.000 points which we want to display on a leaflet map. Every attempt to put that many points on one map failed. Firefox completely stopped working, chrome did a little bit better and stayed responsive, but that was not a solution at all.
Solution
I pretty much tried everything L.geoJSON layer with points and polygons.
Where polygons would have been a solution maybe, but you can not tell leaflet to just draw the corners of the polygons.
So I needed something else. In the #leaflet on freenode i was pointed to the
Leaflet.glify project.
Show routes to current geohash
The Plan
My geohashing alert2016-01-13 15:28-system at 123k.org shows the current geohash for my home graticule. The plan is to the nearest route which passes by.
Finding Something
As mentioned earlier I have all points i ever visited in a collection.
This collection holds a geospatial index. Therefore I can issue mongo queries with
the $nearSphere command. This command finds the first points from a given location.
So this just works. But what about other routes which may also be nice and just around the corner? We can select many points around the hash point and check which routes they’re on.
Category: Mongodb
Show routes to current geohash
The Plan
My geohashing alert2016-01-13 15:28-system at 123k.org shows the current geohash for my home graticule. The plan is to the nearest route which passes by.
Finding Something
As mentioned earlier I have all points i ever visited in a collection.
This collection holds a geospatial index. Therefore I can issue mongo queries with
the $nearSphere command. This command finds the first points from a given location.
So this just works. But what about other routes which may also be nice and just around the corner? We can select many points around the hash point and check which routes they’re on.
Build a Coverage Map With Mongodb
Introduction
When I started with my personal bike-track homepage at 123k.org a few years ago I decided to put all my tracks
in a MongoDB. The model I use is very simple. I have a class Route which holds meta-data about the track
and a class TrackPoint which represents a point and has a foreign key to the respective track (of course).
After some years I have 612827 track-points. So 600k entries is not ‘big-data’ exactly,
but it is too much to be displayed on a leaflet map at once. What I really wanted is a ‘Coverage View’, which just
shows me where I’ve been with the bike.