Einfache Kommandozeilenwerkzeuge für OpenStreetMap

Download: osmtools.tar.gz

lonlat2tile

Get the tilename of a geographic datum:

lonlat2tile lon lat zoom

Example:

lonlat2tile 12.9 50.8 12
==>
12_2194_1374

tile2lonlat

Computes the geographic coordinates of a tile:

tile2lonlat zoom xNumber yNumber

Example:

tile2lonlat 12 2194 1374
==>
12.832031,50.792047,12.919922,50.847573

region2tiles

Determines all needed tiles to cover a given region for the requested zoom level:

region2tiles lon0 lat0 lon1 lat1 zoom

Example:

region2tiles 12.5 50.5 13.0 51.0 10
==>
10_547_345
10_548_345
10_547_344
10_548_344
10_547_343
10_548_343
10_547_342
10_548_342

geodist

Distance between two geographic coordinates in kilometers with simple spheric formula and WGS84 ellipsoid formula:

geodist lon0 lat0 lon1 lat1

Example:

geodist 12.5 50.5 13.0 51.0
==>
Sphere: 65.781 WGS84: 65.871

tilesize

Size of a given tile in kilometers with simple spheric formula and WGS84 ellipsoid formula:

tilesize zoom xNumber yNumber

Example:

tilesize 10 548 343
==>
Lower edge: Sphere: 24.737 WGS84: 24.818
Upper edge: Sphere: 24.620 WGS84: 24.701
Vertical:   Sphere: 24.678 WGS84: 24.694
Diagonal:   Sphere: 34.900 WGS84: 34.969

Alle hier bereitgestellten Programme unterliegen der BSD-Lizenz.