Index: /misc/tools/xyz2kmz/Makefile
===================================================================
--- /misc/tools/xyz2kmz/Makefile	(revision 7757)
+++ /misc/tools/xyz2kmz/Makefile	(revision 7757)
@@ -0,0 +1,9 @@
+#
+# Makefile to run the xyz2kmz program.
+#
+
+all:
+	python xyz2kmz.py RP100_coast_wh_latlon.csv
+
+clean:
+	rm -f *.kml *.kmz
Index: /misc/tools/xyz2kmz/README.txt
===================================================================
--- /misc/tools/xyz2kmz/README.txt	(revision 7757)
+++ /misc/tools/xyz2kmz/README.txt	(revision 7757)
@@ -0,0 +1,27 @@
+This is a program to convert a CSV file of X, Y and Z values into a
+KMZ file that contains 'extruded' bars on each X,Y point, with height
+and colour of the bar coded to Z.
+
+Usage: xyz2kmz [<options>] <xyz_file>
+
+This will create file 'xyz_file.kmz' in the current directory.
+
+The options are:
+    -a          run generated file through Google Earth
+                (default is not to)
+    -f          generate formatted KML files
+                (default is not formatted, ie, compact)
+    -k          create a KML file instead of a KMZ
+                (default is KMZ data)
+    -l <args>   set the 'look at' point
+                   <args> is 'lon,lat,alt,head,tilt'
+                where lon and lat are in decimal degrees
+                      alt is altitude in meters (above MSL)
+                      head is heading in decimal degrees
+                      tilt is in decimal degrees (0 down, 180 up)
+                eg: -l100.0,-35.6,1000,217,30
+                (default is a programmatic guess)
+    -s <scale>  sets scale of vertical extrusion
+                (default is 50)
+    -d <delta>  sets lon/lat 'width' of bars (degrees)
+                (default is 0.0001)
Index: /misc/tools/xyz2kmz/RP100_coast_wh_latlon.csv
===================================================================
--- /misc/tools/xyz2kmz/RP100_coast_wh_latlon.csv	(revision 7757)
+++ /misc/tools/xyz2kmz/RP100_coast_wh_latlon.csv	(revision 7757)
@@ -0,0 +1,1973 @@
+150.17736150,-35.70303612,1.486640
+150.17755630,-35.70295114,1.257000
+150.17775109,-35.70286617,1.115290
+150.17794588,-35.70278119,1.099140
+150.17814068,-35.70269621,1.099140
+150.17833547,-35.70261123,1.085440
+150.17853026,-35.70252625,1.150390
+150.17872505,-35.70244127,1.058660
+150.17891984,-35.70235629,1.147220
+150.17911463,-35.70227131,1.068800
+150.17930942,-35.70218633,0.736073
+150.17950421,-35.70210135,0.537906
+150.17969900,-35.70201637,0.568171
+150.17989379,-35.70193139,0.804523
+150.17999689,-35.70208724,0.833678
+150.18011992,-35.70223679,0.369887
+150.18022049,-35.70239715,0.583955
+150.18031989,-35.70255806,0.404426
+150.18042572,-35.70271616,0.888730
+150.18054550,-35.70286751,0.597811
+150.18067265,-35.70301482,1.003000
+150.18080595,-35.70315848,1.603000
+150.18094392,-35.70329920,1.308980
+150.18108237,-35.70343960,1.584000
+150.18123845,-35.70356661,1.139180
+150.18140273,-35.70368671,0.955500
+150.18155288,-35.70381797,0.963768
+150.18173341,-35.70392024,1.090030
+150.18184271,-35.70407420,1.224570
+150.18189520,-35.70424909,1.208680
+150.18196892,-35.70441866,1.222260
+150.18207953,-35.70457429,1.224690
+150.18223253,-35.70470358,1.236910
+150.18243499,-35.70476987,1.237330
+150.18264854,-35.70481547,1.228370
+150.18286182,-35.70486219,1.219250
+150.18307915,-35.70489271,1.215350
+150.18329513,-35.70485982,1.211590
+150.18348090,-35.70476374,1.214890
+150.18365246,-35.70465026,1.211600
+150.18382405,-35.70453691,1.219140
+150.18400765,-35.70443704,1.221040
+150.18421473,-35.70437634,1.214590
+150.18443227,-35.70434528,1.204600
+150.18464817,-35.70430741,1.190090
+150.18486353,-35.70426746,1.192430
+150.18508119,-35.70423669,1.199450
+150.18530095,-35.70423276,1.193880
+150.18551227,-35.70426440,1.164560
+150.18571578,-35.70419609,1.132580
+150.18593477,-35.70417315,1.143180
+150.18615490,-35.70415830,1.149250
+150.18637564,-35.70415467,1.150320
+150.18659547,-35.70417171,1.162670
+150.18681390,-35.70419840,1.171220
+150.18703275,-35.70422197,1.169440
+150.18725358,-35.70422551,1.175180
+150.18747394,-35.70421490,1.187570
+150.18769368,-35.70422002,1.196260
+150.18790897,-35.70426028,1.199020
+150.18812652,-35.70429153,1.175630
+150.18834071,-35.70433021,1.127230
+150.18855204,-35.70438177,1.144680
+150.18877160,-35.70439896,1.127710
+150.18899170,-35.70441400,1.121490
+150.18921100,-35.70443539,1.071980
+150.18942837,-35.70446729,1.047890
+150.18964364,-35.70450769,1.019840
+150.18985741,-35.70455305,0.989254
+150.19006925,-35.70460410,1.035440
+150.19028235,-35.70465117,1.044550
+150.19050168,-35.70467095,1.070040
+150.19072208,-35.70468299,1.099210
+150.19094080,-35.70467061,1.128460
+150.19113462,-35.70458855,1.146690
+150.19133278,-35.70458690,1.146690
+150.19150861,-35.70469499,1.149590
+150.19160526,-35.70485413,1.142250
+150.19163839,-35.70503204,1.104820
+150.19164614,-35.70521106,1.101700
+150.19160642,-35.70538809,1.048020
+150.19161261,-35.70556643,0.928305
+150.19176411,-35.70564761,0.948082
+150.19186887,-35.70575206,0.834893
+150.19204696,-35.70566040,1.675130
+150.19218822,-35.70577523,0.771949
+150.19229471,-35.70563163,1.041320
+150.19240785,-35.70549374,1.849140
+150.19257745,-35.70539922,0.939321
+150.19277248,-35.70540524,0.832099
+150.19297477,-35.70539792,0.880457
+150.19313622,-35.70529880,0.897609
+150.19330130,-35.70517915,1.000010
+150.19347491,-35.70506903,0.957713
+150.19359953,-35.70493186,0.957851
+150.19369957,-35.70477157,0.906891
+150.19383648,-35.70463071,0.982117
+150.19398234,-35.70449557,0.982117
+150.19411135,-35.70434934,1.000050
+150.19427547,-35.70423004,1.033150
+150.19443632,-35.70410841,0.994469
+150.19454357,-35.70395107,0.912369
+150.19469260,-35.70381886,0.912369
+150.19484694,-35.70369000,0.913930
+150.19499917,-35.70355943,0.907289
+150.19515140,-35.70342885,1.183200
+150.19532020,-35.70331304,1.088430
+150.19549489,-35.70320279,0.826789
+150.19565430,-35.70307990,0.968174
+150.19579041,-35.70293990,0.968174
+150.19595891,-35.70282340,1.000230
+150.19612518,-35.70270477,0.911451
+150.19629401,-35.70258859,0.890659
+150.19647026,-35.70248001,1.315030
+150.19665395,-35.70237993,1.455210
+150.19683491,-35.70227665,0.953823
+150.19701367,-35.70217079,0.846570
+150.19719374,-35.70206645,0.898596
+150.19737682,-35.70196563,1.005910
+150.19756275,-35.70186837,1.411000
+150.19775431,-35.70177871,1.206300
+150.19794874,-35.70169318,1.507630
+150.19814150,-35.70160521,0.960785
+150.19833549,-35.70151918,1.323000
+150.19854145,-35.70145440,1.094940
+150.19875278,-35.70140195,1.094940
+150.19896646,-35.70135663,1.774890
+150.19918509,-35.70133160,1.564650
+150.19940572,-35.70132474,1.299780
+150.19962652,-35.70132302,1.094690
+150.19983925,-35.70135743,1.061750
+150.19999036,-35.70148243,0.837675
+150.20003558,-35.70164656,0.597911
+150.20007886,-35.70182134,1.859470
+150.20020524,-35.70195436,1.152120
+150.20024064,-35.70212128,0.624340
+150.20037689,-35.70224674,1.565900
+150.20055850,-35.70223545,3.303210
+150.20065982,-35.70227093,3.303210
+150.20070071,-35.70234772,0.828234
+150.20083247,-35.70229759,3.696100
+150.20103836,-35.70228472,3.129480
+150.20115452,-35.70213665,5.121530
+150.20120191,-35.70196165,1.530000
+150.20125189,-35.70178697,4.078940
+150.20128498,-35.70160892,3.472210
+150.20126822,-35.70143205,2.432940
+150.20133906,-35.70126165,1.365890
+150.20144625,-35.70110734,0.999279
+150.20161978,-35.70099752,1.313500
+150.20182364,-35.70092835,1.082670
+150.20203390,-35.70087337,1.384280
+150.20224901,-35.70083271,0.885415
+150.20246810,-35.70081113,1.070180
+150.20268891,-35.70080858,1.063330
+150.20290978,-35.70081149,1.093390
+150.20313036,-35.70082099,1.099090
+150.20335064,-35.70083446,0.956963
+150.20357055,-35.70085133,0.924587
+150.20378879,-35.70087889,1.141350
+150.20400416,-35.70091884,1.145850
+150.20421670,-35.70096780,0.970874
+150.20442540,-35.70102679,0.991442
+150.20462822,-35.70109804,1.112490
+150.20482920,-35.70117280,1.013890
+150.20503299,-35.70124235,0.951387
+150.20523408,-35.70131681,1.309160
+150.20542711,-35.70140438,0.892503
+150.20561733,-35.70149597,1.040930
+150.20581908,-35.70156587,1.056010
+150.20603692,-35.70159553,1.068520
+150.20625689,-35.70159891,1.091210
+150.20643067,-35.70163643,1.194140
+150.20664799,-35.70166597,1.232320
+150.20686233,-35.70170925,1.211690
+150.20708200,-35.70172686,1.228760
+150.20730277,-35.70172905,1.116060
+150.20752003,-35.70169953,1.151540
+150.20772556,-35.70163378,1.181750
+150.20792418,-35.70155512,1.285800
+150.20811996,-35.70147171,1.089900
+150.20831896,-35.70139350,1.267550
+150.20850727,-35.70129958,1.143420
+150.20867914,-35.70118670,1.267490
+150.20882028,-35.70104944,1.241140
+150.20889111,-35.70087971,1.241140
+150.20887790,-35.70070054,1.212920
+150.20886660,-35.70052083,1.227000
+150.20887433,-35.70034078,1.249140
+150.20888922,-35.70016102,1.247110
+150.20891234,-35.69998184,1.250830
+150.20893935,-35.69980301,1.237000
+150.20896636,-35.69962417,1.314380
+150.20892910,-35.69944711,1.393270
+150.20892032,-35.69926779,1.401050
+150.20892331,-35.69908762,1.498640
+150.20892631,-35.69890745,1.388410
+150.20889878,-35.69873135,1.422360
+150.20883719,-35.69855923,1.188780
+150.20881537,-35.69837993,1.700570
+150.20884450,-35.69820573,1.570660
+150.20891891,-35.69803608,1.484630
+150.20896265,-35.69785957,1.427970
+150.20901417,-35.69768475,1.272710
+150.20908597,-35.69751435,1.293870
+150.20915470,-35.69734312,1.322490
+150.20921604,-35.69717003,1.292250
+150.20922736,-35.69699960,1.302280
+150.20907982,-35.69686753,1.413220
+150.20889739,-35.69676614,1.413220
+150.20874420,-35.69663731,1.419930
+150.20866752,-35.69646949,1.431630
+150.20870171,-35.69621488,1.332000
+150.20891636,-35.69624476,1.333000
+150.20912920,-35.69620464,1.490000
+150.20933166,-35.69626961,1.315050
+150.20942304,-35.69620141,1.315050
+150.20940634,-35.69602234,0.865746
+150.20933122,-35.69585396,1.054000
+150.20921404,-35.69570146,1.357000
+150.20908103,-35.69555765,1.374250
+150.20893348,-35.69542367,1.222000
+150.20879631,-35.69528641,1.051000
+150.20870747,-35.69512144,0.930900
+150.20861458,-35.69495797,0.807300
+150.20851697,-35.69479633,0.733400
+150.20842359,-35.69463307,0.769100
+150.20834668,-35.69446427,0.729900
+150.20828839,-35.69429053,0.826400
+150.20824101,-35.69411454,0.853000
+150.20819413,-35.69393846,0.958100
+150.20815589,-35.69376103,1.169000
+150.20811631,-35.69358387,1.001000
+150.20804264,-35.69341465,1.224000
+150.20792001,-35.69326512,1.244000
+150.20777134,-35.69313206,1.241000
+150.20760498,-35.69301372,0.863500
+150.20742076,-35.69291482,1.003000
+150.20722387,-35.69283323,1.104000
+150.20702753,-35.69275090,1.104000
+150.20702631,-35.69251482,1.025000
+150.20722214,-35.69244381,1.025000
+150.20721075,-35.69226389,0.855500
+150.20718794,-35.69208470,0.936900
+150.20715309,-35.69190680,1.082000
+150.20710877,-35.69173030,1.280000
+150.20705181,-35.69155627,1.530000
+150.20696779,-35.69139003,1.679000
+150.20685143,-35.69123716,1.137000
+150.20672566,-35.69108906,0.913700
+150.20662062,-35.69093093,1.554000
+150.20654377,-35.69076208,1.294000
+150.20648323,-35.69058887,0.918600
+150.20643822,-35.69041251,0.824400
+150.20640199,-35.69023477,0.954700
+150.20637586,-35.69005591,0.943500
+150.20637822,-35.68987618,1.073000
+150.20642754,-35.68970111,1.223000
+150.20651932,-35.68953740,0.720500
+150.20663793,-35.68938557,0.772500
+150.20677861,-35.68924692,0.769400
+150.20693928,-35.68912343,0.817200
+150.20711886,-35.68901877,0.779000
+150.20730833,-35.68892617,0.715100
+150.20750058,-35.68883761,0.701900
+150.20769438,-35.68875170,0.701400
+150.20783065,-35.68861244,0.764500
+150.20786906,-35.68843899,0.953400
+150.20783985,-35.68826059,0.989500
+150.20777715,-35.68808795,1.281000
+150.20771960,-35.68791419,1.442000
+150.20768561,-35.68773619,1.273000
+150.20765624,-35.68755761,1.130000
+150.20763171,-35.68737854,0.969100
+150.20760444,-35.68719980,1.086000
+150.20755060,-35.68702537,1.195000
+150.20746406,-35.68685972,1.196000
+150.20737278,-35.68669567,1.053000
+150.20729145,-35.68652815,1.154000
+150.20721200,-35.68636002,1.309000
+150.20713313,-35.68619172,1.254000
+150.20705426,-35.68602341,1.074000
+150.20697596,-35.68585494,1.106000
+150.20691582,-35.68568169,1.075000
+150.20688464,-35.68550345,0.998200
+150.20718062,-35.68547320,1.302000
+150.20732341,-35.68561063,1.416000
+150.20749476,-35.68572184,1.310000
+150.20765124,-35.68584858,1.310000
+150.20776089,-35.68600302,1.262000
+150.20776748,-35.68618246,1.042000
+150.20787718,-35.68633578,1.341000
+150.20807800,-35.68637761,1.103000
+150.20829456,-35.68638385,0.997800
+150.20848914,-35.68646708,1.191000
+150.20863772,-35.68659940,1.050000
+150.20876738,-35.68674527,1.163000
+150.20888658,-35.68689682,1.107000
+150.20898840,-35.68705660,1.430000
+150.20907044,-35.68722381,1.862000
+150.20913325,-35.68739647,1.509000
+150.20917259,-35.68757367,1.045000
+150.20918719,-35.68775330,0.934900
+150.20916177,-35.68793180,0.914700
+150.20909613,-35.68810372,1.021000
+150.20900804,-35.68826883,0.959600
+150.20892220,-35.68843477,0.717000
+150.20885486,-35.68860610,1.062000
+150.20878476,-35.68877691,0.744300
+150.20869863,-35.68894259,0.877600
+150.20856917,-35.68908806,0.966300
+150.20841373,-35.68921597,0.883700
+150.20830217,-35.68936659,0.874000
+150.20823445,-35.68953759,0.868900
+150.20822642,-35.68971766,0.813900
+150.20828032,-35.68988660,0.750700
+150.20838034,-35.69004725,0.695800
+150.20848036,-35.69020790,0.798300
+150.20856563,-35.69037328,0.797400
+150.20857966,-35.69055194,0.888500
+150.20854040,-35.69072721,0.855200
+150.20841946,-35.69087532,0.776600
+150.20823652,-35.69095712,1.263000
+150.20803360,-35.69090074,1.005000
+150.20784783,-35.69096407,1.078000
+150.20779085,-35.69113440,1.071000
+150.20775385,-35.69131192,1.176000
+150.20775043,-35.69149209,1.124000
+150.20774701,-35.69167225,1.003000
+150.20775054,-35.69185179,0.925000
+150.20780184,-35.69202705,0.884100
+150.20786703,-35.69219906,0.870800
+150.20796663,-35.69235905,0.988800
+150.20807776,-35.69251476,0.856200
+150.20818890,-35.69267048,0.867800
+150.20834513,-35.69278979,0.942500
+150.20855944,-35.69282268,0.942500
+150.20877200,-35.69286001,0.983100
+150.20897505,-35.69293094,1.002000
+150.20917809,-35.69300188,1.046000
+150.20938113,-35.69307282,1.164000
+150.20959204,-35.69311874,1.315000
+150.20981187,-35.69313630,1.076000
+150.21002422,-35.69318513,1.337000
+150.21023240,-35.69324384,1.168000
+150.21043078,-35.69332308,0.855400
+150.21061131,-35.69342352,0.486500
+150.21076944,-35.69354869,0.984700
+150.21086343,-35.69370819,0.984700
+150.21088191,-35.69388663,0.889100
+150.21087250,-35.69406665,1.015000
+150.21083160,-35.69424196,1.168000
+150.21074562,-35.69440734,0.642300
+150.21064434,-35.69456747,0.600900
+150.21054307,-35.69472760,0.219891
+150.21047131,-35.69489352,0.867203
+150.21048937,-35.69507163,0.405653
+150.21055293,-35.69524419,0.252260
+150.21061649,-35.69541676,0.552029
+150.21066343,-35.69559218,1.009600
+150.21069061,-35.69577100,0.975300
+150.21071778,-35.69594982,0.879234
+150.21068762,-35.69612606,0.851346
+150.21062444,-35.69629856,1.215290
+150.21053356,-35.69646220,1.421700
+150.21040731,-35.69660811,1.244510
+150.21026359,-35.69674422,1.244510
+150.21014758,-35.69689756,1.240110
+150.21005575,-35.69706078,1.278360
+150.20997460,-35.69722836,1.287880
+150.20995461,-35.69740767,1.287110
+150.20993580,-35.69758720,1.294090
+150.20991700,-35.69776674,1.288450
+150.20988485,-35.69794462,1.321180
+150.20983409,-35.69811995,1.325540
+150.20978268,-35.69829516,1.344630
+150.20974209,-35.69847225,1.357800
+150.20970928,-35.69865043,1.341480
+150.20968202,-35.69882923,1.334750
+150.20965363,-35.69900790,1.334570
+150.20969375,-35.69918243,1.342060
+150.20982842,-35.69932379,1.344330
+150.20992792,-35.69948374,1.363860
+150.20993030,-35.69965967,1.324320
+150.20993170,-35.69983526,1.335150
+150.21003238,-35.69999558,1.335150
+150.21012232,-35.70016011,1.261440
+150.21019942,-35.70032895,1.235780
+150.21028037,-35.70049659,1.215290
+150.21038326,-35.70065413,1.337950
+150.21018254,-35.70063786,1.186470
+150.21014142,-35.70081211,1.037970
+150.21009776,-35.70098868,1.044100
+150.21009108,-35.70116828,1.413310
+150.21013576,-35.70134417,1.198000
+150.21021361,-35.70151279,1.228110
+150.21026347,-35.70168730,1.202400
+150.21029003,-35.70186614,1.158950
+150.21031618,-35.70204397,1.201050
+150.21035118,-35.70218063,1.254720
+150.21027490,-35.70234807,1.254720
+150.21035378,-35.70251227,1.407070
+150.21029493,-35.70267937,1.290270
+150.21017992,-35.70283311,1.150000
+150.21009310,-35.70299870,1.342610
+150.21001214,-35.70316635,1.251740
+150.20993829,-35.70333612,0.927347
+150.20988188,-35.70351026,0.574881
+150.20982602,-35.70368456,0.984642
+150.20977079,-35.70385899,0.693837
+150.20973021,-35.70403596,1.133240
+150.20971453,-35.70421565,1.514220
+150.20965992,-35.70438981,0.644770
+150.20962162,-35.70456609,1.204790
+150.20961174,-35.70474584,1.952000
+150.20957531,-35.70492333,1.112230
+150.20960268,-35.70510136,0.766920
+150.20967657,-35.70527053,2.364940
+150.20961049,-35.70543015,1.194790
+150.20960954,-35.70560461,0.927859
+150.20964287,-35.70578208,0.270330
+150.20964956,-35.70596216,3.364870
+150.20966043,-35.70614180,4.083880
+150.20958310,-35.70630953,1.124180
+150.20961708,-35.70647859,1.124180
+150.20951230,-35.70663489,0.677356
+150.20950026,-35.70681344,0.788668
+150.20949620,-35.70699296,0.564628
+150.20947578,-35.70717227,0.550054
+150.20945781,-35.70735181,0.749092
+150.20944936,-35.70753183,0.762932
+150.20946263,-35.70771120,1.139700
+150.20949373,-35.70788891,2.138360
+150.20946778,-35.70806744,4.418770
+150.20939715,-35.70823790,6.666000
+150.20933661,-35.70841094,1.222850
+150.20923585,-35.70856897,0.455833
+150.20914066,-35.70873031,2.043910
+150.20917818,-35.70890630,4.472520
+150.20921670,-35.70907822,7.603000
+150.20908088,-35.70921871,1.434680
+150.20903713,-35.70939402,-1.930970
+150.20909666,-35.70956558,8.286000
+150.20911233,-35.70974428,8.164000
+150.20909920,-35.70991882,3.411260
+150.20910094,-35.71008714,5.665000
+150.20908823,-35.71023958,5.665000
+150.20903518,-35.71039914,-0.807579
+150.20901353,-35.71057666,2.469410
+150.20890458,-35.71073322,3.477360
+150.20889459,-35.71089725,4.296000
+150.20892813,-35.71107347,5.030000
+150.20904639,-35.71122492,4.311000
+150.20912598,-35.71139280,3.418000
+150.20923767,-35.71154545,2.112430
+150.20944081,-35.71156953,2.112430
+150.20965695,-35.71153607,2.018270
+150.20985559,-35.71145828,6.099000
+150.21000473,-35.71132681,6.107000
+150.21018054,-35.71123610,0.797285
+150.21039977,-35.71124924,-0.554350
+150.21058651,-35.71134170,2.704750
+150.21079271,-35.71131165,2.171070
+150.21100036,-35.71126002,2.171070
+150.21122036,-35.71125105,5.087530
+150.21144037,-35.71124125,3.532210
+150.21146498,-35.71137210,4.561310
+150.21131678,-35.71150513,-1.454030
+150.21134023,-35.71161696,-0.140813
+150.21148846,-35.71149050,0.500988
+150.21163524,-35.71135589,4.561310
+150.21181294,-35.71125259,9.251000
+150.21198066,-35.71124678,2.260370
+150.21187328,-35.71139984,3.625940
+150.21174321,-35.71154497,3.625940
+150.21166260,-35.71169324,-0.047983
+150.21181185,-35.71167853,-0.047983
+150.21196129,-35.71155707,0.419117
+150.21212941,-35.71166319,0.609804
+150.21215761,-35.71180195,0.649893
+150.21235003,-35.71174278,0.640415
+150.21253186,-35.71165556,0.640415
+150.21261513,-35.71148883,0.375965
+150.21267900,-35.71131637,-0.135620
+150.21273002,-35.71114108,3.371030
+150.21277074,-35.71096402,12.370000
+150.21277883,-35.71078453,11.860000
+150.21276302,-35.71060486,6.508000
+150.21278852,-35.71042645,11.370000
+150.21282349,-35.71024873,5.032330
+150.21281454,-35.71006884,25.389999
+150.21278059,-35.70989092,20.469999
+150.21269727,-35.70972455,16.700001
+150.21269764,-35.70954603,13.720000
+150.21270712,-35.70936680,8.778000
+150.21267299,-35.70918888,6.129000
+150.21270159,-35.70901190,4.852000
+150.21280680,-35.70885492,11.070000
+150.21297598,-35.70873962,2.291960
+150.21315204,-35.70863077,0.783144
+150.21334389,-35.70854330,1.447000
+150.21354848,-35.70847541,1.239450
+150.21374271,-35.70838992,1.239450
+150.21392886,-35.70829291,1.337000
+150.21411353,-35.70819401,1.439000
+150.21430151,-35.70809937,1.267000
+150.21449246,-35.70800875,1.291140
+150.21468401,-35.70791898,1.108890
+150.21487556,-35.70782921,1.568000
+150.21506710,-35.70773943,1.251980
+150.21525865,-35.70764965,1.393000
+150.21545019,-35.70755987,1.250380
+150.21564104,-35.70746910,1.224620
+150.21583129,-35.70737752,1.321510
+150.21602118,-35.70728542,1.199980
+150.21621105,-35.70719332,1.199980
+150.21639964,-35.70709947,1.323000
+150.21658811,-35.70700547,1.085430
+150.21678650,-35.70692680,1.245000
+150.21698809,-35.70685309,0.943623
+150.21718968,-35.70677938,1.048600
+150.21738437,-35.70669553,0.804304
+150.21756770,-35.70659499,1.278640
+150.21775104,-35.70649446,0.886736
+150.21793438,-35.70639393,0.966339
+150.21811771,-35.70629339,1.263020
+150.21830105,-35.70619286,0.978715
+150.21848438,-35.70609233,1.581000
+150.21867047,-35.70599530,1.197330
+150.21885936,-35.70590186,1.279450
+150.21904825,-35.70580842,0.944503
+150.21923714,-35.70571498,1.158580
+150.21942627,-35.70562187,1.359000
+150.21962063,-35.70553623,0.938470
+150.21981501,-35.70545059,1.573000
+150.22000938,-35.70536496,1.287000
+150.22021215,-35.70529391,1.021450
+150.22041707,-35.70522659,1.194010
+150.22061524,-35.70514811,1.016070
+150.22080561,-35.70505668,1.142140
+150.22099677,-35.70496653,0.945802
+150.22119891,-35.70489382,1.103340
+150.22140104,-35.70482111,1.103340
+150.22160317,-35.70474840,1.386740
+150.22179980,-35.70466636,1.222000
+150.22199565,-35.70458301,1.287540
+150.22219151,-35.70449965,1.044400
+150.22238736,-35.70441630,1.491000
+150.22258322,-35.70433294,1.126020
+150.22278295,-35.70425681,1.423000
+150.22299085,-35.70419587,1.158860
+150.22319874,-35.70413493,0.949663
+150.22340219,-35.70406547,1.548000
+150.22360023,-35.70398563,1.262250
+150.22380889,-35.70392719,0.890574
+150.22401928,-35.70387223,1.281800
+150.22422442,-35.70380671,0.934116
+150.22442236,-35.70372670,1.228280
+150.22462351,-35.70365252,1.039870
+150.22482825,-35.70358485,1.319000
+150.22503300,-35.70351719,0.960250
+150.22523788,-35.70344983,0.689530
+150.22544598,-35.70338936,1.227140
+150.22565408,-35.70332890,1.030000
+150.22586423,-35.70327387,1.030000
+150.22607820,-35.70322906,1.318000
+150.22629217,-35.70318425,0.962866
+150.22650614,-35.70313944,0.842973
+150.22672011,-35.70309463,0.813054
+150.22693408,-35.70304982,1.023740
+150.22714805,-35.70300502,0.800354
+150.22736202,-35.70296020,0.770333
+150.22756849,-35.70289649,0.848107
+150.22777406,-35.70283053,0.749801
+150.22797963,-35.70276456,0.753671
+150.22818781,-35.70270487,0.886041
+150.22840030,-35.70265560,0.771460
+150.22861279,-35.70260633,0.716799
+150.22882568,-35.70255859,1.150370
+150.22904416,-35.70253194,1.120000
+150.22926493,-35.70252945,0.910142
+150.22948584,-35.70252843,0.815582
+150.22970611,-35.70254179,0.790558
+150.22992637,-35.70255562,0.810097
+150.23014663,-35.70256945,0.948643
+150.23036676,-35.70258431,0.961432
+150.23058612,-35.70260564,0.934087
+150.23080548,-35.70262696,0.827533
+150.23102483,-35.70264829,0.832787
+150.23124419,-35.70266961,0.831030
+150.23146355,-35.70269093,0.811660
+150.23168291,-35.70271226,0.831476
+150.23190226,-35.70273358,0.812811
+150.23211964,-35.70276553,0.865715
+150.23233683,-35.70279846,0.916130
+150.23255424,-35.70282955,1.034270
+150.23277510,-35.70283341,1.040030
+150.23299587,-35.70283958,0.998197
+150.23321658,-35.70284742,0.919987
+150.23343711,-35.70285757,0.870280
+150.23365618,-35.70288031,1.119570
+150.23387306,-35.70291434,0.822121
+150.23408678,-35.70295980,0.793037
+150.23429575,-35.70301806,0.887110
+150.23449828,-35.70308982,0.900240
+150.23469167,-35.70317665,0.934012
+150.23486892,-35.70328380,0.834897
+150.23502393,-35.70341176,1.044700
+150.23516104,-35.70355299,0.990325
+150.23528870,-35.70370003,0.932730
+150.23535924,-35.70386816,0.885209
+150.23556932,-35.70390437,0.885209
+150.23578980,-35.70391515,0.627914
+150.23601052,-35.70391819,0.657181
+150.23622834,-35.70391011,0.569933
+150.23642605,-35.70398758,0.404397
+150.23663954,-35.70402703,0.750331
+150.23679675,-35.70413574,0.760394
+150.23696565,-35.70424184,1.062870
+150.23712548,-35.70436569,1.068400
+150.23731474,-35.70445537,0.941480
+150.23746761,-35.70458371,0.917542
+150.23757003,-35.70474277,0.948656
+150.23774244,-35.70483359,0.970655
+150.23781400,-35.70500325,-0.667644
+150.23786948,-35.70517452,1.530000
+150.23789940,-35.70534464,0.866245
+150.23786440,-35.70552173,0.724195
+150.23791896,-35.70569530,0.699460
+150.23789519,-35.70587248,0.790735
+150.23782122,-35.70604210,0.790735
+150.23781787,-35.70621881,0.874950
+150.23787010,-35.70639366,0.203801
+150.23782298,-35.70656560,0.862794
+150.23791595,-35.70660127,0.912362
+150.23795479,-35.70670253,1.053100
+150.23816547,-35.70675056,2.040560
+150.23838187,-35.70678680,0.663683
+150.23859281,-35.70683945,0.475291
+150.23878256,-35.70693062,0.475291
+150.23891311,-35.70707473,0.676511
+150.23907174,-35.70719784,0.750386
+150.23923452,-35.70731805,0.982230
+150.23941104,-35.70742610,0.753590
+150.23960940,-35.70750288,0.939677
+150.23980368,-35.70758783,0.938601
+150.23999994,-35.70766946,0.309159
+150.24015211,-35.70779674,0.685704
+150.24031738,-35.70791522,0.745291
+150.24051067,-35.70800216,0.745291
+150.24071417,-35.70807198,0.734545
+150.24091496,-35.70814617,0.734554
+150.24111948,-35.70821375,0.746591
+150.24127987,-35.70833055,0.632486
+150.24134471,-35.70850034,0.946196
+150.24150758,-35.70855734,0.661561
+150.24149529,-35.70871456,0.868450
+150.24152805,-35.70888867,0.159967
+150.24153057,-35.70906854,-0.105297
+150.24151977,-35.70924848,0.668456
+150.24154526,-35.70941191,0.511902
+150.24155907,-35.70957626,0.628550
+150.24177190,-35.70961182,1.208170
+150.24196995,-35.70959468,0.216254
+150.24214927,-35.70949537,2.318030
+150.24236289,-35.70952984,0.079231
+150.24258065,-35.70951779,0.301310
+150.24278702,-35.70945956,0.447712
+150.24299475,-35.70951576,0.414162
+150.24320702,-35.70950319,0.246830
+150.24341543,-35.70944519,0.471799
+150.24363554,-35.70944610,0.612264
+150.24385637,-35.70945125,0.611238
+150.24407714,-35.70945805,0.516444
+150.24429773,-35.70946802,0.441013
+150.24451832,-35.70947800,0.473543
+150.24473879,-35.70948945,0.479311
+150.24495837,-35.70950909,0.423585
+150.24517686,-35.70953580,0.401764
+150.24539535,-35.70956252,0.321991
+150.24561348,-35.70959108,0.621869
+150.24583111,-35.70962210,0.973526
+150.24604760,-35.70965803,1.114480
+150.24626369,-35.70969554,0.568007
+150.24648071,-35.70972927,0.588020
+150.24669756,-35.70976368,0.550562
+150.24691131,-35.70980896,1.010780
+150.24712147,-35.70986445,1.160330
+150.24733010,-35.70992371,0.661092
+150.24753727,-35.70998627,0.587339
+150.24774279,-35.71005237,1.525000
+150.24794621,-35.71012265,0.472799
+150.24814824,-35.71019556,0.259407
+150.24834855,-35.71027155,0.359021
+150.24854633,-35.71035182,0.383337
+150.24873887,-35.71044007,1.138910
+150.24892289,-35.71053978,0.659368
+150.24911062,-35.71063468,0.670620
+150.24930443,-35.71072118,0.600453
+150.24949422,-35.71081320,0.621170
+150.24967374,-35.71091818,0.644319
+150.24984706,-35.71102990,0.730962
+150.25001447,-35.71114748,0.779900
+150.25018438,-35.71126256,0.429732
+150.25035850,-35.71137335,1.107830
+150.25050817,-35.71150550,0.612439
+150.25064428,-35.71164744,0.744320
+150.25078199,-35.71178834,0.620015
+150.25091122,-35.71193445,0.620015
+150.25102915,-35.71208665,1.171130
+150.25110182,-35.71225624,0.649400
+150.25114483,-35.71243295,0.661549
+150.25118287,-35.71260994,0.430922
+150.25112148,-35.71278075,0.610463
+150.25119487,-35.71294122,0.273015
+150.25122799,-35.71311926,0.680575
+150.25127933,-35.71329451,0.676029
+150.25132094,-35.71347137,0.625129
+150.25130922,-35.71365092,0.228601
+150.25130625,-35.71383106,0.432781
+150.25131186,-35.71401116,1.016280
+150.25131968,-35.71419116,0.778715
+150.25129012,-35.71436949,0.658590
+150.25127038,-35.71454889,1.071320
+150.25127073,-35.71472880,5.263000
+150.25110196,-35.71481049,3.449000
+150.25090177,-35.71486718,6.814000
+150.25074527,-35.71496672,-0.436819
+150.25066663,-35.71513125,2.893920
+150.25067024,-35.71524439,1.235160
+150.25070330,-35.71540505,0.444282
+150.25072460,-35.71553967,0.147879
+150.25076981,-35.71568701,0.147879
+150.25096847,-35.71573892,0.055221
+150.25109759,-35.71583221,0.005828
+150.25122954,-35.71597360,0.442313
+150.25135194,-35.71612354,0.565506
+150.25145227,-35.71628316,0.586334
+150.25150222,-35.71645843,0.544135
+150.25154197,-35.71663555,0.544135
+150.25155637,-35.71681524,0.541533
+150.25154778,-35.71699518,0.558867
+150.25151788,-35.71717361,0.717803
+150.25147364,-35.71735015,1.574530
+150.25142927,-35.71752667,1.038020
+150.25137979,-35.71770224,3.022810
+150.25131675,-35.71787467,5.265000
+150.25120370,-35.71802881,7.019000
+150.25105608,-35.71816001,7.652000
+150.25084604,-35.71820685,2.612000
+150.25075850,-35.71835523,0.568295
+150.25066706,-35.71850379,0.609833
+150.25061661,-35.71867103,0.547258
+150.25069950,-35.71882429,0.415126
+150.25078132,-35.71897667,0.449981
+150.25085944,-35.71909853,0.449981
+150.25102761,-35.71918990,0.472130
+150.25107516,-35.71924551,0.472130
+150.25101207,-35.71938858,0.478789
+150.25120477,-35.71936369,0.470483
+150.25129535,-35.71938127,0.470483
+150.25134413,-35.71948551,0.470483
+150.25152792,-35.71938685,0.478525
+150.25156250,-35.71922195,0.446466
+150.25156579,-35.71904678,0.411595
+150.25157453,-35.71889704,0.356337
+150.25154775,-35.71875139,0.275804
+150.25176029,-35.71870892,-0.172838
+150.25197872,-35.71868965,0.292723
+150.25214643,-35.71872035,0.698673
+150.25211234,-35.71889260,0.419292
+150.25213119,-35.71907210,0.363104
+150.25213539,-35.71925055,0.457400
+150.25230872,-35.71928032,0.477157
+150.25246335,-35.71926762,0.477157
+150.25263326,-35.71935232,0.514186
+150.25271284,-35.71921034,0.514186
+150.25277252,-35.71903989,0.490937
+150.25288793,-35.71915273,0.490937
+150.25301578,-35.71917396,0.511099
+150.25318376,-35.71905703,0.522662
+150.25336838,-35.71895914,0.557193
+150.25344093,-35.71879706,0.523722
+150.25340728,-35.71862051,0.459026
+150.25341729,-35.71844099,0.273670
+150.25341327,-35.71826088,1.386330
+150.25350986,-35.71810183,0.561257
+150.25360285,-35.71794142,0.149115
+150.25364881,-35.71776547,0.594358
+150.25369644,-35.71758957,1.134580
+150.25375887,-35.71741758,0.719244
+150.25391441,-35.71729818,0.329505
+150.25410359,-35.71733074,0.329505
+150.25419936,-35.71717601,0.576447
+150.25433548,-35.71703467,0.515075
+150.25446917,-35.71689206,0.597701
+150.25445815,-35.71671690,0.600849
+150.25458355,-35.71657463,0.308769
+150.25466106,-35.71641624,0.525818
+150.25460416,-35.71624318,0.510004
+150.25456536,-35.71606766,1.798200
+150.25464457,-35.71589999,1.025190
+150.25485081,-35.71586209,0.378401
+150.25506947,-35.71583669,0.469877
+150.25528992,-35.71582676,0.582483
+150.25551059,-35.71581927,0.917356
+150.25573078,-35.71580457,0.627438
+150.25595165,-35.71580496,0.496620
+150.25617152,-35.71582104,0.619879
+150.25638834,-35.71585567,0.450735
+150.25660440,-35.71589336,0.641465
+150.25681778,-35.71593987,0.641465
+150.25702951,-35.71599135,0.689860
+150.25724250,-35.71603925,0.767104
+150.25744719,-35.71610633,0.501944
+150.25763946,-35.71619498,0.437668
+150.25782902,-35.71628756,0.452193
+150.25800588,-35.71639435,0.564960
+150.25813484,-35.71653918,1.139130
+150.25819546,-35.71671181,0.842464
+150.25818055,-35.71688769,0.800537
+150.25804453,-35.71702871,0.548846
+150.25786708,-35.71711951,0.637989
+150.25780547,-35.71728847,0.631829
+150.25789900,-35.71744804,0.552377
+150.25782508,-35.71760880,0.613185
+150.25777378,-35.71777912,0.623929
+150.25773876,-35.71795569,0.612194
+150.25759838,-35.71804075,0.637848
+150.25753625,-35.71813801,0.637848
+150.25762013,-35.71830344,0.618103
+150.25765925,-35.71846400,0.556149
+150.25775779,-35.71858740,0.553022
+150.25775529,-35.71874627,0.553022
+150.25794689,-35.71869440,0.518410
+150.25810620,-35.71857051,0.513381
+150.25830055,-35.71857400,0.528174
+150.25848409,-35.71851401,0.528174
+150.25869547,-35.71853095,0.535288
+150.25877330,-35.71841457,0.527652
+150.25890806,-35.71830077,0.527652
+150.25905812,-35.71817184,0.520668
+150.25912430,-35.71800139,0.482168
+150.25911359,-35.71782217,0.493278
+150.25904955,-35.71765530,1.586670
+150.25924216,-35.71757801,0.244635
+150.25941197,-35.71747314,-0.587028
+150.25963130,-35.71748616,0.366639
+150.25984525,-35.71745382,0.559636
+150.25997971,-35.71731715,1.043320
+150.26005390,-35.71715110,2.525000
+150.26022760,-35.71704276,2.290010
+150.26043092,-35.71697957,3.790000
+150.26064993,-35.71700304,3.815000
+150.26086990,-35.71701880,3.907000
+150.26109012,-35.71703330,3.470000
+150.26129221,-35.71708833,2.173000
+150.26132219,-35.71726437,1.067180
+150.26140334,-35.71742742,0.465628
+150.26150309,-35.71758793,0.497375
+150.26165390,-35.71771400,0.438191
+150.26186329,-35.71777131,0.462324
+150.26206902,-35.71783434,0.517643
+150.26227446,-35.71788811,0.517643
+150.26245840,-35.71790230,0.415892
+150.26254534,-35.71806701,0.430715
+150.26254370,-35.71824451,0.453381
+150.26237172,-35.71829596,0.518711
+150.26216057,-35.71828484,0.540152
+150.26195912,-35.71835803,0.536937
+150.26176088,-35.71843541,0.549887
+150.26161306,-35.71856824,0.541863
+150.26152324,-35.71873231,0.531651
+150.26148005,-35.71890874,0.521851
+150.26147258,-35.71908872,0.537762
+150.26146698,-35.71926881,0.563382
+150.26150433,-35.71944577,0.563390
+150.26152871,-35.71962406,0.549132
+150.26155987,-35.71980236,0.534561
+150.26162221,-35.71997494,0.511201
+150.26171483,-35.72013850,0.508095
+150.26180390,-35.72030329,0.504582
+150.26187015,-35.72047518,0.504582
+150.26194665,-35.72064408,0.510496
+150.26204128,-35.72080684,0.487852
+150.26209634,-35.72097913,0.486766
+150.26214202,-35.72115317,0.482086
+150.26226544,-35.72130263,0.488644
+150.26238885,-35.72145210,0.495438
+150.26257219,-35.72154873,0.495438
+150.26276560,-35.72163577,0.475298
+150.26296415,-35.72171485,0.466821
+150.26315957,-35.72179677,0.461225
+150.26327410,-35.72195062,0.432466
+150.26335703,-35.72211764,0.452936
+150.26348043,-35.72226236,0.416547
+150.26356452,-35.72242607,0.476309
+150.26359384,-35.72260464,0.475282
+150.26363633,-35.72278146,0.465112
+150.26367633,-35.72295866,0.461040
+150.26370699,-35.72313701,0.451754
+150.26372729,-35.72331639,0.431094
+150.26380370,-35.72348433,0.416353
+150.26389419,-35.72364791,0.399164
+150.26390581,-35.72382727,0.394201
+150.26391977,-35.72400648,0.388903
+150.26400155,-35.72417368,0.383940
+150.26408025,-35.72434204,0.388503
+150.26411067,-35.72451802,0.425135
+150.26403857,-35.72468799,0.459717
+150.26397556,-35.72486061,0.452531
+150.26398906,-35.72503769,0.439901
+150.26407420,-35.72520390,0.395825
+150.26416588,-35.72536780,0.380895
+150.26427250,-35.72552556,0.370922
+150.26440484,-35.72566940,0.390494
+150.26455959,-35.72579802,0.255667
+150.26471471,-35.72592635,0.582684
+150.26489977,-35.72602441,1.283800
+150.26506541,-35.72614327,0.604180
+150.26519011,-35.72629164,0.525600
+150.26533827,-35.72642333,0.547276
+150.26553290,-35.72650680,1.000050
+150.26574327,-35.72647468,1.000050
+150.26591857,-35.72636542,0.893824
+150.26608374,-35.72624586,1.123000
+150.26623513,-35.72611461,1.858800
+150.26639680,-35.72599186,1.858800
+150.26648405,-35.72583093,1.723870
+150.26644535,-35.72565734,1.397000
+150.26628701,-35.72553570,1.345420
+150.26609321,-35.72544937,1.150660
+150.26589732,-35.72536618,1.283160
+150.26572004,-35.72538254,1.452000
+150.26555528,-35.72546337,1.175000
+150.26542159,-35.72533842,1.114000
+150.26544510,-35.72515961,0.599830
+150.26546176,-35.72498033,0.137618
+150.26544624,-35.72480060,0.248510
+150.26544061,-35.72462069,1.091150
+150.26542490,-35.72444273,0.734484
+150.26523181,-35.72439173,0.429019
+150.26503057,-35.72433797,0.320110
+150.26507525,-35.72422996,0.275883
+150.26526959,-35.72415145,0.326894
+150.26537411,-35.72399402,0.326894
+150.26543469,-35.72382113,0.353635
+150.26545344,-35.72364185,0.342206
+150.26544513,-35.72346192,0.332838
+150.26540440,-35.72328495,0.327039
+150.26537663,-35.72310667,0.327116
+150.26533574,-35.72293098,0.313509
+150.26536166,-35.72275288,0.324070
+150.26548713,-35.72260945,0.483430
+150.26568149,-35.72252480,0.072971
+150.26588953,-35.72246543,0.219258
+150.26610669,-35.72243242,0.323643
+150.26632262,-35.72239427,0.323643
+150.26652892,-35.72233272,0.216129
+150.26669886,-35.72221826,0.335290
+150.26683620,-35.72207766,0.933033
+150.26693888,-35.72191843,-0.174500
+150.26701367,-35.72174900,-3.420000
+150.26705287,-35.72157185,-2.017000
+150.26709213,-35.72139470,1.439000
+150.26715055,-35.72122098,5.127000
+150.26721933,-35.72104977,7.222000
+150.26729024,-35.72087911,4.233000
+150.26735656,-35.72070732,7.580000
+150.26741988,-35.72053571,11.310000
+150.26758829,-35.72042400,9.797000
+150.26779970,-35.72037508,4.745000
+150.26802050,-35.72037507,0.254131
+150.26823976,-35.72039654,0.426139
+150.26844514,-35.72035102,0.503078
+150.26856730,-35.72020245,0.089617
+150.26871332,-35.72007178,0.225331
+150.26893009,-35.72004088,0.402736
+150.26915062,-35.72003865,0.486721
+150.26936530,-35.72001395,0.512336
+150.26949526,-35.71987059,0.458884
+150.26952978,-35.71969404,0.077907
+150.26948504,-35.71952073,2.767740
+150.26967047,-35.71942318,1.735680
+150.26985247,-35.71932114,1.807030
+150.27004498,-35.71923279,0.921600
+150.27024526,-35.71915735,1.782000
+150.27045843,-35.71911078,2.024000
+150.27067665,-35.71908281,2.157000
+150.27089559,-35.71905849,3.800000
+150.27111356,-35.71902900,3.921000
+150.27133240,-35.71900457,3.825000
+150.27155309,-35.71899934,3.990000
+150.27177383,-35.71900722,4.233000
+150.27199465,-35.71901131,4.496000
+150.27221476,-35.71902228,4.607000
+150.27243262,-35.71905205,4.860000
+150.27264737,-35.71909443,5.129000
+150.27285878,-35.71914664,5.555000
+150.27305707,-35.71922536,5.555000
+150.27323231,-35.71933473,6.893000
+150.27337609,-35.71947066,7.480000
+150.27345066,-35.71963844,6.847000
+150.27349019,-35.71981553,3.159830
+150.27357209,-35.71998272,1.262070
+150.27366688,-35.72014548,0.490707
+150.27374662,-35.72031328,-0.252443
+150.27379039,-35.72048979,0.058783
+150.27383643,-35.72066589,0.357584
+150.27392152,-35.72083174,0.804967
+150.27402895,-35.72098917,0.564744
+150.27413099,-35.72114888,0.692118
+150.27420339,-35.72131904,0.285298
+150.27427691,-35.72148882,0.209476
+150.27439660,-35.72163942,0.126114
+150.27455681,-35.72176308,1.177000
+150.27472714,-35.72187787,0.315631
+150.27488477,-35.72200388,0.494783
+150.27502910,-35.72214031,0.361163
+150.27517391,-35.72227640,0.416810
+150.27531617,-35.72241416,0.379194
+150.27541983,-35.72257274,0.275895
+150.27550568,-35.72273873,0.348787
+150.27563123,-35.72288565,0.341200
+150.27580079,-35.72300097,0.385383
+150.27594989,-35.72313249,0.264100
+150.27603177,-35.72329942,0.828488
+150.27593810,-35.72344266,0.379543
+150.23376592,-35.77508286,0.887378
+150.23354636,-35.77506890,0.806276
+150.23332671,-35.77508686,0.766117
+150.23311479,-35.77513097,0.766117
+150.23289671,-35.77514200,0.520483
+150.23267944,-35.77510854,0.312708
+150.23250413,-35.77500426,1.229000
+150.23230630,-35.77493198,0.850000
+150.23209959,-35.77497039,2.053000
+150.23193159,-35.77508316,0.911000
+150.23179596,-35.77522363,1.036000
+150.23158822,-35.77526487,1.360000
+150.23138863,-35.77518889,1.921000
+150.23122438,-35.77506931,2.213000
+150.23109574,-35.77492276,1.961000
+150.23096980,-35.77477473,1.961000
+150.23085211,-35.77462219,1.887000
+150.23075729,-35.77445950,1.320000
+150.23069734,-35.77428636,1.672000
+150.23065904,-35.77410931,1.772000
+150.23064780,-35.77393134,1.612000
+150.23074588,-35.77377320,0.867700
+150.23086010,-35.77361908,0.351900
+150.23098345,-35.77346954,1.106000
+150.23116186,-35.77336384,1.106000
+150.23137831,-35.77335509,0.481400
+150.23159465,-35.77339232,0.364697
+150.23181400,-35.77338569,0.419270
+150.23202754,-35.77334135,0.080856
+150.23221670,-35.77325100,0.124616
+150.23241541,-35.77317248,0.210009
+150.23261021,-35.77308828,-0.065543
+150.23281166,-35.77311766,0.488880
+150.23302620,-35.77312621,0.352636
+150.23322924,-35.77307754,0.296813
+150.23337782,-35.77294410,0.261137
+150.23357746,-35.77286881,0.363953
+150.23378038,-35.77279725,0.238095
+150.23399095,-35.77274447,0.251917
+150.23420611,-35.77270297,0.355336
+150.23440692,-35.77263473,0.605061
+150.23459039,-35.77253418,0.407662
+150.23477020,-35.77243092,0.436328
+150.23487462,-35.77227210,0.307420
+150.23495988,-35.77210967,0.307043
+150.23495141,-35.77192961,0.398745
+150.23493380,-35.77175250,0.609083
+150.23478906,-35.77161629,0.609083
+150.23464431,-35.77148008,0.390669
+150.23444021,-35.77143656,0.557428
+150.23422033,-35.77141767,0.334158
+150.23404758,-35.77152730,0.393025
+150.23387647,-35.77164142,0.345127
+150.23371359,-35.77176179,0.275349
+150.23357106,-35.77189279,0.300823
+150.23336193,-35.77195126,0.262367
+150.23314569,-35.77191538,0.329166
+150.23292952,-35.77187756,0.563118
+150.23271356,-35.77183892,1.061310
+150.23250244,-35.77178856,-1.563000
+150.23230489,-35.77170800,0.899910
+150.23211631,-35.77161411,9.956000
+150.23195061,-35.77150145,-1.083000
+150.23177410,-35.77140608,3.881150
+150.23156529,-35.77134754,1.594000
+150.23134557,-35.77134620,-0.595150
+150.23115755,-35.77143410,0.637200
+150.23099942,-35.77155959,0.748200
+150.23082670,-35.77166869,0.748200
+150.23063452,-35.77175759,0.402200
+150.23042646,-35.77181685,1.656000
+150.23020578,-35.77181974,1.176000
+150.22998614,-35.77179907,1.041000
+150.22977137,-35.77175819,1.145000
+150.22955723,-35.77172070,0.814200
+150.22933704,-35.77173710,0.409500
+150.22912519,-35.77178240,1.160000
+150.22892268,-35.77185393,-0.048810
+150.22871862,-35.77191734,0.592000
+150.22850038,-35.77191949,2.228000
+150.22828586,-35.77188000,0.354000
+150.22810257,-35.77178442,1.270000
+150.22796490,-35.77164494,1.270000
+150.22786028,-35.77148722,0.973300
+150.22770039,-35.77137886,0.701782
+150.22750977,-35.77139917,0.701782
+150.22730875,-35.77147299,0.529911
+150.22708831,-35.77146453,0.665796
+150.22687392,-35.77142048,0.718800
+150.22665355,-35.77140890,0.244246
+150.22643402,-35.77141737,1.695240
+150.22621541,-35.77144432,4.087000
+150.22599586,-35.77143731,4.927000
+150.22581444,-35.77133591,1.587080
+150.22565994,-35.77120740,2.689000
+150.22554939,-35.77105353,2.109000
+150.22547554,-35.77088505,1.895000
+150.22547242,-35.77070499,1.681220
+150.22551239,-35.77052928,2.676630
+150.22566103,-35.77040595,0.870777
+150.22585679,-35.77032314,0.509240
+150.22604653,-35.77023064,0.575108
+150.22622022,-35.77012201,0.515606
+150.22633653,-35.76997010,0.515606
+150.22631602,-35.76979418,0.473862
+150.22620919,-35.76964396,0.481404
+150.22603946,-35.76952910,0.522663
+150.22587612,-35.76940873,0.469954
+150.22572279,-35.76927895,0.536656
+150.22556346,-35.76915409,0.527960
+150.22539588,-35.76903655,0.527960
+150.22522111,-35.76892627,0.543032
+150.22504172,-35.76882098,0.521237
+150.22484055,-35.76874766,0.491042
+150.22462751,-35.76876396,0.599666
+150.22447574,-35.76889282,4.258000
+150.22435377,-35.76903823,11.850000
+150.22414777,-35.76904861,14.360000
+150.22392937,-35.76902277,14.180000
+150.22371543,-35.76897731,0.515429
+150.22351186,-35.76890788,14.310000
+150.22331273,-35.76882973,19.480000
+150.22311627,-35.76874709,11.390000
+150.22292138,-35.76866200,22.389999
+150.22273504,-35.76856681,1.746410
+150.22256821,-35.76844857,16.240000
+150.22240061,-35.76833107,8.659000
+150.22223902,-35.76820848,7.516000
+150.22208715,-35.76807753,7.516000
+150.22193698,-35.76794545,2.772710
+150.22180936,-35.76779831,3.819170
+150.22169931,-35.76764287,2.474570
+150.22162733,-35.76747364,3.486040
+150.22157330,-35.76729905,1.131470
+150.22152808,-35.76712476,1.344000
+150.22154085,-35.76694488,2.156860
+150.22154442,-35.76676489,3.717000
+150.22156146,-35.76658890,3.834000
+150.22167215,-35.76643482,3.834000
+150.22169460,-35.76625611,2.919000
+150.22169419,-35.76607617,1.855650
+150.22169465,-35.76589670,1.179460
+150.22171126,-35.76571733,0.538118
+150.22164624,-35.76554715,0.641392
+150.22148211,-35.76543140,1.404580
+150.22131175,-35.76531655,0.495883
+150.22116339,-35.76518459,5.823000
+150.22109088,-35.76501585,4.180000
+150.22105750,-35.76483773,8.585000
+150.22100700,-35.76466234,7.542000
+150.22094653,-35.76448914,3.844150
+150.22089408,-35.76431427,0.375268
+150.22085807,-35.76413661,0.586182
+150.22081129,-35.76396068,0.352753
+150.22076514,-35.76378489,2.447030
+150.22080071,-35.76361499,6.597000
+150.22092248,-35.76347306,2.534470
+150.22112273,-35.76340013,2.534470
+150.22129079,-35.76328487,0.669468
+150.22148146,-35.76323834,0.490494
+150.22167451,-35.76331395,0.564742
+150.22188268,-35.76327110,0.574306
+150.22189085,-35.76310833,0.558475
+150.22172870,-35.76298587,0.555513
+150.22157000,-35.76286097,0.549051
+150.22141908,-35.76272964,0.557513
+150.22128661,-35.76258802,0.548200
+150.22118509,-35.76242798,0.535944
+150.22104370,-35.76230473,0.523546
+150.22085031,-35.76234656,0.456169
+150.22072492,-35.76249479,0.482276
+150.22052150,-35.76253651,0.445545
+150.22048795,-35.76270424,0.403151
+150.22048346,-35.76288434,0.352562
+150.22038218,-35.76300288,0.441354
+150.22022130,-35.76309067,0.338984
+150.22010880,-35.76324470,0.424072
+150.21997082,-35.76338232,0.096106
+150.21978213,-35.76347504,0.395852
+150.21956710,-35.76346533,0.710599
+150.21934922,-35.76344198,0.593182
+150.21913978,-35.76338568,7.239000
+150.21898233,-35.76326878,-0.074928
+150.21890381,-35.76310264,0.290124
+150.21885936,-35.76292635,0.347656
+150.21881471,-35.76274992,0.389612
+150.21867177,-35.76263812,0.384129
+150.21848662,-35.76270163,0.487217
+150.21833277,-35.76282670,-0.000679
+150.21816317,-35.76277619,0.845778
+150.21808933,-35.76261486,0.524402
+150.21789724,-35.76264816,0.506385
+150.21768982,-35.76265615,0.637553
+150.21747415,-35.76264263,0.612876
+150.21726730,-35.76263141,0.322714
+150.21711297,-35.76272216,-0.357929
+150.21702266,-35.76258836,0.301909
+150.21700977,-35.76241758,0.503399
+150.21683003,-35.76232225,0.553973
+150.21664881,-35.76223855,0.532422
+150.21659644,-35.76206652,0.557454
+150.21647454,-35.76201873,0.469164
+150.21630085,-35.76204122,0.360433
+150.21616687,-35.76190376,0.626166
+150.21607071,-35.76174207,0.652884
+150.21607673,-35.76157465,0.674962
+150.21612265,-35.76145904,0.677191
+150.21591420,-35.76141784,0.693318
+150.21578382,-35.76147574,0.664057
+150.21565717,-35.76159059,0.666753
+150.21551120,-35.76169189,0.668966
+150.21550825,-35.76187107,0.676840
+150.21548080,-35.76204953,0.681250
+150.21544385,-35.76222718,0.760000
+150.21528255,-35.76233346,1.142000
+150.21506246,-35.76234557,1.005000
+150.21484267,-35.76233142,1.109000
+150.21462537,-35.76229827,1.072000
+150.21440807,-35.76226512,0.839536
+150.21420642,-35.76219239,1.270790
+150.21401446,-35.76210483,1.648000
+150.21383830,-35.76199597,1.239000
+150.21366134,-35.76188798,1.100270
+150.21349948,-35.76176725,1.100270
+150.21335548,-35.76163053,1.352930
+150.21323231,-35.76148170,0.866452
+150.21312406,-35.76132463,-0.714456
+150.21303259,-35.76116107,1.457000
+150.21296603,-35.76099082,0.467996
+150.21298151,-35.76081108,-0.668705
+150.21298410,-35.76063111,0.268904
+150.21296574,-35.76045186,0.405487
+150.21289680,-35.76028546,0.405487
+150.21275398,-35.76014890,0.428433
+150.21258699,-35.76003235,0.724608
+150.21242361,-35.76009786,0.325568
+150.21228463,-35.76021400,0.672877
+150.21207215,-35.76016975,1.797020
+150.21191446,-35.76005546,0.883352
+150.21184277,-35.75988651,0.779418
+150.21179279,-35.75971099,0.779418
+150.21174282,-35.75953547,1.069970
+150.21169285,-35.75935995,0.642428
+150.21164288,-35.75918443,0.709008
+150.21160762,-35.75900662,0.808959
+150.21157465,-35.75882845,0.559167
+150.21154169,-35.75865028,1.046870
+150.21150873,-35.75847210,1.299360
+150.21147576,-35.75829393,1.077760
+150.21143476,-35.75811706,1.065890
+150.21138188,-35.75794211,1.032040
+150.21134894,-35.75776517,1.823400
+150.21134843,-35.75758498,1.655900
+150.21137308,-35.75740791,1.900970
+150.21143927,-35.75723600,0.665608
+150.21153531,-35.75707614,0.082558
+150.21170095,-35.75696118,1.593710
+150.21191322,-35.75691506,0.921570
+150.21210249,-35.75684073,0.686033
+150.21217732,-35.75668142,0.775581
+150.21214857,-35.75650511,0.824146
+150.21208465,-35.75633262,2.165800
+150.21206452,-35.75615416,-0.269542
+150.21209096,-35.75597594,-2.321310
+150.21222028,-35.75583678,-1.326450
+150.21237807,-35.75571063,0.458126
+150.21252759,-35.75557827,0.458126
+150.21262533,-35.75542672,0.495071
+150.21263162,-35.75524661,0.702200
+150.21262354,-35.75506703,0.617337
+150.21259351,-35.75488883,0.682770
+150.21251727,-35.75471971,0.541480
+150.21238300,-35.75457681,0.554503
+150.21224737,-35.75443453,0.699330
+150.21211174,-35.75429224,3.246860
+150.21203538,-35.75412317,2.838160
+150.21197350,-35.75395056,2.838160
+150.21192380,-35.75377498,-0.479854
+150.21188374,-35.75359780,0.599456
+150.21188282,-35.75341929,1.140340
+150.21190541,-35.75324005,0.835458
+150.21194161,-35.75306239,0.741189
+150.21198153,-35.75288517,0.773133
+150.21203103,-35.75270956,0.797965
+150.21208054,-35.75253395,0.785119
+150.21217324,-35.75237344,0.695602
+150.21229512,-35.75222312,1.011380
+150.21242820,-35.75208047,0.600567
+150.21258889,-35.75195675,0.509605
+150.21278953,-35.75188560,1.918410
+150.21299904,-35.75182855,2.224000
+150.21321169,-35.75177937,5.192000
+150.21342545,-35.75173347,5.833000
+150.21360841,-35.75163534,8.014000
+150.21377956,-35.75152211,8.014000
+150.21393852,-35.75139767,3.739180
+150.21408674,-35.75126451,1.472780
+150.21423062,-35.75112835,1.472780
+150.21442215,-35.75104808,3.527980
+150.21463599,-35.75106259,1.283310
+150.21483458,-35.75114086,0.745002
+150.21500064,-35.75125484,0.450212
+150.21515433,-35.75138390,0.978262
+150.21531591,-35.75150685,0.795481
+150.21545685,-35.75164409,1.643690
+150.21555440,-35.75180471,0.754413
+150.21562566,-35.75197511,0.559359
+150.21571973,-35.75213408,0.595692
+150.21591539,-35.75221088,0.587685
+150.21611915,-35.75222431,0.566314
+150.21629546,-35.75211563,0.546945
+150.21643110,-35.75197405,0.487750
+150.21658683,-35.75185068,0.522151
+150.21661523,-35.75167675,0.539543
+150.21671052,-35.75152268,0.576157
+150.21690008,-35.75143635,0.576157
+150.21708042,-35.75134186,0.551661
+150.21715216,-35.75118340,0.529588
+150.21706210,-35.75102271,0.560771
+150.21691554,-35.75088795,0.537932
+150.21675593,-35.75076334,0.553696
+150.21659186,-35.75064264,0.477857
+150.21643275,-35.75051772,0.613449
+150.21627803,-35.75038904,1.185420
+150.21610503,-35.75027758,1.185420
+150.21596355,-35.75014139,0.227321
+150.21586785,-35.74997899,0.467925
+150.21568461,-35.74991268,0.901694
+150.21557824,-35.74981127,3.100000
+150.21559482,-35.74964137,1.291930
+150.21544079,-35.74953656,1.291930
+150.21523943,-35.74959477,0.201088
+150.21503432,-35.74964797,0.590955
+150.21484052,-35.74957643,-0.067524
+150.21466687,-35.74946711,1.276280
+150.21448689,-35.74937084,0.524580
+150.21444410,-35.74919529,0.772946
+150.21432193,-35.74905020,0.988988
+150.21413676,-35.74895515,0.988988
+150.21391774,-35.74894307,0.353140
+150.21375067,-35.74883129,1.692000
+150.21373779,-35.74865483,-0.505498
+150.21389350,-35.74855498,-0.879700
+150.21408658,-35.74847160,0.904700
+150.21428400,-35.74839361,1.492840
+150.21424877,-35.74833053,1.492840
+150.21425073,-35.74820837,0.420900
+150.21446725,-35.74824242,0.594464
+150.21466241,-35.74817805,0.492844
+150.21478950,-35.74803666,-0.245434
+150.21471893,-35.74786699,-0.302469
+150.21475863,-35.74781407,-0.302469
+150.21496728,-35.74785976,0.201632
+150.21516719,-35.74778954,1.143630
+150.21535079,-35.74780261,0.579367
+150.21552252,-35.74777750,0.578867
+150.21544792,-35.74761122,0.428626
+150.21529235,-35.74748410,0.426636
+150.21530538,-35.74734920,0.521479
+150.21525684,-35.74719252,1.038150
+150.21515586,-35.74703720,0.624600
+150.21527424,-35.74690195,0.180376
+150.21548992,-35.74686567,0.624332
+150.21542630,-35.74671009,0.487089
+150.21546649,-35.74653552,0.565039
+150.21559801,-35.74642001,0.587071
+150.21578720,-35.74649145,0.557742
+150.21582933,-35.74637213,0.578168
+150.21574228,-35.74622303,0.610221
+150.21592812,-35.74620285,0.587397
+150.21609278,-35.74613125,0.580469
+150.21608541,-35.74595261,0.571099
+150.21620214,-35.74587178,0.539644
+150.21623423,-35.74604212,0.575501
+150.21638199,-35.74617223,0.591258
+150.21655235,-35.74608844,0.584935
+150.21664748,-35.74593143,0.580056
+150.21670237,-35.74577753,0.598160
+150.21676916,-35.74563021,0.597965
+150.21669320,-35.74546147,0.569984
+150.21657625,-35.74531590,0.546128
+150.21636215,-35.74529620,0.355514
+150.21630744,-35.74514024,0.502310
+150.21622805,-35.74501400,0.624595
+150.21611053,-35.74487934,0.624595
+150.21618726,-35.74473218,0.345849
+150.21612599,-35.74461221,0.153395
+150.21628106,-35.74451905,0.393981
+150.21614006,-35.74440409,0.173414
+150.21621123,-35.74426030,0.599016
+150.21610937,-35.74410342,0.316233
+150.21618631,-35.74396011,0.316233
+150.21620455,-35.74378742,-0.084323
+150.21625846,-35.74361580,0.264524
+150.21629554,-35.74347720,0.095050
+150.21640432,-35.74341780,0.734046
+150.21644428,-35.74328952,0.847637
+150.21626709,-35.74318529,0.697062
+150.21621080,-35.74305102,0.697062
+150.21610346,-35.74295159,0.554287
+150.21596713,-35.74298905,0.532212
+150.21578672,-35.74301187,0.389168
+150.21566213,-35.74315176,0.385015
+150.21546454,-35.74323093,-0.548624
+150.21526239,-35.74320129,0.424892
+150.21512873,-35.74306171,1.635360
+150.21512124,-35.74291700,0.326299
+150.21524182,-35.74276809,0.422972
+150.21540535,-35.74265113,-1.392500
+150.21555839,-35.74268418,0.510412
+150.21566574,-35.74253482,0.720954
+150.21562232,-35.74236109,1.869200
+150.21545218,-35.74226321,1.771680
+150.21538546,-35.74211498,1.827750
+150.21533165,-35.74199306,1.827750
+150.21519948,-35.74189385,1.449250
+150.21509129,-35.74177944,1.449250
+150.21504275,-35.74160559,0.587950
+150.21489480,-35.74153696,0.550158
+150.21477629,-35.74168264,0.659135
+150.21456795,-35.74171757,0.692686
+150.21439419,-35.74181387,0.668015
+150.21440476,-35.74196061,-0.002764
+150.21421527,-35.74204926,0.299482
+150.21400077,-35.74204258,0.615809
+150.21401791,-35.74217007,0.870509
+150.21397512,-35.74232246,-1.413630
+150.21391122,-35.74248991,7.268000
+150.21380578,-35.74255265,5.217000
+150.21359225,-35.74250968,1.158000
+150.21337989,-35.74255508,1.640000
+150.21316871,-35.74251255,4.889000
+150.21296891,-35.74243556,6.421000
+150.21277295,-35.74235225,2.819000
+150.21259100,-35.74225035,2.819000
+150.21243342,-35.74212448,2.106840
+150.21231034,-35.74197508,2.533240
+150.21221513,-35.74181270,1.523650
+150.21214319,-35.74164247,3.063000
+150.21208815,-35.74146797,2.428980
+150.21203982,-35.74129218,1.350550
+150.21200782,-35.74111398,2.529510
+150.21198599,-35.74093468,0.266745
+150.21196250,-35.74075552,5.061000
+150.21196425,-35.74057557,4.641760
+150.21200062,-35.74039854,0.666960
+150.21212598,-35.74026330,0.666960
+150.21211051,-35.74012390,0.873700
+150.21211010,-35.73995855,0.682956
+150.21224101,-35.73981391,0.742649
+150.21236016,-35.73966537,0.568300
+150.21243056,-35.73949461,4.378000
+150.21256619,-35.73935483,0.826985
+150.21271264,-35.73921995,-0.203898
+150.21284773,-35.73908705,4.369810
+150.21284612,-35.73925257,-0.203898
+150.21300099,-35.73936799,1.017470
+150.21305051,-35.73945709,1.017470
+150.21315086,-35.73953542,0.663568
+150.21335157,-35.73949975,1.188100
+150.21341419,-35.73932999,1.912670
+150.21360491,-35.73929185,2.933350
+150.21362299,-35.73920406,2.933350
+150.21375844,-35.73933404,2.933350
+150.21381888,-35.73950495,0.543619
+150.21400662,-35.73958767,0.658626
+150.21409988,-35.73945921,0.629056
+150.21403770,-35.73928866,0.565816
+150.21414473,-35.73915722,0.545757
+150.21430509,-35.73903582,0.614358
+150.21426651,-35.73888258,0.613375
+150.21423177,-35.73872335,0.863416
+150.21422895,-35.73855116,0.509409
+150.21419083,-35.73838020,0.512240
+150.21424062,-35.73821136,0.609937
+150.21427963,-35.73811858,0.641141
+150.21444616,-35.73805757,0.641141
+150.21444458,-35.73791359,0.647439
+150.21426252,-35.73782828,0.632993
+150.21405093,-35.73782270,0.585765
+150.21383053,-35.73781555,0.553896
+150.21361222,-35.73784146,0.540208
+150.21344534,-35.73774960,0.518797
+150.21323444,-35.73772712,0.448848
+150.21304625,-35.73775562,1.204920
+150.21284157,-35.73777101,0.797091
+150.21267060,-35.73765975,0.490641
+150.21262771,-35.73749235,0.629465
+150.21257390,-35.73733404,0.639877
+150.21239630,-35.73734021,0.635135
+150.21229493,-35.73750006,0.622611
+150.21230288,-35.73766150,0.473437
+150.21243259,-35.73778460,0.981234
+150.21230345,-35.73792596,2.537050
+150.21209223,-35.73793736,-0.952020
+150.21189840,-35.73795086,0.731063
+150.21179964,-35.73802343,0.640763
+150.21172324,-35.73819079,0.537945
+150.21174808,-35.73836104,0.712003
+150.21180117,-35.73842066,0.712003
+150.21158432,-35.73845119,6.992000
+150.21136345,-35.73845318,6.229000
+150.21114365,-35.73843561,4.903000
+150.21092789,-35.73839684,1.678000
+150.21071289,-35.73835512,2.155000
+150.21049907,-35.73830966,2.434000
+150.21029094,-35.73824948,3.098000
+150.21009179,-35.73817150,1.646940
+150.20989633,-35.73808741,1.878010
+150.20970163,-35.73800216,0.926188
+150.20951540,-35.73790558,1.029490
+150.20935395,-35.73778307,1.557000
+150.20920289,-35.73765158,1.648000
+150.20904738,-35.73752355,1.648000
+150.20889003,-35.73739704,1.924000
+150.20873320,-35.73727015,2.163770
+150.20860311,-35.73712491,2.163770
+150.20848725,-35.73697153,2.713000
+150.20834994,-35.73683041,2.982000
+150.20821811,-35.73668587,2.070950
+150.20809686,-35.73653529,3.023000
+150.20799677,-35.73637487,3.023000
+150.20791181,-35.73620853,3.343000
+150.20781846,-35.73604526,2.571000
+150.20772198,-35.73588317,1.150910
+150.20763220,-35.73571852,2.156000
+150.20754980,-35.73555137,1.193350
+150.20748702,-35.73537870,3.037650
+150.20744117,-35.73520250,1.818830
+150.20736599,-35.73503425,1.556530
+150.20730069,-35.73486227,3.064000
+150.20725148,-35.73468661,2.541000
+150.20720167,-35.73451110,1.809000
+150.20718226,-35.73433200,1.602000
+150.20718718,-35.73415188,1.673000
+150.20717601,-35.73397193,1.409000
+150.20717201,-35.73379181,1.553000
+150.20717595,-35.73361168,1.237180
+150.20718483,-35.73343165,0.961300
+150.20716510,-35.73325256,0.920500
+150.20716284,-35.73307365,1.019010
+150.20721330,-35.73289824,1.104000
+150.20726505,-35.73272307,0.697496
+150.20729380,-35.73254480,-0.215684
+150.20735903,-35.73237297,3.625260
+150.20737407,-35.73219378,1.516570
+150.20735622,-35.73201476,3.095510
+150.20751275,-35.73189528,0.402776
+150.20742037,-35.73179232,4.374520
+150.20738448,-35.73161868,2.193230
+150.20736796,-35.73143962,4.022000
+150.20734726,-35.73126070,2.914200
+150.20742877,-35.73110152,3.265000
+150.20745432,-35.73092943,2.180000
+150.20749772,-35.73078480,2.180000
+150.20750594,-35.73061278,1.256450
+150.20766242,-35.73049169,-0.795566
+150.20773243,-35.73036229,2.882610
+150.20787962,-35.73023564,2.882610
+150.20790614,-35.73007651,6.646000
+150.20797928,-35.72990676,0.962924
+150.20803892,-35.72973392,5.286130
+150.20803291,-35.72955419,8.737000
+150.20786928,-35.72953553,6.505000
+150.20765689,-35.72958198,2.243390
+150.20747690,-35.72968127,-1.288940
+150.20729566,-35.72976459,3.577870
+150.20708089,-35.72980606,0.437293
+150.20688139,-35.72988314,0.214682
+150.20668739,-35.72996837,1.462700
+150.20652159,-35.73008743,3.435130
+150.20632163,-35.73015284,0.836920
+150.20617430,-35.73021216,1.927650
+150.20600744,-35.73030599,0.926423
+150.20599134,-35.73048075,0.975944
+150.20592760,-35.73065078,0.745150
+150.20588603,-35.73082336,0.426489
+150.20580997,-35.73099224,0.607054
+150.20576791,-35.73116903,0.435782
+150.20569531,-35.73133542,0.818493
+150.20557163,-35.73148386,0.404062
+150.20548348,-35.73164410,4.351540
+150.20528914,-35.73172887,0.942787
+150.20508130,-35.73178944,0.553892
+150.20486807,-35.73183677,1.024170
+150.20465393,-35.73188112,1.659200
+150.20443566,-35.73190845,0.282142
+150.20421490,-35.73190743,0.705865
+150.20399416,-35.73190062,0.870446
+150.20377363,-35.73191171,1.015720
+150.20355312,-35.73190730,1.012310
+150.20333572,-35.73187519,1.071130
+150.20311895,-35.73184035,1.495720
+150.20290564,-35.73179353,1.655530
+150.20269667,-35.73173495,1.138420
+150.20248674,-35.73167879,1.335610
+150.20227464,-35.73162820,1.557540
+150.20206348,-35.73157514,1.902000
+150.20185382,-35.73151821,1.650000
+150.20164911,-35.73145064,1.950000
+150.20145621,-35.73136299,2.119000
+150.20127120,-35.73126449,1.550530
+150.20109105,-35.73116015,2.049310
+150.20090514,-35.73106281,1.664000
+150.20072182,-35.73096231,1.365980
+150.20054774,-35.73085133,1.226090
+150.20037525,-35.73073870,1.569290
+150.20020832,-35.73062080,1.569290
+150.20005252,-35.73049305,1.758640
+150.19989903,-35.73036343,1.934000
+150.19975265,-35.73022851,1.934000
+150.19961499,-35.73008758,1.838000
+150.19948556,-35.72994157,1.845000
+150.19936501,-35.72979060,1.734050
+150.19925567,-35.72963405,1.889000
+150.19918623,-35.72946416,1.875000
+150.19912571,-35.72929087,1.779790
+150.19905620,-35.72911986,2.026000
+150.19897727,-35.72895156,2.026000
+150.19890177,-35.72878225,2.168000
+150.19884439,-35.72860827,2.046000
+150.19876642,-35.72844012,1.980000
+150.19865199,-35.72828604,1.735000
+150.19855151,-35.72812578,1.722000
+150.19847048,-35.72795818,2.076000
+150.19839682,-35.72778830,1.929000
+150.19833047,-35.72761645,1.808000
+150.19826869,-35.72744346,1.893000
+150.19820874,-35.72727003,1.752000
+150.19814914,-35.72709653,1.398030
+150.19809393,-35.72692207,1.193760
+150.19804537,-35.72674630,1.534400
+150.19800584,-35.72656904,1.384740
+150.19797115,-35.72639111,1.162260
+150.19794352,-35.72621234,1.041260
+150.19792243,-35.72603299,0.765393
+150.19788989,-35.72585522,1.208250
+150.19784434,-35.72567892,0.963247
+150.19780510,-35.72550161,0.919777
+150.19777137,-35.72532354,0.780421
+150.19774517,-35.72514464,0.834858
+150.19772307,-35.72496537,0.926500
+150.19770749,-35.72478564,1.145610
+150.19770017,-35.72460558,1.188180
+150.19770672,-35.72442555,1.041040
+150.19773102,-35.72424650,0.913708
+150.19775430,-35.72406736,0.943191
+150.19775226,-35.72388741,0.917569
+150.19772442,-35.72370874,0.916115
+150.19769246,-35.72353046,0.854874
+150.19768057,-35.72335069,1.047170
+150.19768666,-35.72317060,0.935715
+150.19770784,-35.72299129,1.128150
+150.19774538,-35.72281385,1.126100
+150.19781100,-35.72264194,0.892922
+150.19788726,-35.72247284,0.776931
+150.19794283,-35.72229872,0.854430
+150.19797109,-35.72212009,0.949727
+150.19798715,-35.72194039,1.098280
+150.19799393,-35.72176031,1.254090
+150.19798857,-35.72158019,1.485010
+150.19797692,-35.72140026,1.840950
+150.19796508,-35.72122034,1.762000
+150.19796011,-35.72104020,1.754000
+150.19795944,-35.72086002,1.779290
+150.19795916,-35.72067984,1.931000
+150.19796312,-35.72049969,1.884020
+150.19797481,-35.72031979,1.827050
+150.19799677,-35.72014052,1.407210
+150.19802885,-35.71996226,1.427120
+150.19806930,-35.71978513,1.695000
+150.19812082,-35.71961001,1.686130
+150.19819817,-35.71944139,0.866895
+150.19830213,-35.71928271,0.966946
+150.19843967,-35.71914184,1.088120
+150.19862402,-35.71912156,0.723994
+150.19881986,-35.71920482,0.796645
+150.19901339,-35.71929141,0.855797
+150.19920269,-35.71928135,0.785934
+150.19906176,-35.71917609,0.827742
+150.19886015,-35.71910237,0.796645
+150.19865437,-35.71903675,0.723994
+150.19845278,-35.71896309,1.378100
+150.19825296,-35.71888618,1.852000
+150.19805223,-35.71881090,1.132710
+150.19785303,-35.71873296,1.687660
+150.19765445,-35.71865395,1.585750
+150.19745269,-35.71858051,0.641749
+150.19725215,-35.71850489,0.355287
+150.19705502,-35.71842353,0.862456
+150.19685915,-35.71834017,0.862456
+150.19666442,-35.71825504,1.230700
+150.19646679,-35.71817455,1.265000
+150.19627041,-35.71809201,1.593860
+150.19607762,-35.71800399,1.179320
+150.19588658,-35.71791347,1.183310
+150.19569783,-35.71781982,0.619187
+150.19552515,-35.71782236,0.911606
+150.19568807,-35.71793735,0.961495
+150.19587744,-35.71803011,1.183310
+150.19606514,-35.71812510,1.015090
+150.19625395,-35.71821854,1.593860
+150.19644727,-35.71828729,1.343010
+150.19636679,-35.71841681,1.323010
+150.19633698,-35.71853244,1.967000
+150.19612703,-35.71847703,1.962000
+150.19592190,-35.71841088,1.811900
+150.19573280,-35.71831791,1.870000
+150.19555754,-35.71820945,1.414000
+150.19541845,-35.71806947,1.893000
+150.19526944,-35.71793678,2.048550
+150.19511626,-35.71780990,1.461530
+150.19526873,-35.71773881,1.461530
+150.19528862,-35.71762728,0.871962
+150.19509718,-35.71753731,0.706223
+150.19490729,-35.71744522,0.674366
+150.19472076,-35.71734869,0.693584
+150.19453747,-35.71724807,0.710162
+150.19435060,-35.71715202,0.621768
+150.19416099,-35.71705951,0.748599
+150.19398198,-35.71695411,0.722850
+150.19380659,-35.71684468,0.773532
+150.19361355,-35.71675709,0.679484
+150.19342436,-35.71666409,0.657243
+150.19324105,-35.71656357,0.603270
+150.19306285,-35.71645705,1.291540
+150.19288465,-35.71635052,2.109790
+150.19270743,-35.71624293,1.765950
+150.19253237,-35.71613301,1.111820
+150.19236575,-35.71601480,1.458900
+150.19220542,-35.71589083,1.190000
+150.19203475,-35.71577653,0.821039
+150.19185789,-35.71566854,0.821039
+150.19168523,-35.71555612,0.829998
+150.19151019,-35.71544623,1.085470
+150.19132712,-35.71534537,1.849490
+150.19114797,-35.71524002,2.277630
+150.19097482,-35.71512809,2.342090
+150.19079724,-35.71502095,1.183220
+150.19061539,-35.71491862,2.554020
+150.19044308,-35.71480610,1.505830
+150.19027066,-35.71469364,1.132990
+150.19009575,-35.71468578,0.598501
+150.19000439,-35.71479349,0.598501
+150.19021302,-35.71482227,1.132990
+150.19040464,-35.71491170,1.974490
+150.19059566,-35.71500093,2.554020
+150.19077027,-35.71511131,2.342090
+150.19094804,-35.71521830,2.342090
+150.19113293,-35.71531682,1.501000
+150.19131210,-35.71542213,1.849490
+150.19148467,-35.71553463,1.085470
+150.19166298,-35.71564071,0.837910
+150.19183233,-35.71575613,0.837910
+150.19200597,-35.71586738,0.750199
+150.19216972,-35.71598831,0.966529
+150.19233244,-35.71610858,1.458900
+150.19251235,-35.71620985,1.765950
+150.19268162,-35.71632553,1.765950
+150.19285762,-35.71643442,2.407780
+150.19303579,-35.71654099,1.291540
+150.19321646,-35.71664313,0.603270
+150.19339607,-35.71674331,0.611271
+150.19357490,-35.71684628,0.611271
+150.19368856,-35.71699383,0.656170
+150.19387281,-35.71706743,0.722850
+150.19407365,-35.71711866,0.644079
+150.19425298,-35.71722361,0.621768
+150.19443520,-35.71732549,0.439847
+150.19461579,-35.71742917,0.554469
+150.19480231,-35.71752570,0.666829
+150.19493155,-35.71766727,0.706223
+150.19495742,-35.71784376,1.648320
+150.19475295,-35.71782472,1.717000
+150.19453271,-35.71781107,1.641000
+150.19431324,-35.71782482,1.729890
+150.19409622,-35.71784230,2.000000
+150.19387706,-35.71782174,1.851390
+150.19366714,-35.71778074,2.101000
+150.19348937,-35.71767626,2.080000
+150.19328929,-35.71759982,1.907840
+150.19308921,-35.71752338,1.339060
+150.19288913,-35.71744694,1.230180
+150.19268509,-35.71737960,0.620689
+150.19247075,-35.71733587,0.589600
+150.19225641,-35.71729215,0.542853
+150.19203733,-35.71728052,0.509352
+150.19182423,-35.71732219,0.464461
+150.19161358,-35.71737654,1.161020
+150.19140202,-35.71742443,1.712000
+150.19118177,-35.71741017,1.644000
+150.19097304,-35.71735157,1.100000
+150.19075772,-35.71732540,1.309000
+150.19056176,-35.71738931,1.362110
+150.19046674,-35.71754524,1.149000
+150.19046603,-35.71772507,1.179000
+150.19047727,-35.71790493,1.635000
+150.19052857,-35.71808019,1.781000
+150.19063131,-35.71823562,1.053000
+150.19066977,-35.71840907,1.550000
+150.19064925,-35.71849973,1.331000
+150.19052219,-35.71835232,1.515000
+150.19043569,-35.71818873,1.053000
+150.19037962,-35.71801476,2.000000
+150.19034178,-35.71783724,1.871000
+150.19030394,-35.71765972,1.527000
+150.19022815,-35.71749106,1.979000
+150.19015563,-35.71732241,1.740170
+150.19019614,-35.71715886,1.439310
+150.19040360,-35.71711708,0.953427
+150.19062378,-35.71710214,0.864440
+150.19082202,-35.71703951,1.261000
+150.19078356,-35.71687761,1.611020
+150.19064675,-35.71673625,2.085000
+150.19051455,-35.71659189,1.490630
+150.19036171,-35.71646377,1.639000
+150.19021944,-35.71632754,1.973000
+150.19015518,-35.71615531,1.782000
+150.19000952,-35.71602848,1.572000
+150.18986725,-35.71590037,1.022000
+150.18967552,-35.71582390,1.797000
+150.18956461,-35.71566875,1.641000
+150.18944913,-35.71551638,1.246710
+150.18927200,-35.71540982,1.756840
+150.18909147,-35.71530680,1.209890
+150.18891124,-35.71520353,1.199920
+150.18876614,-35.71506921,2.014000
+150.18879497,-35.71490238,0.932218
+150.18862127,-35.71479333,1.033620
+150.18844717,-35.71468240,1.626110
+150.18827197,-35.71457264,1.363000
+150.18809129,-35.71446893,1.532000
+150.18792340,-35.71435184,0.927200
+150.18777084,-35.71422212,0.864900
+150.18763566,-35.71407966,1.518000
+150.18755756,-35.71391453,1.336440
+150.18764692,-35.71375715,1.642990
+150.18777025,-35.71360886,0.375846
+150.18763551,-35.71348535,1.610790
+150.18779641,-35.71347943,0.452166
+150.18797259,-35.71340469,0.205965
+150.18816988,-35.71347182,0.457954
+150.18834842,-35.71357792,0.129190
+150.18851894,-35.71369196,1.297210
+150.18868774,-35.71380810,1.295730
+150.18884487,-35.71393327,2.329630
+150.18902533,-35.71403708,2.329630
+150.18919932,-35.71414799,2.535000
+150.18937341,-35.71425858,2.800490
+150.18954552,-35.71437058,1.150330
+150.18973338,-35.71446128,0.720168
+150.18970156,-35.71434837,0.720168
+150.18952151,-35.71424394,2.508950
+150.18934565,-35.71413491,2.800490
+150.18917000,-35.71402562,2.229050
+150.18900019,-35.71391064,1.338170
+150.18884302,-35.71378413,1.338170
+150.18866301,-35.71367988,1.357610
+150.18848767,-35.71357052,1.297210
+150.18831874,-35.71345441,0.457954
+150.18814587,-35.71334223,0.224429
+150.18796093,-35.71324395,0.224429
+150.18777335,-35.71314881,0.838886
+150.18759146,-35.71304657,1.563000
+150.18741318,-35.71294017,1.685620
+150.18723930,-35.71282905,1.674810
+150.18706817,-35.71271509,1.848000
+150.18689503,-35.71260317,1.543880
+150.18672153,-35.71249162,1.777570
+150.18654901,-35.71237907,1.437150
+150.18637611,-35.71226695,2.090000
+150.18619557,-35.71216315,1.900180
+150.18601627,-35.71205792,1.544560
+150.18584277,-35.71194639,1.984980
+150.18567407,-35.71183006,1.929050
+150.18550284,-35.71171633,1.915880
+150.18533128,-35.71160300,2.703000
+150.18518914,-35.71146697,1.580280
+150.18499741,-35.71141560,1.877410
+150.18478601,-35.71146737,1.702630
+150.18457897,-35.71153015,2.402840
+150.18437678,-35.71160261,1.459510
+150.18416604,-35.71165101,1.300310
+150.18396994,-35.71157824,1.260620
+150.18379313,-35.71147024,1.972000
+150.18362420,-35.71135436,1.598680
+150.18345409,-35.71124053,1.508000
+150.18327799,-35.71113366,1.979320
+150.18314087,-35.71099253,1.753320
+150.18293976,-35.71092324,2.215630
+150.18275249,-35.71082817,1.462120
+150.18257752,-35.71071817,1.936060
+150.18241038,-35.71060060,2.125230
+150.18225762,-35.71047044,1.823480
+150.18209935,-35.71034473,1.823480
+150.18194432,-35.71021639,2.016830
+150.18181868,-35.71007378,1.961410
+150.18173774,-35.70990734,1.701000
+150.18161941,-35.70975589,2.368500
+150.18148857,-35.70961115,2.368500
+150.18131522,-35.70951980,2.029000
+150.18112453,-35.70945743,2.277700
+150.18093731,-35.70940351,2.077940
+150.18075258,-35.70930475,2.451000
+150.18057651,-35.70919591,2.095710
+150.18040061,-35.70908690,2.095710
+150.18022409,-35.70897865,1.876000
+150.18004076,-35.70887859,2.315000
+150.17986904,-35.70876674,1.879000
+150.17974136,-35.70862678,1.338270
+150.17964745,-35.70846533,1.869460
+150.17951756,-35.70832010,1.869460
+150.17941061,-35.70816261,2.048390
+150.17929440,-35.70800992,2.406000
+150.17923473,-35.70783672,2.128000
+150.17915280,-35.70766973,1.824000
+150.17907803,-35.70750029,1.886000
+150.17901078,-35.70732867,1.870040
+150.17894238,-35.70715737,1.759940
+150.17888340,-35.70698376,2.155390
+150.17882035,-35.70681114,1.674470
+150.17877879,-35.70663429,1.725770
+150.17873125,-35.70645882,1.658370
+150.17866156,-35.70628785,1.902920
+150.17859958,-35.70611520,1.789440
+150.17856034,-35.70593788,1.789440
+150.17854566,-35.70576354,1.417990
+150.17856441,-35.70562070,1.701520
+150.17835817,-35.70559810,1.794000
+150.17826433,-35.70546019,1.754000
+150.17815399,-35.70530548,1.766390
+150.17806524,-35.70514058,1.985000
+150.17797419,-35.70497670,1.653240
+150.17788667,-35.70481212,1.244180
+150.17780706,-35.70464458,1.633490
+150.17770600,-35.70448525,1.633490
+150.17759341,-35.70433022,2.035000
+150.17752441,-35.70415924,1.931860
+150.17744509,-35.70399112,2.162000
+150.17737231,-35.70382101,1.838850
+150.17731548,-35.70364812,1.505110
+150.17722091,-35.70348570,2.826000
+150.17722197,-35.70330644,3.608000
+150.17727001,-35.70315060,1.486640
+150.21443099,-35.73593647,0.744524
Index: /misc/tools/xyz2kmz/installer/README
===================================================================
--- /misc/tools/xyz2kmz/installer/README	(revision 7757)
+++ /misc/tools/xyz2kmz/installer/README	(revision 7757)
@@ -0,0 +1,7 @@
+To create a Windows installer:
+
+1. Copy all *.py, *.txt, *.bat and *.ico files from parent directory to here
+2. Right-click on xyz2kmz.nsi and choose 'Compile NSIS Suite'
+
+This should generate xyz2kmz_x.x.exe.  You need to have installed
+the NSIS system (from http://nsis.sourceforge.net).
Index: /misc/tools/xyz2kmz/installer/README.txt
===================================================================
--- /misc/tools/xyz2kmz/installer/README.txt	(revision 7757)
+++ /misc/tools/xyz2kmz/installer/README.txt	(revision 7757)
@@ -0,0 +1,27 @@
+This is a program to convert a CSV file of X, Y and Z values into a
+KMZ file that contains 'extruded' bars on each X,Y point, with height
+and colour of the bar coded to Z.
+
+Usage: xyz2kmz [<options>] <xyz_file>
+
+This will create file 'xyz_file.kmz' in the current directory.
+
+The options are:
+    -a          run generated file through Google Earth
+                (default is not to)
+    -f          generate formatted KML files
+                (default is not formatted, ie, compact)
+    -k          create a KML file instead of a KMZ
+                (default is KMZ data)
+    -l <args>   set the 'look at' point
+                   <args> is 'lon,lat,alt,head,tilt'
+                where lon and lat are in decimal degrees
+                      alt is altitude in meters (above MSL)
+                      head is heading in decimal degrees
+                      tilt is in decimal degrees (0 down, 180 up)
+                eg: -l100.0,-35.6,1000,217,30
+                (default is a programmatic guess)
+    -s <scale>  sets scale of vertical extrusion
+                (default is 50)
+    -d <delta>  sets lon/lat 'width' of bars (degrees)
+                (default is 0.0001)
Index: /misc/tools/xyz2kmz/installer/xyz2kmz.bat
===================================================================
--- /misc/tools/xyz2kmz/installer/xyz2kmz.bat	(revision 7757)
+++ /misc/tools/xyz2kmz/installer/xyz2kmz.bat	(revision 7757)
@@ -0,0 +1,3 @@
+rem Batch file to run xyz2kmz under Xp/Win7
+
+python "C:\Program Files\xyz2kmz\xyz2kmz.py" %*
Index: /misc/tools/xyz2kmz/installer/xyz2kmz.nsi
===================================================================
--- /misc/tools/xyz2kmz/installer/xyz2kmz.nsi	(revision 7757)
+++ /misc/tools/xyz2kmz/installer/xyz2kmz.nsi	(revision 7757)
@@ -0,0 +1,44 @@
+!define PRODUCT_NAME "xyz2kmz"
+!define PRODUCT_VERSION "0.2"
+!define ICON_FILE "xyz2kmz.ico"
+
+Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
+OutFile "${PRODUCT_NAME}_${PRODUCT_VERSION}.exe"
+InstallDir $PROGRAMFILES\${PRODUCT_NAME}
+Page directory
+Page instfiles
+Icon ${ICON_FILE}
+
+Section "Install"
+   SetOutPath $INSTDIR
+   File xyz2kmz.nsi
+   File xyz2kmz.py
+   File xyz2kmz.bat
+   File xyz2kmz.ico
+   File README.txt
+   CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
+   CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
+#   CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.py" "" "$INSTDIR\${PRODUCT_NAME}.py" 0
+   CopyFiles "$INSTDIR\${PRODUCT_NAME}.bat" "$WINDIR\${PRODUCT_NAME}.bat"
+#   CreateShortCut "$WINDIR\${PRODUCT_NAME}.bat" "$INSTDIR\${PRODUCT_NAME}.bat" "" "$INSTDIR\${PRODUCT_NAME}.bat" 0
+   WriteUninstaller "$INSTDIR\Uninstall.exe"
+SectionEnd
+
+UninstallText "This will uninstall ${PRODUCT_NAME} ${PRODUCT_VERSION}."
+ 
+!ifdef ICON_FILE
+UninstallIcon "${ICON_FILE}"
+!endif
+ 
+Section "Uninstall"
+   Delete "$INSTDIR\*.nsi"    
+   Delete "$INSTDIR\*.py"    
+   Delete "$INSTDIR\*.ico"    
+   Delete "$INSTDIR\*.exe"    
+   Delete "$INSTDIR\*.bat"    
+   Delete "$INSTDIR\*.txt"    
+   Delete "$WINDIR\${PRODUCT_NAME}.bat"
+   RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}\*.*"
+   RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}"
+   RMDir /r "$INSTDIR"
+SectionEnd
Index: /misc/tools/xyz2kmz/installer/xyz2kmz.py
===================================================================
--- /misc/tools/xyz2kmz/installer/xyz2kmz.py	(revision 7757)
+++ /misc/tools/xyz2kmz/installer/xyz2kmz.py	(revision 7757)
@@ -0,0 +1,624 @@
+#!/usr/bin/env python
+
+"""
+This is a program to convert a CSV file of X, Y and Z values into a
+KMZ file that contains 'extruded' bars on each X,Y point, with height
+and colour of the bar coded to Z.
+
+Usage: xyz2kmz [<options>] <xyz_file>
+
+This will create file 'xyz_file.kmz' in the current directory.
+
+The options are:
+    -a          run Google Earth on the result
+                (default is not to run)
+    -f          generate formatted KML files
+                (default is not formatted, ie, compact)
+    -k          create a KML file instead of a KMZ
+                (default is KMZ data)
+    -l <args>   set the 'look at' point
+                   <args> is 'lon,lat,alt,head,tilt'
+                where lon and lat are in decimal degrees
+                      alt is altitude in meters (above MSL)
+                      head is heading in decimal degrees
+                      tilt is in decimal degrees (0 down, 180 up)
+                eg: -l100.0,-35.6,1000,217,30
+                (default is a programmatic guess)
+    -s <scale>  sets scale of vertical extrusion
+                (default is 50)
+    -d <delta>  sets lon/lat 'width' of bars (degrees)
+                (default is 0.0001)
+"""
+
+
+import sys
+import os
+import getopt
+import xml.etree.cElementTree as etree
+import re
+import time
+import shutil
+import tempfile
+import csv
+import zlib
+import zipfile
+
+Imported_PyEmbeddedImage = True
+try:
+    from wx.lib.embeddedimage import PyEmbeddedImage
+except ImportError:
+    Imported_PyEmbeddedImage = False
+
+
+PROG_NAME = 'xyz2kmz.py'
+VERSION = '0.2'
+
+# default values for LookAt
+DefaultAltitude = 10000
+DefaultHeading = 0
+DefaultTilt = 0
+
+# Size of KML square - width or height is 2 times this value
+DefaultLonLatDelta = 0.0001
+
+# Amount to scale Z values
+DefaultAmplitudeScale = 50
+
+# define the KML DTD URL
+KML_DTD = 'http://earth.google.com/kml/2.0'
+
+# URL for IconStyle
+IconStyleHref = 'HAZMAP_transparent.png'
+
+# RE expression to replace multiple spaces with one space
+RE_SpacesReplace = ' +'
+
+# global to control verbosity
+Verbose = False
+
+
+TmpDir = '/tmp'
+
+
+def log(msg=''):
+    """Simple log routine."""
+
+    if Verbose:
+        print(msg)
+
+
+################################################################################
+# Data to create a transparent PNG file.
+################################################################################
+
+TransparentPNG = \
+        ('\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52'
+        '\x00\x00\x00\x01\x00\x00\x00\x01\x08\x06\x00\x00\x00\x1f\x15\xc4'
+        '\x89\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00'
+        '\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93'
+        '\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13'
+        '\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xd9\x07'
+        '\x11\x04\x06\x14\xe8\xe9\xd0\x8a\x00\x00\x00\x19\x74\x45\x58\x74'
+        '\x43\x6f\x6d\x6d\x65\x6e\x74\x00\x43\x72\x65\x61\x74\x65\x64\x20'
+        '\x77\x69\x74\x68\x20\x47\x49\x4d\x50\x57\x81\x0e\x17\x00\x00\x00'
+        '\x0d\x49\x44\x41\x54\x08\xd7\x63\x60\x60\x60\x60\x00\x00\x00\x05'
+        '\x00\x01\x5e\xf3\x2a\x3a\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42'
+        '\x60\x82')
+
+################################################################################
+# This code is to fudge around the problem of xml.etree.ElementTree not
+# handling CDATA properly.
+#
+# Got this from:
+# http://stackoverflow.com/questions/174890/how-to-output-cdata-using-elementtree
+################################################################################
+
+def CDATA(text=None):
+    element = etree.Element(CDATA)
+    element.text = text
+    return element
+
+class ElementTreeCDATA(etree.ElementTree):
+    def _write(self, file, node, encoding, namespaces):
+        if node.tag is CDATA:
+            text = node.text.encode(encoding)
+            file.write("<![CDATA[%s]]>" % text)
+        else:
+            etree.ElementTree._write(self, file, node, encoding, namespaces)
+
+################################################################################
+# End of fudge.
+################################################################################
+
+def colour(value, maximum):
+    '''A function to map a value in a range [0, maximum] to a colour.
+
+    Returns a tuple (red, blue, green) where the colour values are
+    in the range [0, 255].
+    '''
+
+    # red at maximum, shading to green at minimum, yellow in the middle.
+    # this approximates the scheme used in the GMT-based code.
+    scaled_value = float(value)/maximum        # in range [0.0, 1.0]
+    red = min(255, int(256*2 * scaled_value))
+    green = min(255, int(256*2 * (1.0-scaled_value)))
+    blue = 0
+
+    return (red, green, blue)
+
+
+def xyz2kmz(file, format, kml, lookat, scale, delta, auto):
+    '''Create a KML file from a CSV file.
+
+    file     path to the input file
+    compact  True if KML/KMZ is to be compact (not pretty-printed)
+    kml      True if KML file is to be made, not KMZ
+    lookat   dictionary of LookAt info
+    scale    vertical bar extrusion scale
+    delta    lon/lat width of bars
+    auto     True if Google Earth should run by default
+    '''
+
+    # get CSV data
+    data = read_CSV_file(file)
+
+    # create a temporary transparent PNG
+    (tmp_fd, tmp_name) = tempfile.mkstemp('.png')
+    hold_it = open(tmp_name, 'wb')
+    hold_it.write(TransparentPNG)
+    hold_it.flush()
+
+    # get max and min wave height values
+    wh_max = 0.0
+    for (_, _, wh) in data:
+        wh_max = max(wh_max, wh)
+    wh_min = 0.0
+    for (_, _, wh) in data:
+        wh_min = min(wh_min, wh)
+
+    # get set of style amplitudes
+    # we clamp amplitudes to 3 decimal places
+    styles = set()
+    for (_, _, wh) in data:
+        styles.add(get_style_key(wh))
+
+    # guess at a LookAt point if user didn't supply
+    if not lookat:
+        view_point = get_view_point(data)
+        lookat = {}
+        (lookat['lon'], lookat['lat']) = view_point
+        lookat['alt'] = DefaultAltitude
+        lookat['head'] = DefaultHeading
+        lookat['tilt'] = DefaultTilt
+
+    # now generate the KML file
+    (root, doc) = gen_KML_header(file, lookat)
+    gen_KML_styles(doc, styles, wh_max, wh_min, tmp_name)
+    folder = gen_KML_placemarks(doc, data, delta)
+
+    # write output file
+    if file.endswith('.csv'):
+        file = file[:-4]
+    kmz = write_output_file(file, root, format, kml, tmp_name)
+
+    # try to start Google Earth
+    if auto:
+        try:
+            if sys.platform == 'win32':
+                os.startfile(kmz)
+            else:
+                subprocess.Popen(['xdg-open', kmz])
+        except:
+            print("Sorry, Google Earth doesn't appear to be installed.")
+
+
+def get_view_point(data):
+    """Estimate a view point given CSV data.
+
+    data  an iterable of (x, y, z) data
+
+    Return (x, y) representing a reasonable Google Earth view point.
+    A good guess might be the centre of the points rectangle.
+    """
+
+    # figure out points extent
+    min_lon = 1000.0
+    max_lon = -1000.0
+    min_lat = 1000.0
+    max_lat = -1000.0
+    for (lon, lat, _) in data:
+        min_lon = min(min_lon, lon)
+        max_lon = max(max_lon, lon)
+        min_lat = min(min_lat, lat)
+        max_lat = max(max_lat, lat)
+
+    return ((max_lon+min_lon)/2, (max_lat+min_lat)/2)
+
+
+def encode_wh_colour(wh, wh_max, wh_min):
+    '''Encode an amplitude into a KML colour.
+   
+    amp      amplitude to encode
+    wh_max   maximum amplitude
+    wh_min   minimum amplitude
+
+    Returns hex-encoded string of KML colour: BGR.
+    '''
+
+    
+    (red, green, blue) = colour(wh-wh_min, wh_max-wh_min)
+
+    red = '%02x' % red
+    green = '%02x' % green
+    blue = '%02x' % blue
+
+    return blue+green+red
+
+
+def encode_wh_height(wh):
+    '''Encode a waveheight into a KML extrusion height.'''
+
+    return wh * DefaultAmplitudeScale
+
+
+def gen_KML_header(file, lookat):
+    '''Create the header XML (minus header line).
+
+    file    path to the input data file
+    lookat  the LookAt data
+
+    Return (root, doc) tuple where
+    root   is a reference to the root of the XML tree
+    doc    is a reference to the <Document> object, which will be added to.
+    '''
+
+    # create doc name string
+    KML_doc_name = 'Visualisation of data contained in file %s' % file
+    KML_doc_description = ('Converted from file %s on %s by %s v%s'
+                           % (file, time.asctime(), PROG_NAME, VERSION))
+
+    root = etree.Element('kml', xmlns=KML_DTD)
+    doc = etree.SubElement(root, 'Document')
+    etree.SubElement(doc, 'name').text = KML_doc_name
+    etree.SubElement(doc, 'open').text = '0'
+    etree.SubElement(doc, 'description').text = \
+            '<![CDATA[%s]]>' % KML_doc_description
+
+    look = etree.SubElement(doc, 'LookAt')
+    etree.SubElement(look, 'longitude').text = '%.3f' % lookat['lon']
+    etree.SubElement(look, 'latitude').text = '%.3f' % lookat['lat']
+    etree.SubElement(look, 'altitude').text = '%d' % int(lookat['alt'])
+    etree.SubElement(look, 'heading').text = '%d' % int(lookat['head'])
+    etree.SubElement(look, 'tilt').text = '%d' % int(lookat['tilt'])
+    etree.SubElement(look, 'altitudeMode').text = 'absolute'
+
+    return (root, doc)
+
+
+def gen_KML_placemarks(root, data, delta):
+    '''Add Placemark tags to the XML body.
+
+    root   the root of XML tree to append tags to
+    data   List of tuples (lon, lat, wh)
+    delta  the 'delta' value for bar width
+
+    Return the root of the <Folder> tag.
+    '''
+
+    # start the sub-tree
+    folder_root =  etree.SubElement(root, 'Folder')
+    etree.SubElement(folder_root, 'name').text = 'CSV points'
+    etree.SubElement(folder_root, 'open').text = '0'
+
+    # generate the Placemark tags
+    for p in data:
+        (lon, lat, wh) = p
+
+        # ensure longitude in range [-180, 180]
+        if lon > 180.0:
+            lon -= 360.0
+
+        height = encode_wh_height(wh)
+        placemark = etree.SubElement(folder_root, 'Placemark')
+        etree.SubElement(placemark, 'name')
+        text1 = ('Wave height for hazard point at lon %.3f&deg; lat %.3f&deg;'
+                 % (lon, lat))
+        text2 = 'Wave height = %.2f metres' % wh
+        etree.SubElement(placemark, 'description').text = \
+            ('<![CDATA[<table width="370" padding="1">'
+             '<tr><td><center>%s</center></td></tr>'
+             '<tr><td><center>%s</center></td></tr>'
+             '</table>]]>'
+             % (text1, text2))
+        etree.SubElement(placemark, 'styleUrl').text = \
+                ('#ID_%s' % get_style_key(wh))
+        multigeometry = etree.SubElement(placemark, 'MultiGeometry')
+        polygon = etree.SubElement(multigeometry, 'Polygon')
+        etree.SubElement(polygon, 'extrude').text = '1'
+        etree.SubElement(polygon, 'altitudeMode').text = 'relativeToGround'
+        outerboundaryis = etree.SubElement(polygon, 'outerBoundaryIs')
+        linearring = etree.SubElement(outerboundaryis, 'LinearRing')
+        coordinates = etree.SubElement(linearring, 'coordinates')
+        coordinates.text = ('%.5f,%.5f,%.1f\n'
+                            % (lon-delta, lat-delta, height))
+        coordinates.text += ('%.5f,%.5f,%.1f\n'
+                             % (lon-delta, lat+delta, height))
+        coordinates.text += ('%.5f,%.5f,%.1f\n'
+                             % (lon+delta, lat+delta, height))
+        coordinates.text += ('%.5f,%.5f,%.1f\n'
+                             % (lon+delta, lat-delta, height))
+        coordinates.text += ('%.5f,%.5f,%.1f\n'
+                             % (lon-delta, lat-delta, height))
+
+        point = etree.SubElement(multigeometry, 'Point')
+        #etree.SubElement(point, 'Visibility').text = '1'
+        etree.SubElement(point, 'altitudeMode').text = 'relativeToGround'
+        etree.SubElement(point, 'coordinates').text = \
+                '%s,%s,%.1f' % (str(lon), str(lat), height)
+
+    return folder_root
+
+
+def gen_KML_styles(root, styles, wh_max, wh_min, trans_png):
+    '''Create the KML style elements.
+
+    root       root of the XML <Document> element
+    styles     an iterable of the style strings (eg, '0.319')
+    wh_max     the maximum amplitude
+    wh_min     the minimum amplitude
+    trans_png  path to the transparent PNG used as style icon
+    '''
+
+    for s in styles:
+        # convert style string (really clamped amplitude) into colour
+        colour = encode_wh_colour(float(s), wh_max, wh_min)
+
+        style_root = etree.SubElement(root, 'Style', id='ID_%s' % s)
+
+        linestyle = etree.SubElement(style_root, 'LineStyle')
+        etree.SubElement(linestyle, 'color').text = 'FF%s' % colour
+        etree.SubElement(linestyle, 'width').text = '0.4'
+
+        polystyle = etree.SubElement(style_root, 'PolyStyle')
+        etree.SubElement(polystyle, 'outline').text = '1'
+        etree.SubElement(polystyle, 'fill').text = '1'
+        etree.SubElement(polystyle, 'color').text = 'AA%s' % colour
+
+        iconstyle = etree.SubElement(style_root, 'IconStyle')
+        etree.SubElement(iconstyle, 'scale').text = '0.5'
+        icon = etree.SubElement(iconstyle, 'Icon')
+        etree.SubElement(icon, 'href').text = IconStyleHref
+
+        balloonstyle = etree.SubElement(style_root, 'BalloonStyle')
+        etree.SubElement(balloonstyle, 'bgColor').text = 'FFA56A'
+
+
+def gen_KML_target_point(haz_name, root, point, wave_height, period):
+    '''Create the KML target point elements.
+
+    haz_name type of hazard ('low' or 'high')
+    root     root of the XML <Document> element
+    point    the reporting point (lon, lat)
+    period   the return period in years
+    '''
+
+    # create target point style element
+    style_root = etree.SubElement(root, 'Style', id='ID_%s' % TargetStyleID)
+
+    linestyle = etree.SubElement(style_root, 'LineStyle')
+    etree.SubElement(linestyle, 'color').text = 'FF%s' % TargetStyleColour
+    etree.SubElement(linestyle, 'width').text = '0.4'
+
+    polystyle = etree.SubElement(style_root, 'PolyStyle')
+    etree.SubElement(polystyle, 'outline').text = '1'
+    etree.SubElement(polystyle, 'fill').text = '1'
+    etree.SubElement(polystyle, 'color').text = 'FF%s' % TargetStyleColour
+
+    iconstyle = etree.SubElement(style_root, 'IconStyle')
+    etree.SubElement(iconstyle, 'scale').text = '0.1'
+    icon = etree.SubElement(iconstyle, 'Icon')
+    etree.SubElement(icon, 'href').text = IconStyleHref
+
+    balloonstyle = etree.SubElement(style_root, 'BalloonStyle')
+    etree.SubElement(balloonstyle, 'bgColor').text = 'FFA56A'
+
+    # now create place marker
+    (lon, lat) = point
+
+    # ensure longitude in range [-180, 180]
+    if lon > 180.0:
+        lon -= 360.0
+
+    height = 100.0
+    placemark = etree.SubElement(root, 'Placemark')
+    etree.SubElement(placemark, 'name').text = 'Hazard Point'
+    where = 'Point at lon %.2f&deg; lat %.2f&deg;' % (lon, lat)
+    scenario1 = 'Wave height = %.1f metres' % wave_height
+    scenario2 = ('%s hazard, return period = %d years'
+                % (haz_name.capitalize(), period))
+    etree.SubElement(placemark, 'description').text = \
+        ('<![CDATA[<table width="250" padding="1">'
+         '<tr><td><center><h4>%s</h4></center></td></tr>'
+         '<tr><td><center>%s</center></td></tr>'
+         '<tr><td><center>%s</center></td></tr>'
+         '</table>]]>'
+         % (where, scenario1, scenario2))
+    etree.SubElement(placemark, 'styleUrl').text = ('#ID_%s'
+                                                    % TargetStyleID)
+    multigeometry = etree.SubElement(placemark, 'MultiGeometry')
+    polygon = etree.SubElement(multigeometry, 'Polygon')
+    etree.SubElement(polygon, 'extrude').text = '1'
+    etree.SubElement(polygon, 'altitudeMode').text = 'relativeToGround'
+    outerboundaryis = etree.SubElement(polygon, 'outerBoundaryIs')
+    linearring = etree.SubElement(outerboundaryis, 'LinearRing')
+    coordinates = etree.SubElement(linearring, 'coordinates')
+    coordinates.text = ('%.5f,%.5f,%.1f\n'
+                        % (lon-DefaultLonLatDelta*2, lat-DefaultLonLatDelta*2, height))
+    coordinates.text += ('%.5f,%.5f,%.1f\n'
+                         % (lon-DefaultLonLatDelta*2, lat+DefaultLonLatDelta*2, height))
+    coordinates.text += ('%.5f,%.5f,%.1f\n'
+                         % (lon+DefaultLonLatDelta*2, lat+DefaultLonLatDelta*2, height))
+    coordinates.text += ('%.5f,%.5f,%.1f\n'
+                         % (lon+DefaultLonLatDelta*2, lat-DefaultLonLatDelta*2, height))
+    coordinates.text += ('%.5f,%.5f,%.1f\n'
+                         % (lon-DefaultLonLatDelta*2, lat-DefaultLonLatDelta*2, height))
+
+    point = etree.SubElement(multigeometry, 'Point')
+    #etree.SubElement(point, 'Visibility').text = '1'
+    etree.SubElement(point, 'altitudeMode').text = 'relativeToGround'
+    etree.SubElement(point, 'coordinates').text = \
+            '%s,%s,%.1f' % (str(lon), str(lat), height)
+
+
+def get_style_key(amp):
+    '''Return a style key given an amplitude.'''
+
+    return '%.3f' % amp
+
+
+def read_CSV_file(path):
+    '''Read CSV data from file.
+
+    path path to input file
+
+    Returns list of tuples (lon, lat, <z_value>) where values are float.
+    '''
+
+    result = []
+    f = open(path, 'rb')
+    for (lon, lat, z) in csv.reader(f):
+        result.append((float(lon), float(lat), float(z)))
+    f.close()
+
+    return result
+
+
+def write_output_file(out_path, root, format, kml, trans_png):
+    '''Write out XML as *.kml file or *.kmz file.
+
+    out_path   path to output file (missing final extension)
+    root       reference top the root of the XML
+    format     True if the XML is to be pretty-printed
+    kml        True if the out is a KML file, not KMZ
+    trans_png  path to the style PNG
+
+    Convert &...; entities since the 'etree' module handling of
+    CDATA is not as I expect.  I'm strange, perhaps?
+    '''
+
+    # convert XML to string
+    if format:
+        XML_indent(root)
+
+    tree_root = etree.ElementTree(root)
+    xml = etree.tostring(root, 'UTF-8')
+
+    # replace &..; entities
+    xml = xml.replace('&lt;', '<')
+    xml = xml.replace('&gt;', '>')
+
+    # make KML filename
+    tmp_path = tempfile.mkdtemp()
+    kml_file = os.path.join(tmp_path, '%s.kml' % out_path)
+
+    # write the KML file
+    f = open(kml_file, 'w')
+    f.write(xml)
+    f.close()
+
+    if kml:
+        shutil.copy(kml_file, '.')
+        return kml_file
+    else:
+        # create KMZ file
+        zout = zipfile.ZipFile(out_path+'.kmz', 'w', zipfile.ZIP_DEFLATED)
+        zout.write(kml_file, os.path.basename(kml_file))
+        zout.write(trans_png, os.path.basename(IconStyleHref))
+        zout.close()
+        return out_path+'.kmz'
+
+
+def XML_indent(elem, level=0):
+    i = "\n" + level*"  "
+    if len(elem):
+        if not elem.text or not elem.text.strip():
+            elem.text = i + "  "
+        if not elem.tail or not elem.tail.strip():
+            elem.tail = i
+        for elem in elem:
+            XML_indent(elem, level+1)
+        if not elem.tail or not elem.tail.strip():
+            elem.tail = i
+    else:
+        if level and (not elem.tail or not elem.tail.strip()):
+            elem.tail = i
+
+################################################################################
+
+if __name__ == '__main__':
+    def usage(msg=None):
+        if msg:
+            print('%s\n%s\n%s' % ('-'*72, msg, '-'*72))
+
+        print(__doc__)
+
+
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], 'afkl:s:d:h',
+                                   ['auto', 'format', 'kml', 'lookat',
+                                    'scale', 'delta','help',])
+    except getopt.error, msg:
+        usage('Error: %s' % str(msg))
+        sys.exit(10)
+
+    auto = False
+    format = True
+    kml = False
+    lookat = None
+    scale = DefaultAmplitudeScale
+    delta = DefaultLonLatDelta
+    for (opt, optarg) in opts:
+        if opt in ['-a', '--auto']:
+            auto = True
+        elif opt in ['-f', '--format']:
+            format = True
+        elif opt in ['-k', '--kml']:
+            kml = True
+        elif opt in ['-l', '--lookat']:
+            lookat = optarg
+        elif opt in ['-s', '--scale']:
+            scale = float(optarg)
+        elif opt in ['-d', '--delta']:
+            delta = float(optarg)
+        elif opt in ['-h', '--help']:
+            usage()
+            sys.exit(0)
+
+    if len(args) != 1:
+        usage()
+        sys.exit(10)
+
+    index = 0
+    csv_file = args[index]; index += 1
+
+    # convert lookat string to dictionary
+    if lookat:
+        fields = lookat.split(',')
+        if len(fields) != 5:
+            usage()
+            sys.exit(10)
+        lookat = {}
+        lookat['lon'] = float(fields[0])
+        lookat['lat'] = float(fields[1])
+        lookat['alt'] = float(fields[2])
+        lookat['head'] = float(fields[3])
+        lookat['tilt'] = float(fields[4])
+
+    # check that the input file is there
+    if not os.path.isfile(csv_file):
+        print("Input file %s doesn't exist?" % csv_file)
+        sys.exit(10)
+
+    xyz2kmz(csv_file, format, kml, lookat, scale, delta, auto)
+    sys.exit(0)
+
Index: /misc/tools/xyz2kmz/xyz2kmz.bat
===================================================================
--- /misc/tools/xyz2kmz/xyz2kmz.bat	(revision 7757)
+++ /misc/tools/xyz2kmz/xyz2kmz.bat	(revision 7757)
@@ -0,0 +1,3 @@
+rem Batch file to run xyz2kmz under Xp/Win7
+
+python "C:\Program Files\xyz2kmz\xyz2kmz.py" %*
Index: /misc/tools/xyz2kmz/xyz2kmz.py
===================================================================
--- /misc/tools/xyz2kmz/xyz2kmz.py	(revision 7757)
+++ /misc/tools/xyz2kmz/xyz2kmz.py	(revision 7757)
@@ -0,0 +1,624 @@
+#!/usr/bin/env python
+
+"""
+This is a program to convert a CSV file of X, Y and Z values into a
+KMZ file that contains 'extruded' bars on each X,Y point, with height
+and colour of the bar coded to Z.
+
+Usage: xyz2kmz [<options>] <xyz_file>
+
+This will create file 'xyz_file.kmz' in the current directory.
+
+The options are:
+    -a          run Google Earth on the result
+                (default is not to run)
+    -f          generate formatted KML files
+                (default is not formatted, ie, compact)
+    -k          create a KML file instead of a KMZ
+                (default is KMZ data)
+    -l <args>   set the 'look at' point
+                   <args> is 'lon,lat,alt,head,tilt'
+                where lon and lat are in decimal degrees
+                      alt is altitude in meters (above MSL)
+                      head is heading in decimal degrees
+                      tilt is in decimal degrees (0 down, 180 up)
+                eg: -l100.0,-35.6,1000,217,30
+                (default is a programmatic guess)
+    -s <scale>  sets scale of vertical extrusion
+                (default is 50)
+    -d <delta>  sets lon/lat 'width' of bars (degrees)
+                (default is 0.0001)
+"""
+
+
+import sys
+import os
+import getopt
+import xml.etree.cElementTree as etree
+import re
+import time
+import shutil
+import tempfile
+import csv
+import zlib
+import zipfile
+
+Imported_PyEmbeddedImage = True
+try:
+    from wx.lib.embeddedimage import PyEmbeddedImage
+except ImportError:
+    Imported_PyEmbeddedImage = False
+
+
+PROG_NAME = 'xyz2kmz.py'
+VERSION = '0.2'
+
+# default values for LookAt
+DefaultAltitude = 10000
+DefaultHeading = 0
+DefaultTilt = 0
+
+# Size of KML square - width or height is 2 times this value
+DefaultLonLatDelta = 0.0001
+
+# Amount to scale Z values
+DefaultAmplitudeScale = 50
+
+# define the KML DTD URL
+KML_DTD = 'http://earth.google.com/kml/2.0'
+
+# URL for IconStyle
+IconStyleHref = 'HAZMAP_transparent.png'
+
+# RE expression to replace multiple spaces with one space
+RE_SpacesReplace = ' +'
+
+# global to control verbosity
+Verbose = False
+
+
+TmpDir = '/tmp'
+
+
+def log(msg=''):
+    """Simple log routine."""
+
+    if Verbose:
+        print(msg)
+
+
+################################################################################
+# Data to create a transparent PNG file.
+################################################################################
+
+TransparentPNG = \
+        ('\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52'
+        '\x00\x00\x00\x01\x00\x00\x00\x01\x08\x06\x00\x00\x00\x1f\x15\xc4'
+        '\x89\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00'
+        '\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93'
+        '\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13'
+        '\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xd9\x07'
+        '\x11\x04\x06\x14\xe8\xe9\xd0\x8a\x00\x00\x00\x19\x74\x45\x58\x74'
+        '\x43\x6f\x6d\x6d\x65\x6e\x74\x00\x43\x72\x65\x61\x74\x65\x64\x20'
+        '\x77\x69\x74\x68\x20\x47\x49\x4d\x50\x57\x81\x0e\x17\x00\x00\x00'
+        '\x0d\x49\x44\x41\x54\x08\xd7\x63\x60\x60\x60\x60\x00\x00\x00\x05'
+        '\x00\x01\x5e\xf3\x2a\x3a\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42'
+        '\x60\x82')
+
+################################################################################
+# This code is to fudge around the problem of xml.etree.ElementTree not
+# handling CDATA properly.
+#
+# Got this from:
+# http://stackoverflow.com/questions/174890/how-to-output-cdata-using-elementtree
+################################################################################
+
+def CDATA(text=None):
+    element = etree.Element(CDATA)
+    element.text = text
+    return element
+
+class ElementTreeCDATA(etree.ElementTree):
+    def _write(self, file, node, encoding, namespaces):
+        if node.tag is CDATA:
+            text = node.text.encode(encoding)
+            file.write("<![CDATA[%s]]>" % text)
+        else:
+            etree.ElementTree._write(self, file, node, encoding, namespaces)
+
+################################################################################
+# End of fudge.
+################################################################################
+
+def colour(value, maximum):
+    '''A function to map a value in a range [0, maximum] to a colour.
+
+    Returns a tuple (red, blue, green) where the colour values are
+    in the range [0, 255].
+    '''
+
+    # red at maximum, shading to green at minimum, yellow in the middle.
+    # this approximates the scheme used in the GMT-based code.
+    scaled_value = float(value)/maximum        # in range [0.0, 1.0]
+    red = min(255, int(256*2 * scaled_value))
+    green = min(255, int(256*2 * (1.0-scaled_value)))
+    blue = 0
+
+    return (red, green, blue)
+
+
+def xyz2kmz(file, format, kml, lookat, scale, delta, auto):
+    '''Create a KML file from a CSV file.
+
+    file     path to the input file
+    compact  True if KML/KMZ is to be compact (not pretty-printed)
+    kml      True if KML file is to be made, not KMZ
+    lookat   dictionary of LookAt info
+    scale    vertical bar extrusion scale
+    delta    lon/lat width of bars
+    auto     True if Google Earth should run by default
+    '''
+
+    # get CSV data
+    data = read_CSV_file(file)
+
+    # create a temporary transparent PNG
+    (tmp_fd, tmp_name) = tempfile.mkstemp('.png')
+    hold_it = open(tmp_name, 'wb')
+    hold_it.write(TransparentPNG)
+    hold_it.flush()
+
+    # get max and min wave height values
+    wh_max = 0.0
+    for (_, _, wh) in data:
+        wh_max = max(wh_max, wh)
+    wh_min = 0.0
+    for (_, _, wh) in data:
+        wh_min = min(wh_min, wh)
+
+    # get set of style amplitudes
+    # we clamp amplitudes to 3 decimal places
+    styles = set()
+    for (_, _, wh) in data:
+        styles.add(get_style_key(wh))
+
+    # guess at a LookAt point if user didn't supply
+    if not lookat:
+        view_point = get_view_point(data)
+        lookat = {}
+        (lookat['lon'], lookat['lat']) = view_point
+        lookat['alt'] = DefaultAltitude
+        lookat['head'] = DefaultHeading
+        lookat['tilt'] = DefaultTilt
+
+    # now generate the KML file
+    (root, doc) = gen_KML_header(file, lookat)
+    gen_KML_styles(doc, styles, wh_max, wh_min, tmp_name)
+    folder = gen_KML_placemarks(doc, data, delta)
+
+    # write output file
+    if file.endswith('.csv'):
+        file = file[:-4]
+    kmz = write_output_file(file, root, format, kml, tmp_name)
+
+    # try to start Google Earth
+    if auto:
+        try:
+            if sys.platform == 'win32':
+                os.startfile(kmz)
+            else:
+                subprocess.Popen(['xdg-open', kmz])
+        except:
+            print("Sorry, Google Earth doesn't appear to be installed.")
+
+
+def get_view_point(data):
+    """Estimate a view point given CSV data.
+
+    data  an iterable of (x, y, z) data
+
+    Return (x, y) representing a reasonable Google Earth view point.
+    A good guess might be the centre of the points rectangle.
+    """
+
+    # figure out points extent
+    min_lon = 1000.0
+    max_lon = -1000.0
+    min_lat = 1000.0
+    max_lat = -1000.0
+    for (lon, lat, _) in data:
+        min_lon = min(min_lon, lon)
+        max_lon = max(max_lon, lon)
+        min_lat = min(min_lat, lat)
+        max_lat = max(max_lat, lat)
+
+    return ((max_lon+min_lon)/2, (max_lat+min_lat)/2)
+
+
+def encode_wh_colour(wh, wh_max, wh_min):
+    '''Encode an amplitude into a KML colour.
+   
+    amp      amplitude to encode
+    wh_max   maximum amplitude
+    wh_min   minimum amplitude
+
+    Returns hex-encoded string of KML colour: BGR.
+    '''
+
+    
+    (red, green, blue) = colour(wh-wh_min, wh_max-wh_min)
+
+    red = '%02x' % red
+    green = '%02x' % green
+    blue = '%02x' % blue
+
+    return blue+green+red
+
+
+def encode_wh_height(wh):
+    '''Encode a waveheight into a KML extrusion height.'''
+
+    return wh * DefaultAmplitudeScale
+
+
+def gen_KML_header(file, lookat):
+    '''Create the header XML (minus header line).
+
+    file    path to the input data file
+    lookat  the LookAt data
+
+    Return (root, doc) tuple where
+    root   is a reference to the root of the XML tree
+    doc    is a reference to the <Document> object, which will be added to.
+    '''
+
+    # create doc name string
+    KML_doc_name = 'Visualisation of data contained in file %s' % file
+    KML_doc_description = ('Converted from file %s on %s by %s v%s'
+                           % (file, time.asctime(), PROG_NAME, VERSION))
+
+    root = etree.Element('kml', xmlns=KML_DTD)
+    doc = etree.SubElement(root, 'Document')
+    etree.SubElement(doc, 'name').text = KML_doc_name
+    etree.SubElement(doc, 'open').text = '0'
+    etree.SubElement(doc, 'description').text = \
+            '<![CDATA[%s]]>' % KML_doc_description
+
+    look = etree.SubElement(doc, 'LookAt')
+    etree.SubElement(look, 'longitude').text = '%.3f' % lookat['lon']
+    etree.SubElement(look, 'latitude').text = '%.3f' % lookat['lat']
+    etree.SubElement(look, 'altitude').text = '%d' % int(lookat['alt'])
+    etree.SubElement(look, 'heading').text = '%d' % int(lookat['head'])
+    etree.SubElement(look, 'tilt').text = '%d' % int(lookat['tilt'])
+    etree.SubElement(look, 'altitudeMode').text = 'absolute'
+
+    return (root, doc)
+
+
+def gen_KML_placemarks(root, data, delta):
+    '''Add Placemark tags to the XML body.
+
+    root   the root of XML tree to append tags to
+    data   List of tuples (lon, lat, wh)
+    delta  the 'delta' value for bar width
+
+    Return the root of the <Folder> tag.
+    '''
+
+    # start the sub-tree
+    folder_root =  etree.SubElement(root, 'Folder')
+    etree.SubElement(folder_root, 'name').text = 'CSV points'
+    etree.SubElement(folder_root, 'open').text = '0'
+
+    # generate the Placemark tags
+    for p in data:
+        (lon, lat, wh) = p
+
+        # ensure longitude in range [-180, 180]
+        if lon > 180.0:
+            lon -= 360.0
+
+        height = encode_wh_height(wh)
+        placemark = etree.SubElement(folder_root, 'Placemark')
+        etree.SubElement(placemark, 'name')
+        text1 = ('Wave height for hazard point at lon %.3f&deg; lat %.3f&deg;'
+                 % (lon, lat))
+        text2 = 'Wave height = %.2f metres' % wh
+        etree.SubElement(placemark, 'description').text = \
+            ('<![CDATA[<table width="370" padding="1">'
+             '<tr><td><center>%s</center></td></tr>'
+             '<tr><td><center>%s</center></td></tr>'
+             '</table>]]>'
+             % (text1, text2))
+        etree.SubElement(placemark, 'styleUrl').text = \
+                ('#ID_%s' % get_style_key(wh))
+        multigeometry = etree.SubElement(placemark, 'MultiGeometry')
+        polygon = etree.SubElement(multigeometry, 'Polygon')
+        etree.SubElement(polygon, 'extrude').text = '1'
+        etree.SubElement(polygon, 'altitudeMode').text = 'relativeToGround'
+        outerboundaryis = etree.SubElement(polygon, 'outerBoundaryIs')
+        linearring = etree.SubElement(outerboundaryis, 'LinearRing')
+        coordinates = etree.SubElement(linearring, 'coordinates')
+        coordinates.text = ('%.5f,%.5f,%.1f\n'
+                            % (lon-delta, lat-delta, height))
+        coordinates.text += ('%.5f,%.5f,%.1f\n'
+                             % (lon-delta, lat+delta, height))
+        coordinates.text += ('%.5f,%.5f,%.1f\n'
+                             % (lon+delta, lat+delta, height))
+        coordinates.text += ('%.5f,%.5f,%.1f\n'
+                             % (lon+delta, lat-delta, height))
+        coordinates.text += ('%.5f,%.5f,%.1f\n'
+                             % (lon-delta, lat-delta, height))
+
+        point = etree.SubElement(multigeometry, 'Point')
+        #etree.SubElement(point, 'Visibility').text = '1'
+        etree.SubElement(point, 'altitudeMode').text = 'relativeToGround'
+        etree.SubElement(point, 'coordinates').text = \
+                '%s,%s,%.1f' % (str(lon), str(lat), height)
+
+    return folder_root
+
+
+def gen_KML_styles(root, styles, wh_max, wh_min, trans_png):
+    '''Create the KML style elements.
+
+    root       root of the XML <Document> element
+    styles     an iterable of the style strings (eg, '0.319')
+    wh_max     the maximum amplitude
+    wh_min     the minimum amplitude
+    trans_png  path to the transparent PNG used as style icon
+    '''
+
+    for s in styles:
+        # convert style string (really clamped amplitude) into colour
+        colour = encode_wh_colour(float(s), wh_max, wh_min)
+
+        style_root = etree.SubElement(root, 'Style', id='ID_%s' % s)
+
+        linestyle = etree.SubElement(style_root, 'LineStyle')
+        etree.SubElement(linestyle, 'color').text = 'FF%s' % colour
+        etree.SubElement(linestyle, 'width').text = '0.4'
+
+        polystyle = etree.SubElement(style_root, 'PolyStyle')
+        etree.SubElement(polystyle, 'outline').text = '1'
+        etree.SubElement(polystyle, 'fill').text = '1'
+        etree.SubElement(polystyle, 'color').text = 'AA%s' % colour
+
+        iconstyle = etree.SubElement(style_root, 'IconStyle')
+        etree.SubElement(iconstyle, 'scale').text = '0.5'
+        icon = etree.SubElement(iconstyle, 'Icon')
+        etree.SubElement(icon, 'href').text = IconStyleHref
+
+        balloonstyle = etree.SubElement(style_root, 'BalloonStyle')
+        etree.SubElement(balloonstyle, 'bgColor').text = 'FFA56A'
+
+
+def gen_KML_target_point(haz_name, root, point, wave_height, period):
+    '''Create the KML target point elements.
+
+    haz_name type of hazard ('low' or 'high')
+    root     root of the XML <Document> element
+    point    the reporting point (lon, lat)
+    period   the return period in years
+    '''
+
+    # create target point style element
+    style_root = etree.SubElement(root, 'Style', id='ID_%s' % TargetStyleID)
+
+    linestyle = etree.SubElement(style_root, 'LineStyle')
+    etree.SubElement(linestyle, 'color').text = 'FF%s' % TargetStyleColour
+    etree.SubElement(linestyle, 'width').text = '0.4'
+
+    polystyle = etree.SubElement(style_root, 'PolyStyle')
+    etree.SubElement(polystyle, 'outline').text = '1'
+    etree.SubElement(polystyle, 'fill').text = '1'
+    etree.SubElement(polystyle, 'color').text = 'FF%s' % TargetStyleColour
+
+    iconstyle = etree.SubElement(style_root, 'IconStyle')
+    etree.SubElement(iconstyle, 'scale').text = '0.1'
+    icon = etree.SubElement(iconstyle, 'Icon')
+    etree.SubElement(icon, 'href').text = IconStyleHref
+
+    balloonstyle = etree.SubElement(style_root, 'BalloonStyle')
+    etree.SubElement(balloonstyle, 'bgColor').text = 'FFA56A'
+
+    # now create place marker
+    (lon, lat) = point
+
+    # ensure longitude in range [-180, 180]
+    if lon > 180.0:
+        lon -= 360.0
+
+    height = 100.0
+    placemark = etree.SubElement(root, 'Placemark')
+    etree.SubElement(placemark, 'name').text = 'Hazard Point'
+    where = 'Point at lon %.2f&deg; lat %.2f&deg;' % (lon, lat)
+    scenario1 = 'Wave height = %.1f metres' % wave_height
+    scenario2 = ('%s hazard, return period = %d years'
+                % (haz_name.capitalize(), period))
+    etree.SubElement(placemark, 'description').text = \
+        ('<![CDATA[<table width="250" padding="1">'
+         '<tr><td><center><h4>%s</h4></center></td></tr>'
+         '<tr><td><center>%s</center></td></tr>'
+         '<tr><td><center>%s</center></td></tr>'
+         '</table>]]>'
+         % (where, scenario1, scenario2))
+    etree.SubElement(placemark, 'styleUrl').text = ('#ID_%s'
+                                                    % TargetStyleID)
+    multigeometry = etree.SubElement(placemark, 'MultiGeometry')
+    polygon = etree.SubElement(multigeometry, 'Polygon')
+    etree.SubElement(polygon, 'extrude').text = '1'
+    etree.SubElement(polygon, 'altitudeMode').text = 'relativeToGround'
+    outerboundaryis = etree.SubElement(polygon, 'outerBoundaryIs')
+    linearring = etree.SubElement(outerboundaryis, 'LinearRing')
+    coordinates = etree.SubElement(linearring, 'coordinates')
+    coordinates.text = ('%.5f,%.5f,%.1f\n'
+                        % (lon-DefaultLonLatDelta*2, lat-DefaultLonLatDelta*2, height))
+    coordinates.text += ('%.5f,%.5f,%.1f\n'
+                         % (lon-DefaultLonLatDelta*2, lat+DefaultLonLatDelta*2, height))
+    coordinates.text += ('%.5f,%.5f,%.1f\n'
+                         % (lon+DefaultLonLatDelta*2, lat+DefaultLonLatDelta*2, height))
+    coordinates.text += ('%.5f,%.5f,%.1f\n'
+                         % (lon+DefaultLonLatDelta*2, lat-DefaultLonLatDelta*2, height))
+    coordinates.text += ('%.5f,%.5f,%.1f\n'
+                         % (lon-DefaultLonLatDelta*2, lat-DefaultLonLatDelta*2, height))
+
+    point = etree.SubElement(multigeometry, 'Point')
+    #etree.SubElement(point, 'Visibility').text = '1'
+    etree.SubElement(point, 'altitudeMode').text = 'relativeToGround'
+    etree.SubElement(point, 'coordinates').text = \
+            '%s,%s,%.1f' % (str(lon), str(lat), height)
+
+
+def get_style_key(amp):
+    '''Return a style key given an amplitude.'''
+
+    return '%.3f' % amp
+
+
+def read_CSV_file(path):
+    '''Read CSV data from file.
+
+    path path to input file
+
+    Returns list of tuples (lon, lat, <z_value>) where values are float.
+    '''
+
+    result = []
+    f = open(path, 'rb')
+    for (lon, lat, z) in csv.reader(f):
+        result.append((float(lon), float(lat), float(z)))
+    f.close()
+
+    return result
+
+
+def write_output_file(out_path, root, format, kml, trans_png):
+    '''Write out XML as *.kml file or *.kmz file.
+
+    out_path   path to output file (missing final extension)
+    root       reference top the root of the XML
+    format     True if the XML is to be pretty-printed
+    kml        True if the out is a KML file, not KMZ
+    trans_png  path to the style PNG
+
+    Convert &...; entities since the 'etree' module handling of
+    CDATA is not as I expect.  I'm strange, perhaps?
+    '''
+
+    # convert XML to string
+    if format:
+        XML_indent(root)
+
+    tree_root = etree.ElementTree(root)
+    xml = etree.tostring(root, 'UTF-8')
+
+    # replace &..; entities
+    xml = xml.replace('&lt;', '<')
+    xml = xml.replace('&gt;', '>')
+
+    # make KML filename
+    tmp_path = tempfile.mkdtemp()
+    kml_file = os.path.join(tmp_path, '%s.kml' % out_path)
+
+    # write the KML file
+    f = open(kml_file, 'w')
+    f.write(xml)
+    f.close()
+
+    if kml:
+        shutil.copy(kml_file, '.')
+        return kml_file
+    else:
+        # create KMZ file
+        zout = zipfile.ZipFile(out_path+'.kmz', 'w', zipfile.ZIP_DEFLATED)
+        zout.write(kml_file, os.path.basename(kml_file))
+        zout.write(trans_png, os.path.basename(IconStyleHref))
+        zout.close()
+        return out_path+'.kmz'
+
+
+def XML_indent(elem, level=0):
+    i = "\n" + level*"  "
+    if len(elem):
+        if not elem.text or not elem.text.strip():
+            elem.text = i + "  "
+        if not elem.tail or not elem.tail.strip():
+            elem.tail = i
+        for elem in elem:
+            XML_indent(elem, level+1)
+        if not elem.tail or not elem.tail.strip():
+            elem.tail = i
+    else:
+        if level and (not elem.tail or not elem.tail.strip()):
+            elem.tail = i
+
+################################################################################
+
+if __name__ == '__main__':
+    def usage(msg=None):
+        if msg:
+            print('%s\n%s\n%s' % ('-'*72, msg, '-'*72))
+
+        print(__doc__)
+
+
+    try:
+        opts, args = getopt.getopt(sys.argv[1:], 'afkl:s:d:h',
+                                   ['auto', 'format', 'kml', 'lookat',
+                                    'scale', 'delta','help',])
+    except getopt.error, msg:
+        usage('Error: %s' % str(msg))
+        sys.exit(10)
+
+    auto = False
+    format = True
+    kml = False
+    lookat = None
+    scale = DefaultAmplitudeScale
+    delta = DefaultLonLatDelta
+    for (opt, optarg) in opts:
+        if opt in ['-a', '--auto']:
+            auto = True
+        elif opt in ['-f', '--format']:
+            format = True
+        elif opt in ['-k', '--kml']:
+            kml = True
+        elif opt in ['-l', '--lookat']:
+            lookat = optarg
+        elif opt in ['-s', '--scale']:
+            scale = float(optarg)
+        elif opt in ['-d', '--delta']:
+            delta = float(optarg)
+        elif opt in ['-h', '--help']:
+            usage()
+            sys.exit(0)
+
+    if len(args) != 1:
+        usage()
+        sys.exit(10)
+
+    index = 0
+    csv_file = args[index]; index += 1
+
+    # convert lookat string to dictionary
+    if lookat:
+        fields = lookat.split(',')
+        if len(fields) != 5:
+            usage()
+            sys.exit(10)
+        lookat = {}
+        lookat['lon'] = float(fields[0])
+        lookat['lat'] = float(fields[1])
+        lookat['alt'] = float(fields[2])
+        lookat['head'] = float(fields[3])
+        lookat['tilt'] = float(fields[4])
+
+    # check that the input file is there
+    if not os.path.isfile(csv_file):
+        print("Input file %s doesn't exist?" % csv_file)
+        sys.exit(10)
+
+    xyz2kmz(csv_file, format, kml, lookat, scale, delta, auto)
+    sys.exit(0)
+
