[OSM-dev] osm.pm perl module

Gary68 gary at gary68.de
Wed Dec 24 12:38:11 GMT 2008


hi,

to all those working on osm data with perl. i published a first version
of my osm.pm module. you can find it here:
http://wiki.openstreetmap.org/User:Gary68

it contains useful subs for handling osm, gpx and html files.
furthermore subs for calculation, for tiles and file info.

not everything is new but neatly compiled. details of subs can be found
below.

examples can also be found on the wiki page, in the code of the 2nd
generation waycheck programs.

cheers

gerhard
gary68


# binSearch ($value, @ref) > $index or -1
# closeOsmFile ()
# checkOverlap (w1xMin, w1yMin, w1xMax, w1yMax, w2xMin, w2yMin, w2xMax,
w2yMax)   > 0=no overlap, 1=overlap
# crossing (g1x1,g1y1,g1x2,g1y2,g2x1,g2y1,g2x2,g2y2) > ($sx, $sy) 
# distance (x1,y1,x2,y2) > $distance in km
# getNode () > ($gId, $gLon, $gLat, $gU, \@gTags) ; # in main @array = @
$ref
# getRelation 
# getWay () > ($gId, $gU, \@gNodes, \@gTags) ; # in main @array = @$ref
# hashValue ($lon, $lat) > $hashValue
# historyLink ($type, $key) > $htmlString
# josmLink ($lon, $lat, $span, $wayId) > $htmlString
# openOsmFile ($file) > osm file open and $line set to first node
# osbLink ($lon, $lat) > $htmlString
# osmLink ($lon, $lat) > $htmlString
# picLinkMapnik ($lon, $lat, $zoom) > $htmlString
# picLinkOsmarender ($lon, $lat, $zoom) > $htmlString
# printGPXHeader ($file)
# printGPXFoot ($file) 
# printGPXWaypoint ($file, $lon, $lat, $text) 
# printHTMLHeader ($file, $title) > print header to file
# printHTMLFoot ($file) > print foot to file
# printNodeList ($file, @list) 
# printProgress ($program, $osm, $startTime, $fullCount, $actualCount) 
# printWayList ($file, @list) 
# shortestDistance ($gx1, $gy1, $gx2, $gy2, $nx, $ny) > roughly the
distance in km
# skipNodes ()
# stringFileInfo ($file) > $string
# stringTimeSpent ($timeSpent in seconds) > $string
# tileNumber ($lat,$lon,$zoom) > ($xTile, $yTile)
#






More information about the dev mailing list