From c8433f7b55485b65317a867890e757839b9e0a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 12 May 2018 14:48:21 +0200 Subject: [PATCH] Added EPSG 9606 and 9607 datums to the gcs.csv file (gcs file format change) --- pkg/csv/ellipsoids.csv | 1 + pkg/csv/gcs.csv | 287 +++++++++++++++++++++++------------------ src/map/gcs.cpp | 60 +++++---- 3 files changed, 196 insertions(+), 152 deletions(-) diff --git a/pkg/csv/ellipsoids.csv b/pkg/csv/ellipsoids.csv index 88ea11dc..f43c477d 100644 --- a/pkg/csv/ellipsoids.csv +++ b/pkg/csv/ellipsoids.csv @@ -17,3 +17,4 @@ South American 1969,7036,6378160.0,298.25 WGS 72,7043,6378135.0,298.26 Bessel 1841 (Namibia),7046,6377483.865,299.1528128 Hough 1960,7053,6378270.0,297.0 +PZ-90,7054,6378136,298.257839303 diff --git a/pkg/csv/gcs.csv b/pkg/csv/gcs.csv index 5f26cdb0..c0d4dcad 100644 --- a/pkg/csv/gcs.csv +++ b/pkg/csv/gcs.csv @@ -1,124 +1,163 @@ -Adindan,4201,6201,9122,7012,8901,9603,-162,-12,206 -Afgooye,4205,6205,9122,7024,8901,9603,-43,-163,45 -Ain el Abd 1970,4204,6204,9122,7022,8901,9603,-150,-251,-2 -Anna 1 Astro 1965,4708,6708,9122,7003,8901,9603,-491,-22,435 -Arc 1950,4209,6209,9122,7012,8901,9603,-143,-90,-294 -Arc 1960,4210,6210,9122,7012,8901,9603,-160,-8,-300 -Ascension Island 1958,4712,6712,9122,7022,8901,9603,-207,107,52 -Astro B4 Sorol Atoll,4707,6707,9122,7022,8901,9603,114,-116,-333 -Astro Beacon 1945,4709,6709,9122,7022,8901,9603,145,75,-272 -Astro DOS 71/4,4710,6710,9122,7022,8901,9603,-320,550,-494 -Astronomic Stn 1952,4711,6711,9122,7022,8901,9603,124,-234,-25 -Australian Geodetic 1966,4202,6202,9122,7003,8901,9603,-133,-48,148 -Australian Geodetic 1984,4203,6203,9122,7003,8901,9603,-134,-48,149 -Australian Geocentric 1994 (GDA94),4283,6283,9122,7019,8901,9603,0,0,0 -Austrian,4312,6312,9122,7004,8901,9603,594,84,471 -Bellevue (IGN),4714,6714,9122,7022,8901,9603,-127,-769,472 -Bermuda 1957,4216,6216,9122,7008,8901,9603,-73,213,296 -Bogota Observatory,4218,6218,9122,7022,8901,9603,307,304,-318 -Campo Inchauspe,4221,6221,9122,7022,8901,9603,-148,136,90 -Canton Astro 1966,4716,6716,9122,7022,8901,9603,298,-304,-375 -Cape,4222,6222,9122,7012,8901,9603,-136,-108,-292 -Cape Canaveral,4717,6717,9122,7008,8901,9603,-2,150,181 -Carthage,4223,6223,9122,7012,8901,9603,-263,6,431 -CH-1903,4149,6149,9122,7004,8901,9603,674.374,15.056,405.343 -Chatham 1971,4672,6672,9122,7022,8901,9603,175,-38,113 -Chua Astro,4224,6224,9122,7022,8901,9603,-134,229,-29 -Corrego Alegre,4225,6225,9122,7022,8901,9603,-206,172,-6 -Djakarta (Batavia),4211,6211,9122,7004,8901,9603,-377,681,-50 -DOS 1968,,,9122,7022,8901,9603,230,-199,-752 -Easter Island 1967,4719,6719,9122,7022,8901,9603,211,147,111 -Egypt,4199,6199,9122,7022,8901,9603,-130,-117,-151 -EST97,4180,6180,9122,7019,8901,9603,0,0,0 -ETRS 89,4258,6258,9122,7019,8901,9603,0,0,0 -European 1950,4230,6230,9122,7022,8901,9603,-87,-98,-121 -European 1950 (Mean France),,,9122,7022,8901,9603,-87,-96,-120 -European 1950 (Spain and Portugal),,,9122,7022,8901,9603,-84,-107,-120 -European 1979,4668,6668,9122,7022,8901,9603,-86,-98,-119 -Finland Hayford,4123,6123,9122,7022,8901,9603,-78,-231,-97 -Gandajika Base,4233,6233,9122,7022,8901,9603,-133,-321,50 -Geodetic Datum 1949,4272,6272,9122,7022,8901,9603,84,-22,209 -GGRS 87,4121,6121,9122,7019,8901,9603,-199.87,74.79,246.62 -Guam 1963,4675,6675,9122,7008,8901,9603,-100,-248,259 -GUX 1 Astro,4718,6718,9122,7022,8901,9603,252,-209,-751 -Hartebeeshoek94,4148,6148,9122,7030,8901,9603,0,0,0 -Hermannskogel,3906,1031,9122,7004,8901,9603,653,-212,449 -Hjorsey 1955,4658,6658,9122,7022,8901,9603,-73,46,-86 -Hong Kong 1963,4739,6739,9122,7022,8901,9603,-156,-271,-189 -Hu-Tzu-Shan,4236,6236,9122,7022,8901,9603,-634,-549,-201 -Indian Bangladesh,4682,6682,9122,7015,8901,9603,289,734,257 -Indian Thailand,4240,6240,9122,7015,8901,9603,214,836,303 -Israeli,4281,6281,9122,7010,8901,9603,-235,-85,264 -Ireland 1965,4299,6299,9122,7002,8901,9603,506,-122,611 -ISTS 073 Astro 1969,4724,6724,9122,7022,8901,9603,208,-435,-229 -Johnston Island,4725,6725,9122,7022,8901,9603,191,-77,-204 -Kandawala,4244,6244,9122,7015,8901,9603,-97,787,86 -Kerguelen Island,4698,6698,9122,7022,8901,9603,145,-187,103 -Kertau 1948,4245,6245,9122,7018,8901,9603,-11,851,5 -L.C. 5 Astro,4726,6726,9122,7008,8901,9603,42,124,147 -Liberia 1964,4251,6251,9122,7012,8901,9603,-90,40,88 -Luzon Mindanao,,,9122,7008,8901,9603,-133,-79,-72 -Luzon Philippines,4253,6253,9122,7008,8901,9603,-133,-77,-51 -Mahe 1971,4256,6256,9122,7012,8901,9603,41,-220,-134 -Marco Astro,4616,6616,9122,7022,8901,9603,-289,-124,60 -Massawa,4262,6262,9122,7004,8901,9603,639,405,60 -Merchich,4261,6261,9122,7012,8901,9603,31,146,47 -Midway Astro 1961,4727,6727,9122,7022,8901,9603,912,-58,1227 -Minna,4263,6263,9122,7012,8901,9603,-92,-93,122 -NAD27 Alaska,,,9122,7008,8901,9603,-5,135,172 -NAD27 Bahamas,,,9122,7008,8901,9603,-4,154,178 -NAD27 Canada,,,9122,7008,8901,9603,-10,158,187 -NAD27 Canal Zone,,,9122,7008,8901,9603,0,125,201 -NAD27 Caribbean,,,9122,7008,8901,9603,-3,142,183 -NAD27 Central,,,9122,7008,8901,9603,0,125,194 -NAD27 CONUS,4267,6267,9122,7008,8901,9603,-8,160,176 -NAD27 Cuba,,,9122,7008,8901,9603,-9,152,178 -NAD27 Greenland,,,9122,7008,8901,9603,11,114,195 -NAD27 Mexico,,,9122,7008,8901,9603,-12,130,190 -NAD27 San Salvador,,,9122,7008,8901,9603,1,140,165 -NAD83,4269,6269,9122,7019,8901,9603,0,0,0 -Nahrwn Masirah Ilnd,,,9122,7012,8901,9603,-247,-148,369 -Nahrwn Saudi Arbia,,,9122,7012,8901,9603,-231,-196,482 -Nahrwn United Arab,4270,6270,9122,7012,8901,9603,-249,-156,381 -Naparima BWI,4271,6271,9122,7022,8901,9603,-2,374,172 -NGO1948,4273,6273,9122,7005,8901,9603,315,-217,528 -NTF France,4275,6275,9122,7011,8901,9603,-168,-60,320 -Norsk,4817,6817,9122,7005,8913,9603,278,93,474 -NZGD1949,4272,6272,9122,7022,8901,9603,84,-22,209 -NZGD2000,4167,6167,9122,7030,8901,9603,0,0,0 -Observatorio 1966,4182,6182,9122,7022,8901,9603,-425,-169,81 -Old Egyptian,4229,6229,9122,7020,8901,9603,-130,110,-13 -Old Hawaiian,4135,6135,9122,7008,8901,9603,61,-285,-181 -Oman,4232,6232,9122,7012,8901,9603,-346,-1,224 -Ord Srvy Grt Britn,4277,6277,9122,7001,8901,9603,375,-111,431 -Pico De Las Nieves,4728,6728,9122,7022,8901,9603,-307,-92,127 -Pitcairn Astro 1967,4729,6729,9122,7022,8901,9603,185,165,42 -Potsdam Rauenberg DHDN,4314,6314,9122,7004,8901,9603,606,23,413 -Prov So Amrican 1956,4248,6248,9122,7022,8901,9603,-288,175,-376 -Prov So Chilean 1963,4254,6254,9122,7022,8901,9603,16,196,93 -Puerto Rico,4139,6139,9122,7008,8901,9603,11,72,-101 -Pulkovo 1942 (1),4284,6284,9122,7024,8901,9603,28,-130,-95 -Pulkovo 1942 (2),,,9122,7024,8901,9603,28,-130,-95 -Qatar National,4285,6285,9122,7022,8901,9603,-128,-283,22 -Qornoq,4287,6287,9108,7022,8901,9603,164,138,-189 -Reunion,4626,6626,9122,7022,8901,9603,94,-948,-1262 -Rijksdriehoeksmeting,4289,6289,9122,7004,8901,9603,593,26,478 -Rome 1940,4806,6806,9122,7022,8906,9603,-225,-65,9 -RT 90,4124,6124,9122,7004,8901,9603,498,-36,568 -S42,4179,6179,9122,7024,8901,9603,28,-121,-77 -S42 (83),4178,6178,9122,7024,8901,9603,26,-121,-78 -Santo (DOS),4730,6730,9122,7022,8901,9603,170,42,84 -Sao Braz,4184,6184,9122,7022,8901,9603,-203,141,53 -Sapper Hill 1943,4292,6292,9122,7022,8901,9603,-355,16,74 -Schwarzeck,4293,6293,9122,7046,8901,9603,616,97,-251 -South American 1969,4291,6291,9108,7036,8901,9603,-57,1,-41 -Southeast Base,4615,6615,9122,7022,8901,9603,-499,-249,314 -Southwest Base,4183,6183,9122,7022,8901,9603,-104,167,-38 -Timbalai 1948,4298,6298,9122,7015,8901,9603,-689,691,-46 -Tokyo,4301,6301,9122,7004,8901,9603,-128,481,664 -Tristan Astro 1968,4734,6734,9122,7022,8901,9603,-632,438,-609 -Viti Levu 1916,4731,6731,9122,7012,8901,9603,51,391,-36 -Wake-Eniwetok 1960,4732,6732,9122,7053,8901,9603,101,52,-39 -WGS 72,4322,6322,9122,7043,8901,9603,0,0,5 -Yacare,4309,6309,9122,7022,8901,9603,-155,171,37 -Zanderij,4311,6311,9122,7022,8901,9603,-265,120,-358 +HD1909,3819,1024,9122,7004,8901,9607,595.48,121.69,515.35,-4.115,2.9383,-0.853,-3.408 +Hermannskogel,3906,1031,9122,7004,8901,9603,653,-212,449,,,, +GGRS 87,4121,6121,9122,7019,8901,9603,-199.87,74.79,246.62,,,, +Finland Hayford,4123,6123,9122,7022,8901,9603,-78,-231,-97,,,, +RT 90,4124,6124,9122,7004,8901,9603,498,-36,568,,,, +Moznet,4130,6130,9122,7030,8901,9607,0,0,0,0,0,0,0 +EST92,4133,6133,9122,7019,8901,9607,0.055,-0.541,-0.185,-0.0183,0.0003,0.007,-0.014 +PSD93,4134,6134,9122,7012,8901,9606,-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006 +Old Hawaiian,4135,6135,9122,7008,8901,9603,61,-285,-181,,,, +Puerto Rico,4139,6139,9122,7008,8901,9603,11,72,-101,,,, +Hartebeeshoek94,4148,6148,9122,7030,8901,9603,0,0,0,,,, +CH-1903,4149,6149,9122,7004,8901,9603,674.374,15.056,405.343,,,, +NZGD2000,4167,6167,9122,7030,8901,9603,0,0,0,,,, +S42 (83),4178,6178,9122,7024,8901,9603,26,-121,-78,,,, +S42,4179,6179,9122,7024,8901,9603,28,-121,-77,,,, +EST97,4180,6180,9122,7019,8901,9603,0,0,0,,,, +Luxembourg 1930,4181,6181,9122,7022,8901,9607,-189.6806,18.3463,-42.7695,0.33746,3.09264,-2.53861,0.4598 +Observatorio 1966,4182,6182,9122,7022,8901,9603,-425,-169,81,,,, +Southwest Base,4183,6183,9122,7022,8901,9603,-104,167,-38,,,, +Sao Braz,4184,6184,9122,7022,8901,9603,-203,141,53,,,, +OSNI 1952,4188,6188,9122,7001,8901,9606,482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +Albanian 1987,4191,6191,9122,7024,8901,9607,-44.183,-0.58,-38.489,-2.3867,-2.7072,3.5196,-8.2703 +Scoresbysund 1952,4195,6195,9122,7022,8901,9606,105,326,-102.5,0,0,0.814,-0.6 +Ammassalik 1958,4196,6196,9122,7022,8901,9606,-45,417,-3.5,0,0,0.814,-0.6 +Egypt,4199,6199,9122,7022,8901,9603,-130,-117,-151,,,, +Pulkovo 1995,4200,6200,9122,7024,8901,9607,24.47,-130.89,-81.56,0,0,-0.13,-0.22 +Adindan,4201,6201,9122,7012,8901,9603,-162,-12,206,,,, +Australian Geodetic 1966,4202,6202,9122,7003,8901,9603,-133,-48,148,,,, +Australian Geodetic 1984,4203,6203,9122,7003,8901,9603,-134,-48,149,,,, +Ain el Abd 1970,4204,6204,9122,7022,8901,9603,-150,-251,-2,,,, +Afgooye,4205,6205,9122,7024,8901,9603,-43,-163,45,,,, +Arc 1950,4209,6209,9122,7012,8901,9603,-143,-90,-294,,,, +Arc 1960,4210,6210,9122,7012,8901,9603,-160,-8,-300,,,, +Djakarta (Batavia),4211,6211,9122,7004,8901,9603,-377,681,-50,,,, +Bermuda 1957,4216,6216,9122,7008,8901,9603,-73,213,296,,,, +Bogota Observatory,4218,6218,9122,7022,8901,9603,307,304,-318,,,, +Campo Inchauspe,4221,6221,9122,7022,8901,9603,-148,136,90,,,, +Cape,4222,6222,9122,7012,8901,9603,-136,-108,-292,,,, +Carthage,4223,6223,9122,7012,8901,9603,-263,6,431,,,, +Chua Astro,4224,6224,9122,7022,8901,9603,-134,229,-29,,,, +Corrego Alegre,4225,6225,9122,7022,8901,9603,-206,172,-6,,,, +Old Egyptian,4229,6229,9122,7020,8901,9603,-130,110,-13,,,, +European 1950,4230,6230,9122,7022,8901,9603,-87,-98,-121,,,, +ED87,4231,6231,9122,7022,8901,9606,-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218 +Oman,4232,6232,9122,7012,8901,9603,-346,-1,224,,,, +Gandajika Base,4233,6233,9122,7022,8901,9603,-133,-321,50,,,, +Hu-Tzu-Shan,4236,6236,9122,7022,8901,9603,-634,-549,-201,,,, +Indian Thailand,4240,6240,9122,7015,8901,9603,214,836,303,,,, +Kandawala,4244,6244,9122,7015,8901,9603,-97,787,86,,,, +Kertau 1948,4245,6245,9122,7018,8901,9603,-11,851,5,,,, +Prov So Amrican 1956,4248,6248,9122,7022,8901,9603,-288,175,-376,,,, +Liberia 1964,4251,6251,9122,7012,8901,9603,-90,40,88,,,, +Luzon Philippines,4253,6253,9122,7008,8901,9603,-133,-77,-51,,,, +Prov So Chilean 1963,4254,6254,9122,7022,8901,9603,16,196,93,,,, +Mahe 1971,4256,6256,9122,7012,8901,9603,41,-220,-134,,,, +ETRS 89,4258,6258,9122,7019,8901,9603,0,0,0,,,, +Merchich,4261,6261,9122,7012,8901,9603,31,146,47,,,, +Massawa,4262,6262,9122,7004,8901,9603,639,405,60,,,, +Minna,4263,6263,9122,7012,8901,9603,-92,-93,122,,,, +Monte Mario,4265,6265,9122,7022,8901,9606,-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68 +NAD27 CONUS,4267,6267,9122,7008,8901,9603,-8,160,176,,,, +NAD83,4269,6269,9122,7019,8901,9603,0,0,0,,,, +Nahrwn United Arab,4270,6270,9122,7012,8901,9603,-249,-156,381,,,, +Naparima BWI,4271,6271,9122,7022,8901,9603,-2,374,172,,,, +Geodetic Datum 1949,4272,6272,9122,7022,8901,9603,84,-22,209,,,, +NZGD1949,4272,6272,9122,7022,8901,9603,84,-22,209,,,, +NGO1948,4273,6273,9122,7005,8901,9603,315,-217,528,,,, +NTF France,4275,6275,9122,7011,8901,9603,-168,-60,320,,,, +Ord Srvy Grt Britn,4277,6277,9122,7001,8901,9603,375,-111,431,,,, +Israeli,4281,6281,9122,7010,8901,9603,-235,-85,264,,,, +Australian Geocentric 1994 (GDA94),4283,6283,9122,7019,8901,9603,0,0,0,,,, +Pulkovo 1942 (1),4284,6284,9122,7024,8901,9603,28,-130,-95,,,, +Qatar National,4285,6285,9122,7022,8901,9603,-128,-283,22,,,, +Qornoq,4287,6287,9108,7022,8901,9603,164,138,-189,,,, +Rijksdriehoeksmeting,4289,6289,9122,7004,8901,9603,593,26,478,,,, +South American 1969,4291,6291,9108,7036,8901,9603,-57,1,-41,,,, +Sapper Hill 1943,4292,6292,9122,7022,8901,9603,-355,16,74,,,, +Schwarzeck,4293,6293,9122,7046,8901,9603,616,97,-251,,,, +Timbalai 1948,4298,6298,9122,7015,8901,9603,-689,691,-46,,,, +Ireland 1965,4299,6299,9122,7002,8901,9603,506,-122,611,,,, +TM75,4300,6300,9122,7002,8901,9606,482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15 +Tokyo,4301,6301,9122,7004,8901,9603,-128,481,664,,,, +Nord Sahara 1959,4307,6307,9122,7012,8901,9606,-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547 +Yacare,4309,6309,9122,7022,8901,9603,-155,171,37,,,, +Zanderij,4311,6311,9122,7022,8901,9603,-265,120,-358,,,, +Austrian,4312,6312,9122,7004,8901,9603,594,84,471,,,, +Belge 1972,4313,6313,9122,7022,8901,9607,-106.8686,52.2978,-103.7239,-0.3366,0.457,-1.8422,-1.2747 +Potsdam Rauenberg DHDN,4314,6314,9122,7004,8901,9603,606,23,413,,,, +WGS 72,4322,6322,9122,7043,8901,9603,0,0,5,,,, +WGS 72BE,4324,6324,9122,7043,8901,9606,0,0,1.9,0,0,0.814,-0.38 +Hong Kong 1980,4611,6611,9122,7022,8901,9606,-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246 +QND95,4614,6614,9122,7022,8901,9606,-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065 +Southeast Base,4615,6615,9122,7022,8901,9603,-499,-249,314,,,, +Marco Astro,4616,6616,9122,7022,8901,9603,-289,-124,60,,,, +Reunion,4626,6626,9122,7022,8901,9603,94,-948,-1262,,,, +Tahaa 54,4629,6629,9122,7022,8901,9607,72.438,345.918,79.486,-1.6045,-0.8823,-0.5565,1.3746 +ST87 Ouvea,4635,6635,9122,7022,8901,9606,-122.383,-188.696,103.344,3.5107,-4.9668,-5.7047,4.4798 +ST71 Belep,4643,6643,9122,7022,8901,9606,-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002 +Hjorsey 1955,4658,6658,9122,7022,8901,9603,-73,46,-86,,,, +Helle 1954,4660,6660,9122,7022,8901,9606,982.6087,552.753,-540.873,6.6816266,-31.6114924,-19.84816,16.805 +European 1979,4668,6668,9122,7022,8901,9603,-86,-98,-119,,,, +Chatham 1971,4672,6672,9122,7022,8901,9603,175,-38,113,,,, +Chatham Islands 1979,4673,6673,9122,7022,8901,9607,174.05,-25.49,112.57,0,0,-0.554,0.2263 +Guam 1963,4675,6675,9122,7008,8901,9603,-100,-248,259,,,, +Indian Bangladesh,4682,6682,9122,7015,8901,9603,289,734,257,,,, +PRS92,4683,6683,9122,7008,8901,9607,-127.62,-67.24,-47.04,3.068,-4.903,-1.578,-1.06 +RGPF,4687,6687,9122,7019,8901,9607,0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093 +Fatu Iva 72,4688,6688,9122,7022,8901,9607,347.103,1078.125,2623.922,33.8875,-70.6773,9.3943,186.074 +IGN63 Hiva Oa,4689,6689,9122,7022,8901,9607,410.721,55.049,80.746,-2.5779,-2.3514,-0.6664,17.3311 +Tahiti 79,4690,6690,9122,7022,8901,9607,221.525,152.948,176.768,2.3847,1.3896,0.877,11.4741 +Moorea 87,4691,6691,9122,7022,8901,9607,215.525,149.593,176.229,3.2624,1.692,1.1571,10.4773 +Kerguelen Island,4698,6698,9122,7022,8901,9603,145,-187,103,,,, +Astro B4 Sorol Atoll,4707,6707,9122,7022,8901,9603,114,-116,-333,,,, +Anna 1 Astro 1965,4708,6708,9122,7003,8901,9603,-491,-22,435,,,, +Astro Beacon 1945,4709,6709,9122,7022,8901,9603,145,75,-272,,,, +Astro DOS 71/4,4710,6710,9122,7022,8901,9603,-320,550,-494,,,, +Astronomic Stn 1952,4711,6711,9122,7022,8901,9603,124,-234,-25,,,, +Ascension Island 1958,4712,6712,9122,7022,8901,9603,-207,107,52,,,, +Bellevue (IGN),4714,6714,9122,7022,8901,9603,-127,-769,472,,,, +Canton Astro 1966,4716,6716,9122,7022,8901,9603,298,-304,-375,,,, +Cape Canaveral,4717,6717,9122,7008,8901,9603,-2,150,181,,,, +GUX 1 Astro,4718,6718,9122,7022,8901,9603,252,-209,-751,,,, +Easter Island 1967,4719,6719,9122,7022,8901,9603,211,147,111,,,, +Fiji 1986,4720,6720,9122,7043,8901,9606,0,0,4.5,0,0,0.554,0.2263 +GCGD59,4723,6723,9122,7008,8901,9607,-179.483,-69.379,-27.584,7.862,-8.163,-6.042,-13.925 +ISTS 073 Astro 1969,4724,6724,9122,7022,8901,9603,208,-435,-229,,,, +Johnston Island,4725,6725,9122,7022,8901,9603,191,-77,-204,,,, +L.C. 5 Astro,4726,6726,9122,7008,8901,9603,42,124,147,,,, +Midway Astro 1961,4727,6727,9122,7022,8901,9603,912,-58,1227,,,, +Pico De Las Nieves,4728,6728,9122,7022,8901,9603,-307,-92,127,,,, +Pitcairn Astro 1967,4729,6729,9122,7022,8901,9603,185,165,42,,,, +Santo (DOS),4730,6730,9122,7022,8901,9603,170,42,84,,,, +Viti Levu 1916,4731,6731,9122,7012,8901,9603,51,391,-36,,,, +Wake-Eniwetok 1960,4732,6732,9122,7053,8901,9603,101,52,-39,,,, +Tristan Astro 1968,4734,6734,9122,7022,8901,9603,-632,438,-609,,,, +Hong Kong 1963,4739,6739,9122,7022,8901,9603,-156,-271,-189,,,, +PZ-90,4740,6740,9122,7054,8901,9607,0,0,1.5,0,0,-0.076,0 +VN-2000,4756,6756,9122,7030,8901,9607,-191.90441429,-39.30318279,-111.45032835,-0.00928836,0.01975479,-0.00427372,0.252906278 +Rome 1940,4806,6806,9122,7022,8906,9603,-225,-65,9,,,, +Norsk,4817,6817,9122,7005,8913,9603,278,93,474,,,, +Nord Sahara 1959 (Paris),4819,6819,9105,7012,8903,9606,-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547 +S-JTSK/05,5228,1052,9122,7004,8901,9607,572.213,85.334,461.94,-4.9732,-1.529,-5.2484,3.5378 +S-JTSK/05 (Ferro),5229,1055,9122,7004,8909,9607,572.213,85.334,461.94,-4.9732,-1.529,-5.2484,3.5378 +SLD99,5233,1053,9122,7015,8901,9607,-0.293,766.95,87.713,-0.195704,-1.695068,-3.473016,-0.039338 +UCS-2000,5561,1077,9122,7024,8901,9607,25,-141,-78.5,0,-0.35,-0.736,0 +CGRS93,6311,1112,9122,7030,8901,9607,8.846,-4.394,-1.122,0.00237,0.146528,-0.130428,0.783926 +DOS 1968,,,9122,7022,8901,9603,230,-199,-752,,,, +European 1950 (Mean France),,,9122,7022,8901,9603,-87,-96,-120,,,, +European 1950 (Spain and Portugal),,,9122,7022,8901,9603,-84,-107,-120,,,, +Luzon Mindanao,,,9122,7008,8901,9603,-133,-79,-72,,,, +NAD27 Alaska,,,9122,7008,8901,9603,-5,135,172,,,, +NAD27 Bahamas,,,9122,7008,8901,9603,-4,154,178,,,, +NAD27 Canada,,,9122,7008,8901,9603,-10,158,187,,,, +NAD27 Canal Zone,,,9122,7008,8901,9603,0,125,201,,,, +NAD27 Caribbean,,,9122,7008,8901,9603,-3,142,183,,,, +NAD27 Central,,,9122,7008,8901,9603,0,125,194,,,, +NAD27 Cuba,,,9122,7008,8901,9603,-9,152,178,,,, +NAD27 Greenland,,,9122,7008,8901,9603,11,114,195,,,, +NAD27 Mexico,,,9122,7008,8901,9603,-12,130,190,,,, +NAD27 San Salvador,,,9122,7008,8901,9603,1,140,165,,,, +Nahrwn Masirah Ilnd,,,9122,7012,8901,9603,-247,-148,369,,,, +Nahrwn Saudi Arbia,,,9122,7012,8901,9603,-231,-196,482,,,, +Pulkovo 1942 (2),,,9122,7024,8901,9603,28,-130,-95,,,, diff --git a/src/map/gcs.cpp b/src/map/gcs.cpp index bfa8de44..d1e9579b 100644 --- a/src/map/gcs.cpp +++ b/src/map/gcs.cpp @@ -33,6 +33,18 @@ static int parameter(const QString &str, bool *res) return field.toInt(res); } +static double parameterd(const QString &str, bool *res) +{ + QString field = str.trimmed(); + if (field.isEmpty()) { + *res = true; + return NAN; + } + + return field.toDouble(res); +} + + QList GCS::_gcss = WGS84(); QList GCS::WGS84() @@ -78,7 +90,6 @@ void GCS::loadList(const QString &path) bool res; int ln = 0; const Ellipsoid *e; - double ds, rx, ry, rz; if (!file.open(QFile::ReadOnly)) { @@ -92,7 +103,7 @@ void GCS::loadList(const QString &path) QByteArray line = file.readLine(); QList list = line.split(','); - if (list.size() < 10) { + if (list.size() != 14) { qWarning("%s:%d: Format error", qPrintable(path), ln); continue; } @@ -146,32 +157,25 @@ void GCS::loadList(const QString &path) qWarning("%s:%d: Invalid dz", qPrintable(path), ln); continue; } - if (list.size() == 14) { - rx = list[10].trimmed().toDouble(&res); - if (!res) { - qWarning("%s:%d: Invalid rx", qPrintable(path), ln); - continue; - } - ry = list[11].trimmed().toDouble(&res); - if (!res) { - qWarning("%s:%d: Invalid ry", qPrintable(path), ln); - continue; - } - rz = list[12].trimmed().toDouble(&res); - if (!res) { - qWarning("%s:%d: Invalid rz", qPrintable(path), ln); - continue; - } - ds = list[13].trimmed().toDouble(&res); - if (!res) { - qWarning("%s:%d: Invalid ds", qPrintable(path), ln); - continue; - } - } else { - rx = NAN; - ry = NAN; - rz = NAN; - ds = NAN; + double rx = parameterd(list[10], &res); + if (!res) { + qWarning("%s:%d: Invalid rx", qPrintable(path), ln); + continue; + } + double ry = parameterd(list[11], &res); + if (!res) { + qWarning("%s:%d: Invalid ry", qPrintable(path), ln); + continue; + } + double rz = parameterd(list[12], &res); + if (!res) { + qWarning("%s:%d: Invalid rz", qPrintable(path), ln); + continue; + } + double ds = parameterd(list[13], &res); + if (!res) { + qWarning("%s:%d: Invalid ds", qPrintable(path), ln); + continue; } if (!(e = Ellipsoid::ellipsoid(el))) {