Monday, March 25, 2013

JOSM: Zoom on slippy map

Zooming out in JOSM slippy map is not very well documented, there are currently three duplicate bug reports about it.

When you press the download button of  JOSM to download OSM, you are presented a slippy map like on the OpenStreetMap homepage. It is pretty easy to zoom in: Just double click. But how do you zoom out? If you have a mousewheel (which requires a mouse), you can use this to zoom in and out.

If you look into the source code, you find another way: Hold Alt and press up/down arrow.  Or hold shift and up/down. Or hold control and press up/down. Or press the "plus" and "minus" keys of the keypad. If you work with a laptop, you probably have to press a "Fn" or similar key before.

Tuesday, January 17, 2012

Die Münchner mit OpenStreetMap

Am Wochenende kam das neue Branchenbuch "Die Münchner" in's Haus. Ich habe nicht schlecht gestaunt: Der Kartenteil ist "(C) OpenStreetMap und Mitwirkende, CC-BY-SA"! Hier ein Ausschnitt südwestlich des Hirschgartens:


Vergleicht man den Ausschnitt mit dem Tool der Geofabrik gegen Google, scheint sich das auch zu bestätigen:
  • Der Skatepark ist in OSM eingezeichnet, in Google nicht
  • Der Parkplatz am Hirschgarten ist wie bei OSM als Schleife dargestellt
  • Die Bahngleise im Süden sind wie bei OSM abgeschnitten

OpenStreetMap ist also so vollständig, dass es von kommerziellen Verlagen gedruckt wird!

Bildquelle: Die Münchner, Branchenbuch 2012/2013, Dr. Bringmann & Gessler Verlags GmbH, Grünwald, S.12.

Monday, November 7, 2011

Exif Timeline Comparer

Idea of a tool I want:

Suppose k friends (k>1) join an event (a party, a trip, whatever) and everyone is taking photos with a digital camera. Afterwards they put all their images into a common folder. Unfortunately, the images are sorted alphabetically, so first come all photos from Bob beginning with DSC, then all from Alice matching IMG*. Wouldn't it be nice if all photos would be in chronological order?

Well, fortunately jhead has an option to rename an image after EXIF time:

  jhead "-n%Y%m%d-%H%M%S$friend" *.jpg

where $friend is the name of each friend applying this command.

The group knows that there cameras clocks are not very exact and every clock has a difference from "real time" of up to an hour. Therefore everyone takes a photograph of a (digital) wall clock, calculates the difference of wall time minus exif time and adjusts exif time with calling


jhead "-ta$WallMinusExif" *.jpg


But what are they doing if they forgot to synchronize with wall time and already shared the photos (and reset their camera's time)? That's what I want to have a tool for! What information can the friends extract from their photo streams? At least they can say for sure that some event was before another one.

Say they took a trip to Paris and first saw the Eiffel tower (shot by Alice), went on to a cafe (where Bob took photos) and then to the Seine (where Alice took photos again). Now they want to tell for all events which one was before/after which and calculate a minimum time difference out of this information.

After that, they can tell that Bob's time adjustment (relative to Alice) is between 4 and 7 minutes, and they decide on the middle: 5:30min.

Tuesday, September 27, 2011

OpenLayers with WFS and GeoServer

Today I set up a geometry table in PostGIS and published it with GeoServer as a WFS. My plan was to save features into this layer with WFST, but it worked out very strange: All attributes went through down to the database, but the geometry column was null! I suspected a problem with PostGIS, but I had no problems manually inserting geometries with ST_GeomFromText.

After analyzing the communication between OL and GeoServer with FireBug, I realized that there was something wrong with the geometry column name. I named it "geom" but OL was sending it as "the_geom", which is the default naming.

A look into OL documentation revealed me that you can give it as a parameter geometryName to OpenLayers.Protocol.WFS

        var wfs = new OpenLayers.Layer.Vector("Polygon", {
                strategies : [ new OpenLayers.Strategy.BBOX(), saveStrategy ],
                protocol : new OpenLayers.Protocol.WFS( {
                        version: "1.1.0",
                        srsName: "EPSG:4326",
                        url : "http://localhost:6060/geoserver/wfs",
                        featureType : "buildings",
                        featureNS : "http://www.bjoernhoefling.de/",
                        schema: "http://localhost:6060/geoserver/wfs/DescribeFea
tureType?version=1.1.0&typename=bjoern:buildings",
                    geometryName: 'geom'
                })
        });
        map.addLayer(wfs);