User talk:M526244/scripts/BASH/procBOM

From OpenStreetMap Wiki
Jump to navigation Jump to search

The associated BASH script (of course) requires a fairly standard GNU environment in which to execute. Otherwise I have attempted to make it as stand-alone as possible.

It was intended as an aid to performing a one-shot merge/update of Australian Bureau of Meteorology weather monitoring station location coordinates to similar NOAA data already bulk-loaded into OpenStreetMap in changeset 4762601. As such it was never intended to be a thing of beauty nor particularly efficient. You've been warned.

M526244 00:30, 20 June 2010 (UTC)

Additional: I found making the listing look "right" in the wiki involved slightly modifying the script itself. As the script performs some crude XML manipulation there was an unfortunate interaction between wiki/browser/data strings which tended to destroy "&"s, "<"s, ">"s etc.

Also the original script had embedded carriage returns in several XML-related constants, which in hindsight do not appear to be relevant to its intended purpose, to produce output acceptable to JOSM version 3329 (which fortunately is fairly forgiving!)

M526244 01:01, 20 June 2010 (UTC)

Another quirk: To my surprise (I really shouldn't be), XAPI cannot cope with the quaint old colonial artefact convention of locations with longitude greater than 180°East signifying locations but which are still west of the international date line (e.g. Tonga or Papeete). So another script tweak is in order, if only for completeness.

M526244 08:52, 20 June 2010 (UTC)