Changeset 5236 in josm
- Timestamp:
- 2012-05-12T23:27:39+02:00 (12 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data_nodist/projection-regression-test-data.csv
r5232 r5236 17 17 en 591305.9239689747 6791477.062909814 18 18 ll2 -29.001580996697747 -176.06257492764087 19 EPSG:32580120 ll 34.015203682036415 -174.1093226664440321 en 3766942.9163529025 3767610.669079452822 ll2 34.01520368202457 -174.1093226664026223 EPSG:32590124 ll -42.67913028411371 -177.3821371132755825 en 3468691.0300340164 5274745.45968119326 ll2 -42.67913028411191 -177.3821371132755827 19 EPSG:32602 28 20 ll -0.35895685791257925 -175.75420623162898 … … 33 25 en 539148.6502865502 714244.7350888532 34 26 ll2 -83.61115414944909 -167.84722307364663 35 EPSG:32580236 ll 2.6279660285514383 -169.7122057239070337 en 3643161.6457097256 290545.0278630052338 ll2 2.6279660285505937 -169.712205723908339 EPSG:32590240 ll -28.96646509876222 -171.8298567242975441 en 3419144.423939406 6795446.16338700942 ll2 -28.96646509876411 -171.829856724297643 27 EPSG:32603 44 28 ll 69.06942592353653 -164.25619547568132 … … 49 33 en 457419.4744487591 3384008.1251201406 50 34 ll2 -59.67977504854674 -165.75611289241158 51 EPSG:32580352 ll 28.858993819881626 -162.783830041395853 en 3716176.1007948755 3194382.029337422554 ll2 28.858993819882425 -162.783830041387955 EPSG:32590356 ll -35.88579209756221 -163.331427669805657 en 3650607.709485052 6027433.06268871658 ll2 -35.885792097561875 -163.3314276698034759 35 EPSG:32604 60 36 ll 68.49291330851102 -162.96491579603722 … … 65 41 en 885055.000033729 5033414.625188409 66 42 ll2 -44.74896636985849 -154.13571225126154 67 EPSG:32580468 ll 19.1602869192667 -157.2716151273193469 en 3681759.2071671444 2119462.977105706570 ll2 19.1602869192673 -157.2716151273200871 EPSG:32590472 ll -5.554243793843327 -162.7368882107744273 en 3085827.0319909714 9384761.23978867474 ll2 -5.554243793834859 -162.7368882104622775 43 EPSG:32605 76 44 ll 70.45567827510386 -154.8711613318192 … … 81 49 en 202567.24068296672 9494225.759775288 82 50 ll2 -4.570782032537401 -155.68045181407837 83 EPSG:32580584 ll 47.558680099626386 -152.9134900953661185 en 3506508.0942535275 5267254.87080624486 ll2 47.558680099624596 -152.9134900953661187 EPSG:32590588 ll -67.03448585424093 -149.1091555776900789 en 3669319.349906984 2559479.442741213490 ll2 -67.03448585415079 -149.1091555778464291 51 EPSG:32606 92 52 ll 45.0472445968384 -147.48643385071935 … … 97 57 en 666829.6102985529 3833392.573244692 98 58 ll2 -55.61672629830789 -144.35088100477645 99 EPSG:325806100 ll 23.646357967189935 -146.93885809543016101 en 3506235.6853181007 2615075.677979285102 ll2 23.64635796719157 -146.93885809543016103 EPSG:325906104 ll -23.95563872144256 -148.58426057256983105 en 3338794.1024053795 7349779.778157079106 ll2 -23.955638721444366 -148.58426057257037107 59 EPSG:32607 108 60 ll 17.160888392541953 -136.88735017825638 … … 113 65 en 984445.3083006871 9975304.651945615 114 66 ll2 -0.22277876804841829 -136.65059108151155 115 EPSG:325807116 ll 25.601252661823878 -143.02480961724422117 en 3296655.873159273 2833079.31114311118 ll2 25.601252661825626 -143.02480961724746119 EPSG:325907120 ll -59.282020025193475 -144.22706620376516121 en 3316162.4281953657 3424091.6679619113122 ll2 -59.28202002514724 -144.22706620374979123 67 EPSG:32608 124 68 ll 17.082700048931713 -138.83952009347482 … … 129 73 en 398815.28724407975 9693905.200367318 130 74 ll2 -2.768962687805876 -135.91033889187185 131 EPSG:325808132 ll 55.46393358936174 -136.5310213256191133 en 3403200.1922523687 6147484.959461425134 ll2 55.46393358936161 -136.53102132561946135 EPSG:325908136 ll -24.378151080790772 -130.28090785994982137 en 3978930.3653069055 7295752.519524297138 ll2 -24.37815108065392 -130.28090785952696139 75 EPSG:32609 140 76 ll 32.88791124498886 -124.7743273825516 … … 145 81 en 244542.49842715668 6368487.503688801 146 82 ll2 -32.79190171963808 -131.7278115705747 147 EPSG:325809148 ll 66.39751696914044 -132.53678032719117149 en 3342048.4023845675 7368688.671792787150 ll2 66.39751696908735 -132.53678032712693151 EPSG:325909152 ll -57.01846507460095 -131.70959025726978153 en 3335504.639294616 3677294.885709851154 ll2 -57.018465074583965 -131.70959025727063155 83 EPSG:32610 156 84 ll 15.621043862710906 -127.89205445312605 … … 161 89 en 365234.2722858875 1.0173704546361338E7 162 90 ll2 1.5712020890233884 -124.21146729170411 163 EPSG:325810164 ll 54.157170253882065 -120.70356806888559165 en 3649949.8762614774 6003445.228213763166 ll2 54.15717025387514 -120.70356806888299167 EPSG:325910168 ll -30.490160906382584 -127.43018201881836169 en 3074627.6043351754 6618544.243526176170 ll2 -30.490160906245404 -127.43018201925888171 91 EPSG:32611 172 92 ll 10.73641510533119 -112.16478744764923 … … 177 97 en 233168.6164003252 5446247.135223156 178 98 ll2 -41.09126192484649 -120.17689123202507 179 EPSG:325811180 ll 27.495781449917963 -118.48664637570047181 en 3353144.9333348894 3042229.27401776182 ll2 27.49578144991998 -118.48664637570127183 EPSG:325911184 ll -83.43763157076992 -113.13504259887196185 en 3549277.5170962233 733034.8189518023186 ll2 -83.4376315707652 -113.13504259905538187 99 EPSG:32612 188 100 ll 61.77560053459669 -114.5125390548194 … … 193 105 en 402063.9138540749 1140210.1029349882 194 106 ll2 -79.76744100981378 -115.94410343026465 195 EPSG:325812196 ll 54.732336878937645 -111.71907573020027197 en 3453696.4850427904 6065244.0334627405198 ll2 54.73233687893784 -111.71907573020029199 EPSG:325912200 ll -47.5968969661014 -107.10151995235918201 en 3793046.9416754395 4721134.191438857202 ll2 -47.596896965940005 -107.10151995231445203 107 EPSG:32613 204 108 ll 4.7583779488046805 -107.92602632992818 … … 209 113 en 75152.58517323522 8797793.856423587 210 114 ll2 -10.85088716998492 -108.88425627294212 211 EPSG:325813212 ll 66.20959551417033 -109.09161210111962213 en 3315926.7644572235 7349289.910060517214 ll2 66.20959551403949 -109.09161210087801215 EPSG:325913216 ll -68.06851091663657 -109.88775790882875217 en 3296450.809507033 2441437.240874543218 ll2 -68.0685109163161 -109.88775790756797219 115 EPSG:32614 220 116 ll 14.263757165950743 -100.80954124472483 … … 225 121 en 599649.1533353492 3693155.667478282 226 122 ll2 -56.89459290929932 -97.36415969181257 227 EPSG:325814228 ll 14.867593373898092 -94.551911603902229 en 3978916.3793493 1648458.2511148695230 ll2 14.867593373838202 -94.55191160418451231 EPSG:325914232 ll -8.277332733762591 -96.31304814961656233 en 3796001.0760476636 9084042.61810469234 ll2 -8.277332733760499 -96.3130481496617235 123 EPSG:32615 236 124 ll 84.67761930424092 -95.31735150114109 … … 241 129 en 152136.94772601099 8318235.034911122 242 130 ll2 -15.188620247214823 -96.23707027358184 243 EPSG:325815244 ll 29.659566775760396 -89.14648624583667245 en 3873068.977744801 3287277.674508805246 ll2 29.659566775708548 -89.14648624564234247 EPSG:325915248 ll -69.26764450162177 -95.62116552395997249 en 3396471.3392141797 2313578.5751270596250 ll2 -69.26764450161575 -95.62116552395555251 131 EPSG:32616 252 132 ll 72.583548496096 -84.95707014904738 … … 257 137 en 996538.1905094216 9494450.775022857 258 138 ll2 -4.559807376156723 -82.52818257832048 259 EPSG:325816260 ll 39.03683531082378 -91.32884532853011261 en 3125277.8354169023 4329789.181728653262 ll2 39.03683531060886 -91.32884532882265263 EPSG:325916264 ll -80.48202922319493 -83.22512570057863265 en 3569637.610377383 1062348.303278951266 ll2 -80.48202922318502 -83.2251257007239267 139 EPSG:32617 268 140 ll 58.773416508274885 -79.23342848764487 … … 273 145 en 389503.5113214161 2645374.949496709 274 146 ll2 -66.2919283666812 -83.46326129024257 275 EPSG:325817276 ll 74.22922998811548 -82.2572616625563277 en 3461860.3853156655 8238014.811559495278 ll2 74.22922998811474 -82.25726166255623279 EPSG:325917280 ll -26.672436697539396 -84.93179949462775281 en 3108597.205135338 7043809.945893241282 ll2 -26.67243669749347 -84.93179949481045283 147 EPSG:32618 284 148 ll 0.8542824171250176 -70.60589399441409 … … 289 153 en 334474.62998039776 9716415.67820614 290 154 ll2 -2.5647882790393166 -76.48884831326058 291 EPSG:325818292 ll 54.54759466810166 -70.10559888065576293 en 3816474.4038224113 6055472.390087243294 ll2 54.54759466746183 -70.10559888135492295 EPSG:325918296 ll -33.09191328447166 -72.04482413314155297 en 3775823.385116136 6334637.71196932298 ll2 -33.091913284459345 -72.04482413309498299 155 EPSG:32619 300 156 ll 9.928164458825613 -66.53356619660251 … … 305 161 en 563046.3761068006 9634048.929625366 306 162 ll2 -3.3106740144720264 -68.43248658691563 307 EPSG:325819308 ll 39.434976410660475 -64.91063669464722309 en 3851985.0186811076 4373034.511422034310 ll2 39.4349764105042 -64.91063669443021311 EPSG:325919312 ll -78.61538957033292 -73.24424795954134313 en 3406552.5585922375 1269556.4361380748314 ll2 -78.61538957030484 -73.24424795913168315 163 EPSG:32620 316 164 ll -2.6787491025025547 -66.88079230367741 … … 321 169 en 674428.974179743 2240266.5274605397 322 170 ll2 -69.88660504288639 -58.451395275542424 323 EPSG:325820324 ll 64.49300134007495 -62.979335076288066325 en 3500992.919768428 7151952.6927366005326 ll2 64.49300134007686 -62.97933507628806327 EPSG:325920328 ll -43.937990691739216 -66.64134489151819329 en 3207746.99622248 5128565.9595632935330 ll2 -43.93799069164207 -66.64134489159909331 171 EPSG:32621 332 172 ll 69.83911306601517 -54.4569378254068 … … 337 177 en 509117.82030811213 9838536.34068649 338 178 ll2 -1.460807694037499 -56.918034017934815 339 EPSG:325821340 ll 51.21005902867042 -57.379470258439625341 en 3473493.1777381403 5673253.086221185342 ll2 51.21005902866946 -57.37947025843962343 EPSG:325921344 ll -49.499296188014874 -52.907039081672345345 en 3796326.321966555 4508982.924122001346 ll2 -49.49929618779302 -52.907039081676324347 179 EPSG:32622 348 180 ll 14.524484069634685 -53.96374810803576 … … 353 185 en 547334.5777219022 2511132.649487271 354 186 ll2 -67.5118725686338 -49.89099542229613 355 EPSG:325822356 ll 32.61781547095043 -48.537082717209415357 en 3731092.3180978494 3611597.5392105747358 ll2 32.617815470947676 -48.537082717192604359 EPSG:325922360 ll -25.281994693195657 -47.87237423257416361 en 3814983.707942448 7200152.773664493362 ll2 -25.281994693188874 -47.872374232534604363 187 EPSG:32623 364 188 ll 16.394157590092313 -42.12374249522621 … … 369 193 en 383102.3012525303 5866702.311873849 370 194 ll2 -37.33901138489222 -46.3196614813865 371 EPSG:325823372 ll 59.60264479279566 -46.46417576837352373 en 3417358.700854358 6608070.849842624374 ll2 59.60264479279691 -46.464175768373735375 EPSG:325923376 ll -42.13335698553909 -40.4994655569372377 en 3871982.980212735 5325605.574904206378 ll2 -42.133356985222164 -40.499465556709254379 195 EPSG:32624 380 196 ll 5.131580338571972 -39.26307503457069 … … 385 201 en 328728.8038014539 2788647.117090909 386 202 ll2 -64.98185873299518 -42.631062127215536 387 EPSG:325824388 ll 75.09851921359484 -43.6400984567463389 en 3366931.903012309 8339809.29093068390 ll2 75.09851921350091 -43.64009845586568391 EPSG:325924392 ll -31.757981422607287 -39.62137531657344393 en 3441153.6177650196 6486221.773790808394 ll2 -31.757981422608655 -39.62137531657346395 203 EPSG:32625 396 204 ll -0.7883094164596285 -30.122300530621676 … … 401 209 en 321704.4754237144 2736137.6100584166 402 210 ll2 -65.44826790796357 -36.847373771693476 403 EPSG:325825404 ll 65.887938688693 -35.070053830491894405 en 3405648.9567068643 7308975.393513848406 ll2 65.88793868869246 -35.07005383049174407 EPSG:325925408 ll -20.030238632621646 -30.349344491897128409 en 3777295.662608796 7782974.408009621410 ll2 -20.03023863262136 -30.34934449189804411 211 EPSG:32626 412 212 ll 58.43458636013028 -29.168484112078048 … … 417 217 en 119560.58075143833 4933398.9237327585 418 218 ll2 -45.64851343989748 -31.88249536231209 419 EPSG:325826420 ll 14.237460537145964 -29.544168588724947421 en 3225457.8650450073 1575488.3512267838422 ll2 14.23746053714473 -29.54416858870695423 EPSG:325926424 ll 4.225147273652084 -28.545819653002344425 en 3328432.6156486133 1.0467184762336606E7426 ll2 4.22514727365083 -28.545819652999242427 219 EPSG:32627 428 220 ll 8.344532201175449 -23.182089463285656 … … 433 225 en 207304.56798461726 4349205.018263729 434 226 ll2 -50.93436625633735 -25.166137353769805 435 EPSG:325827436 ll 4.094370919583472 -23.62056064954077437 en 3209035.370235288 453034.07665179943438 ll2 4.0943709195821745 -23.620560649492674439 EPSG:325927440 ll -44.664066687330894 -19.261717046318168441 en 3637801.7645415943 5052896.781212638442 ll2 -44.664066687327804 -19.26171704631626443 227 EPSG:32628 444 228 ll 22.510955722354655 -11.39208694243174 … … 449 233 en 382615.2732716046 1600607.7105868515 450 234 ll2 -75.64145744134245 -19.24386521997399 451 EPSG:325828452 ll 49.071084622707566 -17.35584546969967453 en 3327939.684002143 5438031.203176502454 ll2 49.07108462269811 -17.35584546970578455 EPSG:325928456 ll -5.379819146453798 -12.53635261155926457 en 3773025.9429032756 9404800.22025761458 ll2 -5.3798191464523155 -12.536352611592488459 235 EPSG:32629 460 236 ll 21.147897974547682 -10.932715320979701 … … 465 241 en 543962.835055189 722665.361454945 466 242 ll2 -83.53336501935372 -5.501531193708958 467 EPSG:325829468 ll 41.94383312013957 -8.306514012321347469 en 3557483.4903528546 4643772.640068309470 ll2 41.943833120137896 -8.306514012321346471 EPSG:325929472 ll -42.689366117043875 -7.458484785853329473 en 3626278.7090851218 5272527.70237086474 ll2 -42.689366117041615 -7.458484785852194475 243 EPSG:32630 476 244 ll 7.0485574964722595 -2.895336653090574 … … 481 249 en 538355.0358692394 945086.5607411675 482 250 ll2 -81.5458994059829 -0.6625327966706558 483 EPSG:325830484 ll 67.8921918268731 -7.824623864366158485 en 3297541.210536713 7538748.0876726145486 ll2 67.89219182657125 -7.824623863249039487 EPSG:325930488 ll 0.4171935875446735 -2.886899629327141489 en 3512584.9163963683 1.0046112525094511E7490 ll2 0.4171935875445257 -2.8868996293271394491 251 EPSG:32631 492 252 ll 62.31144897764639 -1.7488227034434083 … … 497 257 en 589941.1445311456 1368855.4457779005 498 258 ll2 -77.72996494784715 6.793662550878116 499 EPSG:325831500 ll -3.7939968357153786 -1.1712382629044498501 en 3036447.2577582286 -420474.8206135461502 ll2 -3.793996835702507 -1.171238262284568503 EPSG:325931504 ll -48.12092219412692 -0.7289826703408846505 en 3222506.4959712904 4663531.741793984506 ll2 -48.1209221940016 -0.7289826703783908507 259 EPSG:32632 508 260 ll 11.834748738967427 11.598093592769366 … … 513 265 en 126449.06323080737 9801643.353370322 514 266 ll2 -1.7914913093887788 5.643292387171931 515 EPSG:325832516 ll 77.68629530327402 9.528947032671267517 en 3512592.552096698 8623417.16234868518 ll2 77.68629530327236 9.528947032671198519 EPSG:325932520 ll -6.14179270149279 4.8242912817139105521 en 3037594.6533934087 9319316.128949493522 ll2 -6.141792701472677 4.82429128228072523 267 EPSG:32633 524 268 ll 42.05539689126687 15.319058068358773 … … 529 273 en 412530.97644885455 9543809.318915792 530 274 ll2 -4.126836934077884 14.211932975215113 531 EPSG:325833532 ll 67.46670291106749 12.96835463601909533 en 3413129.3044175194 7484831.153441383534 ll2 67.46670291106713 12.968354636019292535 EPSG:325933536 ll -64.4745973056098 11.208508565566216537 en 3317785.4845927716 2844655.216510535538 ll2 -64.47459730551596 11.208508565679992539 275 EPSG:32634 540 276 ll 75.90951295643045 25.503495199048984 … … 545 281 en -22571.106634815456 1.0360208764095124E7 546 282 ll2 3.247885247076826 16.301556703090707 547 EPSG:325834548 ll -4.517988102520578 22.94921284404035549 en 3716270.580250685 -499673.68409744324550 ll2 -4.517988102519327 22.949212844030246551 EPSG:325934552 ll -66.80908136058187 16.14267050331656553 en 3286725.4307625685 2581586.337268074554 ll2 -66.80908136023545 16.14267050447666555 283 EPSG:32635 556 284 ll 47.49067536542698 25.527726208112252 … … 561 289 en 352075.73642084474 2561806.4975045808 562 290 ll2 -67.02488461221535 23.602574863972343 563 EPSG:325835564 ll 59.310337838927126 27.764745794983764565 en 3543539.7873608056 6574859.024287401566 ll2 59.31033783892869 27.764745794983803567 EPSG:325935568 ll -41.869069478688395 25.134315184294067569 en 3345169.050015976 5363077.880150447570 ll2 -41.869069478685255 25.13431518429081571 291 EPSG:32636 572 292 ll 2.3826611804187845 35.69036984079036 … … 577 297 en 248987.61723446447 5283887.580592804 578 298 ll2 -42.55662303147199 29.942428252161324 579 EPSG:325836580 ll 16.615535265561583 35.64542638829472581 en 3782240.027963152 1838888.5328098293582 ll2 16.615535265560666 35.645426388281585583 EPSG:325936584 ll -75.03852317262636 34.434468051988944585 en 3541334.724856813 1671595.085656195586 ll2 -75.0385231726253 34.43446805198884587 299 EPSG:32637 588 300 ll 52.14316359823634 35.33858849767755 … … 593 305 en 310135.9849165189 2984926.8570488933 594 306 ll2 -63.214447619588334 35.22228781624288 595 EPSG:325837596 ll 6.9163924168089235 39.74685370543559597 en 3582507.6382259573 764571.1122650943598 ll2 6.916392416807088 39.74685370543552599 EPSG:325937600 ll -14.08852279690737 38.543983228864015601 en 3450772.8417472583 8442435.788948676602 ll2 -14.08852279690611 38.54398322886402603 307 EPSG:32638 604 308 ll 53.91509364067411 42.2117397712837 … … 609 313 en 907721.7528865209 6272366.919585204 610 314 ll2 -33.61049536177813 49.39342803597181 611 EPSG:325838612 ll 74.9091597003715 48.6558222215854613 en 3606180.541481807 8316743.387064737614 ll2 74.90915970034688 48.65582222148265615 EPSG:325938616 ll -21.15366469684895 43.8728399352876617 en 3382970.287678295 7660430.264294319618 ll2 -21.153664696850008 43.872839935287615619 315 EPSG:32639 620 316 ll 78.6419869416514 46.228999725737076 … … 625 321 en 350900.55360484595 5906320.568081439 626 322 ll2 -36.97742607037497 49.324836404927225 627 EPSG:325839628 ll 10.069996634834698 50.89113881049788629 en 3488071.8580129175 1113153.5634056593630 ll2 10.069996634832757 50.89113881049788631 EPSG:325939632 ll -80.60626087327603 52.65395467079264633 en 3530133.667575561 1050315.8629393857634 ll2 -80.60626087327402 52.65395467079222635 323 EPSG:32640 636 324 ll 53.864121366142705 57.44751774032813 … … 641 329 en 433274.5310192385 1247408.597646758 642 330 ll2 -78.82845088034634 53.913620238883254 643 EPSG:325840644 ll 59.76387277043521 54.37575445989696645 en 3352609.2433711775 6628031.663774361646 ll2 59.76387277042328 54.3757544598978647 EPSG:325940648 ll -59.976831400819776 53.71307388643351649 en 3316584.951075214 3346612.0227742614650 ll2 -59.97683140076955 53.71307388645429651 331 EPSG:32641 652 332 ll 49.571868382578565 60.41766515903435 … … 657 337 en 728606.5155660608 7089027.454681892 658 338 ll2 -26.300363121968427 65.28977338534429 659 EPSG:325841660 ll 35.58653083746617 64.35677273465917661 en 3622921.5587330637 3938937.297505369662 ll2 35.58653083746628 64.3567727346599663 EPSG:325941664 ll -8.569269531855056 59.196306698858095665 en 3081142.021083381 9050693.67939459666 ll2 -8.569269531841547 59.196306699145694667 339 EPSG:32642 668 340 ll -1.9071382046033127 69.6619425586165 … … 673 345 en 305909.44786115893 4838613.998469358 674 346 ll2 -46.577984188152286 66.46686755702721 675 EPSG:325842676 ll 25.166004030978193 65.74989542315689677 en 3172361.982347163 2787283.797766475678 ll2 25.166004030968768 65.74989542310783679 EPSG:325942680 ll 4.080834969902384 68.85686170431453681 en 3484112.3880951386 1.0451063940938618E7682 ll2 4.0808349699011 68.85686170431453683 347 EPSG:32643 684 348 ll 1.4895490042363466 73.50410601478126 … … 689 353 en 831325.5755857098 7197935.587045648 690 354 ll2 -25.298456802245934 78.29022557747085 691 EPSG:325843692 ll 4.150327197207609 78.3848695646801693 en 3875887.9687866927 459548.1926994108694 ll2 4.150327197204124 78.3848695644895695 EPSG:325943696 ll -29.743707910694475 76.0025527331224697 en 3596943.9161184365 6709192.520165732698 ll2 -29.743707910696273 76.00255273312254699 355 EPSG:32644 700 356 ll 62.44367553939567 85.9750751673437 … … 705 361 en 503490.800754981 7419521.505624639 706 362 ll2 -23.33385396213198 81.03414728671824 707 EPSG:325844708 ll 75.60794388867498 76.12849875200254709 en 3364981.5494354456 8397002.701060116710 ll2 75.6079438885618 76.12849875337659711 EPSG:325944712 ll -30.531583699528298 81.70562992872959713 en 3567691.5671678428 6622096.716226475714 ll2 -30.531583699529946 81.70562992872962715 363 EPSG:32645 716 364 ll 77.10426871059683 89.0221872636809 … … 721 369 en 647670.9268986753 6918455.120880485 722 370 ll2 -27.85050176577014 88.49974130692154 723 EPSG:325845724 ll 26.567408149697318 83.36177880919017725 en 3137515.090758361 2943675.0079206247726 ll2 26.567408149671067 83.36177880907614727 EPSG:325945728 ll 2.578648544548429 86.376506281797729 en 3430689.1714494377 1.0285037041594315E7730 ll2 2.5786485445475793 86.37650628179703731 371 EPSG:32646 732 372 ll 50.87569190579864 89.74835752271836 … … 737 377 en 704183.7578679286 7671781.457049133 738 378 ll2 -21.04349177141502 94.96493214411359 739 EPSG:325846740 ll 63.92292390294496 94.7877236444445741 en 3587673.4974403377 7089654.0896276785742 ll2 63.92292390294584 94.78772364444468743 EPSG:325946744 ll -27.516680128901726 90.30293533287998745 en 3233587.260784949 6953437.221698701746 ll2 -27.516680128899825 90.30293533285851747 379 EPSG:32647 748 380 ll 70.62231324887725 99.90770843411856 … … 753 385 en 376622.8914274465 8070864.873775644 754 386 ll2 -17.444781767557274 97.8382020112942 755 EPSG:325847756 ll 24.432295988352866 97.04644115456145757 en 3301945.3911864622 2703485.993828944758 ll2 24.43229598835463 97.04644115455939759 EPSG:325947760 ll -8.286948582210371 97.25620711941067761 en 3307943.5927900937 9083557.980581835762 ll2 -8.286948582208613 97.25620711941549763 387 EPSG:32648 764 388 ll 39.26637557561634 107.38423392284906 … … 769 393 en 286575.74435410445 3542895.423578527 770 394 ll2 -58.203363958762644 101.36763036814246 771 EPSG:325848772 ll 46.03384980661478 103.1140223730946773 en 3354054.380634229 5099537.604773986774 ll2 46.03384980661091 103.11402237309196775 EPSG:325948776 ll -40.2015653990426 107.76592292342754777 en 3735418.107379437 5546201.218221534778 ll2 -40.20156539902624 107.76592292345568779 395 EPSG:32649 780 396 ll 11.255609425170523 111.88005555487531 … … 785 401 en 347437.22738472256 5766575.122088731 786 402 ll2 -38.23589206710225 109.25679480724578 787 EPSG:325849788 ll 40.20888356028617 112.96180753860006789 en 3666953.426840709 4452787.276805753790 ll2 40.20888356028306 112.96180753860462791 EPSG:325949792 ll -14.246538618712663 111.16491045683226793 en 3517789.6808880107 8425001.167366339794 ll2 -14.246538618711444 111.16491045683226795 403 EPSG:32650 796 404 ll 9.877161924846341 119.53983649063838 … … 801 409 en 455389.40541231557 6720322.495279071 802 410 ll2 -29.64625641154921 116.53909173945958 803 EPSG:325850804 ll 7.616210715276484 116.45258981636005805 en 3439619.8795212046 841907.9688378153806 ll2 7.61621071527457 116.45258981636006807 EPSG:325950808 ll -76.47164414673738 118.0058453305328809 en 3526264.3600744815 1511961.8654556144810 ll2 -76.47164414673597 118.0058453305327811 411 EPSG:32651 812 412 ll 29.894404052484198 123.73791699307937 … … 817 417 en 552907.9443416377 6424786.563103266 818 418 ll2 -32.31249913837346 123.56204788254762 819 EPSG:325851820 ll 21.725369416249812 126.95031997743322821 en 3908772.515332542 2407651.5549905016822 ll2 21.725369416216548 126.95031997750917823 EPSG:325951824 ll 0.7833031741643595 126.9511372405029825 en 3939972.9174714684 1.0086786231606347E7826 ll2 0.7833031741624975 126.95113724002216827 419 EPSG:32652 828 420 ll 51.483168367165725 131.7547299698076 … … 833 425 en 366330.3564929392 5566680.742924484 834 426 ll2 -40.03951775988467 127.43317318342785 835 EPSG:325852836 ll 77.67504105601225 126.61987537613251837 en 3443299.8987672958 8623255.149683818838 ll2 77.67504105600955 126.61987537613504839 EPSG:325952840 ll -46.165327233467806 132.73764589755302841 en 3788543.241543582 4880789.639711136842 ll2 -46.16532723334612 132.73764589761515843 427 EPSG:32653 844 428 ll 3.9439937741275237 139.56906177178473 … … 849 433 en 871098.4449456041 6877512.944383415 850 434 ll2 -28.176037015452554 138.77892968074894 851 EPSG:325853852 ll 26.083256744062194 136.89345436910952853 en 3689380.01900658 2886280.227147239854 ll2 26.083256744064073 136.89345436911194855 EPSG:325953856 ll -45.87471253428649 134.3177889336392857 en 3447055.7540481216 4919646.390117302858 ll2 -45.87471253428452 134.3177889336392859 435 EPSG:32654 860 436 ll 0.16694081399375094 139.49272157099904 … … 865 441 en 584959.5966797009 1552021.5295583569 866 442 ll2 -76.09420937278291 144.16836879819374 867 EPSG:325854868 ll 14.035950638187842 140.08015854857118869 en 3400677.277176704 1551895.6508759246870 ll2 14.035950638186595 140.0801585485713871 EPSG:325954872 ll -25.929690605130276 144.77860345874333873 en 3878549.273940019 7126639.008097633874 ll2 -25.929690605097683 144.77860345887737875 443 EPSG:32655 876 444 ll 15.325514479625792 147.8741788025552 … … 881 449 en 505872.17624536785 9399764.410398081 882 450 ll2 -5.430354355647516 147.0530080779711 883 EPSG:325855884 ll 77.98041139164597 150.59532728556897885 en 3583530.9638016927 8658747.742117923886 ll2 77.98041139163264 150.59532728547734887 EPSG:325955888 ll -67.36971313700667 147.14032372466914889 en 3506025.4076778376 2527397.535901879890 ll2 -67.36971313700812 147.14032372466914891 451 EPSG:32656 892 452 ll 5.776293589970747 152.597733111241 … … 897 457 en 471106.27600235335 4184906.4029197395 898 458 ll2 -52.48522451023299 152.57450200005235 899 EPSG:325856900 ll 75.75021549023971 156.78618479521796901 en 3603965.805226966 8410644.654430462902 ll2 75.75021549021352 156.78618479507574903 EPSG:325956904 ll -76.53705419120314 152.6360393265017905 en 3490541.0647844165 1504857.830462996906 ll2 -76.53705419120176 152.63603932650173907 459 EPSG:32657 908 460 ll 46.64079768923685 162.60478038581513 … … 913 465 en -11660.993969266012 7705261.8022987265 914 466 ll2 -20.682272656454828 154.09167529182264 915 EPSG:325857916 ll -2.5518216908727664 156.83036399626832917 en 3258753.8207377037 -282258.28133069887918 ll2 -2.5518216908720097 156.8303639962868919 EPSG:325957920 ll -58.994723879002095 160.57399408839512921 en 3590438.0945516834 3459470.63889967922 ll2 -58.99472387900292 160.5739940883954923 467 EPSG:32658 924 468 ll -0.9538168752974308 164.16373403116563 … … 929 473 en 143617.7405419257 9282345.981167397 930 474 ll2 -6.48232231845288 161.77847911410754 931 EPSG:325858932 ll -2.586076572514262 164.68386700435784933 en 3464857.720582474 -285845.48559063184934 ll2 -2.5860765725134036 164.68386700435784935 EPSG:325958936 ll -17.66251906484051 161.38408849981434937 en 3116279.3397864336 8043474.153641874938 ll2 -17.662519064826693 161.38408849985055939 475 EPSG:32659 940 476 ll 40.50129189541295 171.1151678182983 … … 945 481 en -33309.996839536005 8929144.290482178 946 482 ll2 -9.653111284606696 166.1444317392922 947 EPSG:325859948 ll 52.00257317380204 174.55502943709467949 en 3744002.8755504917 5767293.095868946950 ll2 52.00257317370479 174.55502943709706951 EPSG:325959952 ll -14.819657409628974 166.9501496486915953 en 3063930.2734069796 8357673.865215932954 ll2 -14.819657409599168 166.95014964886468955 483 EPSG:32660 956 484 ll 84.38466705329412 178.8187390897748 … … 961 489 en 933779.944968744 5972815.905636307 962 490 ll2 -36.29211488900613 181.82910716792168 963 EPSG:325860964 ll 70.40119916139271 174.88104576259516965 en 3420687.6959503973 7811996.6522821905966 ll2 70.40119916139157 174.88104576259576967 EPSG:325960968 ll -15.122420619100339 174.82953069805916969 en 3266743.101644071 8326980.665398677970 ll2 -15.12242061909968 174.82953069806615971 491 EPSG:31370 972 492 ll 49.91513996934379 3.0892264075922404 -
trunk/src/org/openstreetmap/josm/data/projection/Lambert.java
r5235 r5236 96 96 97 97 public Lambert(final int layoutZone) { 98 if (layoutZone < 0 || layoutZone >= 4) 99 throw new IllegalArgumentException(); 98 100 this.layoutZone = layoutZone; 99 101 ellps = Ellipsoid.clarkeIGN; -
trunk/src/org/openstreetmap/josm/data/projection/ProjectionInfo.java
r5234 r5236 4 4 import java.util.Collection; 5 5 import java.util.HashMap; 6 import java.util.Map; 6 7 7 8 import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice; … … 9 10 10 11 public class ProjectionInfo { 11 private static HashMap<String, ProjectionChoice> allCodesPC;12 private static HashMap<String, Projection> allCodes;12 private static Map<String, ProjectionChoice> allCodesPC = new HashMap<String, ProjectionChoice>(); 13 private static Map<String, Projection> allCodes = new HashMap<String, Projection>(); 13 14 14 15 static { 15 allCodes = new HashMap<String, Projection>();16 16 for (ProjectionChoice pc : ProjectionPreference.getProjectionChoices()) { 17 17 for (String code : pc.allCodes()) { -
trunk/src/org/openstreetmap/josm/data/projection/Puwg.java
r5235 r5236 22 22 private final int zone; 23 23 24 static public PuwgData[] Zones = new PuwgData[] {24 static public PuwgData[] zones = new PuwgData[] { 25 25 new Epsg2180(), 26 26 new Epsg2176(), … … 35 35 36 36 public Puwg(int zone) { 37 if (zone < 0 || zone >= zones.length) 38 throw new IllegalArgumentException(); 37 39 ellps = Ellipsoid.GRS80; 38 40 proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator(); … … 44 46 datum = GRS80Datum.INSTANCE; 45 47 this.zone = zone; 46 PuwgData z = Zones[zone];48 PuwgData z = zones[zone]; 47 49 x_0 = z.getPuwgFalseEasting(); 48 50 y_0 = z.getPuwgFalseNorthing(); … … 58 60 @Override 59 61 public Integer getEpsgCode() { 60 return Zones[zone].getEpsgCode();62 return zones[zone].getEpsgCode(); 61 63 } 62 64 … … 68 70 @Override 69 71 public String getCacheDirectoryName() { 70 return Zones[zone].getCacheDirectoryName();72 return zones[zone].getCacheDirectoryName(); 71 73 } 72 74 73 75 @Override 74 76 public Bounds getWorldBoundsLatLon() { 75 return Zones[zone].getWorldBoundsLatLon();77 return zones[zone].getWorldBoundsLatLon(); 76 78 } 77 79 -
trunk/src/org/openstreetmap/josm/data/projection/UTM.java
r5235 r5236 24 24 private Hemisphere hemisphere; 25 25 26 /**27 * Applies an additional false easting of 3000000 m if true.28 */29 private boolean offset;30 31 26 public UTM() { 32 this(DEFAULT_ZONE, DEFAULT_HEMISPHERE , false);27 this(DEFAULT_ZONE, DEFAULT_HEMISPHERE); 33 28 } 34 29 35 public UTM(int zone, Hemisphere hemisphere, boolean offset) { 30 public UTM(int zone, Hemisphere hemisphere) { 31 if (zone < 1 || zone > 60) 32 throw new IllegalArgumentException(); 36 33 ellps = Ellipsoid.WGS84; 37 34 proj = new org.openstreetmap.josm.data.projection.proj.TransverseMercator(); … … 44 41 this.zone = zone; 45 42 this.hemisphere = hemisphere; 46 this.offset = offset; 47 x_0 = 500000 + (offset ? 3000000 : 0); 43 x_0 = 500000; 48 44 y_0 = hemisphere == Hemisphere.North ? 0 : 10000000; 49 45 lon_0 = getUtmCentralMeridianDeg(zone); … … 81 77 @Override 82 78 public Integer getEpsgCode() { 83 return ( (offset?325800:32600)+ getzone() + (hemisphere == Hemisphere.South?100:0));79 return (32600 + getzone() + (hemisphere == Hemisphere.South?100:0)); 84 80 } 85 81 -
trunk/src/org/openstreetmap/josm/data/projection/UTM_France_DOM.java
r5235 r5236 61 61 62 62 public UTM_France_DOM(int currentGeodesic) { 63 if (currentGeodesic < 0 || currentGeodesic >= 5) 64 throw new IllegalArgumentException(); 63 65 this.currentGeodesic = currentGeodesic; 64 66 datum = utmDatums[currentGeodesic]; -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java
r5234 r5236 20 20 @Override 21 21 public Projection getProjection() { 22 return new GaussKrueger(index ToZone(index));22 return new GaussKrueger(index + 2); 23 23 } 24 24 25 25 @Override 26 protected intindexToZone(int index) {27 return index + 2;26 protected String indexToZone(int index) { 27 return Integer.toString(index + 2); 28 28 } 29 29 30 30 @Override 31 protected int zoneToIndex(int zone) { 32 return zone - 2; 31 protected int zoneToIndex(String zone) { 32 try { 33 return Integer.parseInt(zone) - 2; 34 } catch(NumberFormatException e) {} 35 return defaultIndex; 33 36 } 34 37 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertCC9ZonesProjectionChoice.java
r5234 r5236 76 76 77 77 @Override 78 protected intindexToZone(int index) {79 return index + 1;78 protected String indexToZone(int index) { 79 return Integer.toString(index + 1); 80 80 } 81 81 82 82 @Override 83 protected int zoneToIndex(int zone) { 84 return zone - 1; 83 protected int zoneToIndex(String zone) { 84 try { 85 return Integer.parseInt(zone) - 1; 86 } catch(NumberFormatException e) {} 87 return defaultIndex; 85 88 } 86 89 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertProjectionChoice.java
r5234 r5236 70 70 71 71 @Override 72 protected intindexToZone(int index) {73 return index + 1;72 protected String indexToZone(int index) { 73 return Integer.toString(index + 1); 74 74 } 75 75 76 76 @Override 77 protected int zoneToIndex(int zone) { 78 return zone - 1; 77 protected int zoneToIndex(String zone) { 78 try { 79 return Integer.parseInt(zone) - 1; 80 } catch(NumberFormatException e) {} 81 return defaultIndex; 79 82 } 80 83 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/ListProjectionChoice.java
r5234 r5236 46 46 * Convert 0-based index to preference value. 47 47 */ 48 abstract protected intindexToZone(int index);48 abstract protected String indexToZone(int index); 49 49 50 50 /** 51 51 * Convert preference value to 0-based index. 52 52 */ 53 abstract protected int zoneToIndex( intzone);53 abstract protected int zoneToIndex(String zone); 54 54 55 55 @Override 56 56 public void setPreferences(Collection<String> args) { 57 Integerzone = null;57 String zone = null; 58 58 if (args != null && args.size() >= 1) { 59 try { 60 zone = Integer.parseInt(args.iterator().next()); 61 } catch(NumberFormatException e) {} 59 zone = args.iterator().next(); 62 60 } 63 61 int index; … … 101 99 CBPanel p = (CBPanel) panel; 102 100 int index = p.prefcb.getSelectedIndex(); 103 return Collections.singleton( Integer.toString(indexToZone(index)));101 return Collections.singleton(indexToZone(index)); 104 102 } 105 103 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/PuwgProjectionChoice.java
r5234 r5236 13 13 14 14 public PuwgProjectionChoice() { 15 super("core:puwg", tr("PUWG (Poland)"), Puwg. Zones, tr("PUWG Zone"));15 super("core:puwg", tr("PUWG (Poland)"), Puwg.zones, tr("PUWG Zone")); 16 16 } 17 17 … … 23 23 @Override 24 24 public String[] allCodes() { 25 String[] zones = new String[Puwg. Zones.length];26 for (int zone = 0; zone < Puwg.Zones.length; zone++) {27 zones[ zone] = Puwg.Zones[zone].toCode();25 String[] zones = new String[Puwg.zones.length]; 26 for (int index = 0; index < Puwg.zones.length; index++) { 27 zones[index] = Puwg.zones[index].toCode(); 28 28 } 29 29 return zones; … … 32 32 @Override 33 33 public Collection<String> getPreferencesFromCode(String code) { 34 for (Puwg.PuwgData p : Puwg. Zones) {34 for (Puwg.PuwgData p : Puwg.zones) { 35 35 if (code.equals(p.toCode())) 36 36 return Collections.singleton(code); … … 45 45 46 46 @Override 47 protected intindexToZone(int index) {48 return index;47 protected String indexToZone(int index) { 48 return Puwg.zones[index].toCode(); 49 49 } 50 50 51 51 @Override 52 protected int zoneToIndex(int zone) { 53 return zone; 52 protected int zoneToIndex(String zone) { 53 for (int i=0; i<Puwg.zones.length; i++) { 54 if (zone.equals(Puwg.zones[i].toCode())) { 55 return i; 56 } 57 } 58 return defaultIndex; 54 59 } 55 60 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java
r5234 r5236 12 12 13 13 import javax.swing.ButtonGroup; 14 import javax.swing.JCheckBox;15 14 import javax.swing.JLabel; 16 15 import javax.swing.JPanel; … … 27 26 private UTM.Hemisphere hemisphere; 28 27 29 /**30 * Applies an additional false easting of 3000000 m if true.31 */32 private boolean offset;33 34 28 private final static List<String> cbEntries = new ArrayList<String>(); 35 29 static { … … 46 40 47 41 public JRadioButton north, south; 48 public JCheckBox offsetBox;49 42 50 43 public UTMPanel(Object[] entries, int initialIndex, String label, ActionListener listener) { … … 76 69 this.add(GBC.glue(1, 1), GBC.eol().fill(GBC.BOTH)); 77 70 78 //Offset79 offsetBox = new JCheckBox();80 offsetBox.setSelected(offset);81 82 this.add(new JLabel(tr("Offset 3.000.000m east")), GBC.std().insets(5,5,0,5));83 this.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));84 this.add(offsetBox, GBC.eop().fill(GBC.HORIZONTAL));85 this.add(GBC.glue(1, 1), GBC.eol().fill(GBC.BOTH));86 87 71 if (listener != null) { 88 72 north.addActionListener(listener); 89 73 south.addActionListener(listener); 90 offsetBox.addActionListener(listener);91 74 } 92 75 } … … 100 83 @Override 101 84 public Projection getProjection() { 102 return new UTM(index ToZone(index), hemisphere, offset);85 return new UTM(index + 1, hemisphere); 103 86 } 104 87 … … 108 91 int index = p.prefcb.getSelectedIndex(); 109 92 UTM.Hemisphere hemisphere = p.south.isSelected()?UTM.Hemisphere.South:UTM.Hemisphere.North; 110 boolean offset = p.offsetBox.isSelected(); 111 return Arrays.asList(Integer.toString(indexToZone(index)), hemisphere.toString(), (offset?"offset":"standard")); 93 return Arrays.asList(indexToZone(index), hemisphere.toString()); 112 94 } 113 95 … … 116 98 ArrayList<String> projections = new ArrayList<String>(60*4); 117 99 for (int zone = 1;zone <= 60; zone++) { 118 for (boolean offset : new boolean[] { false, true }) { 119 for (UTM.Hemisphere hemisphere : UTM.Hemisphere.values()) { 120 projections.add("EPSG:" + ((offset?325800:32600) + zone + (hemisphere == UTM.Hemisphere.South?100:0))); 121 } 100 for (UTM.Hemisphere hemisphere : UTM.Hemisphere.values()) { 101 projections.add("EPSG:" + (32600 + zone + (hemisphere == UTM.Hemisphere.South?100:0))); 122 102 } 123 103 } … … 127 107 @Override 128 108 public Collection<String> getPreferencesFromCode(String code) { 129 boolean offset = code.startsWith("EPSG:3258") || code.startsWith("EPSG:3259");130 109 131 if (code.startsWith("EPSG:326") || code.startsWith("EPSG:327") || offset) {110 if (code.startsWith("EPSG:326") || code.startsWith("EPSG:327")) { 132 111 try { 133 UTM.Hemisphere hemisphere; 134 String zonestring; 135 if (offset) { 136 hemisphere = code.charAt(8)=='8'?UTM.Hemisphere.North:UTM.Hemisphere.South; 137 zonestring = code.substring(9); 138 } else { 139 hemisphere = code.charAt(7)=='6'?UTM.Hemisphere.North:UTM.Hemisphere.South; 140 zonestring = code.substring(8); 141 } 142 112 UTM.Hemisphere hemisphere = code.charAt(7)=='6'?UTM.Hemisphere.North:UTM.Hemisphere.South; 113 String zonestring = code.substring(8); 143 114 int zoneval = Integer.parseInt(zonestring); 144 115 if(zoneval > 0 && zoneval <= 60) 145 return Arrays.asList(zonestring, hemisphere.toString() , (offset?"offset":"standard"));116 return Arrays.asList(zonestring, hemisphere.toString()); 146 117 } catch(NumberFormatException e) {} 147 118 } … … 153 124 super.setPreferences(args); 154 125 UTM.Hemisphere hemisphere = DEFAULT_HEMISPHERE; 155 boolean offset = false;156 126 157 127 if(args != null) { … … 161 131 hemisphere = UTM.Hemisphere.valueOf(array[1]); 162 132 } 163 164 if (array.length > 2) {165 offset = array[2].equals("offset");166 }167 133 } 168 134 this.hemisphere = hemisphere; 169 this.offset = offset;170 135 } 171 136 172 137 @Override 173 protected intindexToZone(int index) {174 return index + 1;138 protected String indexToZone(int index) { 139 return Integer.toString(index + 1); 175 140 } 176 141 177 142 @Override 178 protected int zoneToIndex(int zone) { 179 return zone - 1; 143 protected int zoneToIndex(String zone) { 144 try { 145 return Integer.parseInt(zone) - 1; 146 } catch(NumberFormatException e) {} 147 return defaultIndex; 180 148 } 181 149 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTM_France_DOM_ProjectionChoice.java
r5234 r5236 24 24 25 25 @Override 26 protected intindexToZone(int index) {27 return index + 1;26 protected String indexToZone(int index) { 27 return Integer.toString(index + 1); 28 28 } 29 29 30 30 @Override 31 protected int zoneToIndex(int zone) { 32 return zone - 1; 31 protected int zoneToIndex(String zone) { 32 try { 33 return Integer.parseInt(zone) - 1; 34 } catch(NumberFormatException e) {} 35 return defaultIndex; 33 36 } 34 37 -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
r4277 r5236 12 12 import java.util.LinkedHashMap; 13 13 import java.util.List; 14 import java.util.Map; 14 15 import java.util.Map.Entry; 15 16 … … 17 18 import org.openstreetmap.josm.data.coor.EastNorth; 18 19 import org.openstreetmap.josm.data.coor.LatLon; 20 import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice; 21 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 19 22 import org.openstreetmap.josm.tools.Utils; 20 23 … … 29 32 30 33 /** 31 * create a list of epsg codes and bounds to be used by 34 * create a list of epsg codes and bounds to be used by the perl script 32 35 * @param args 33 36 */ 34 37 public static void main(String[] args) { 35 HashMap<String, Projection> allCodes = new LinkedHashMap<String, Projection>(); 36 List<Projection> projs = Projections.getProjections(); 37 for (Projection p: projs) { 38 if (p instanceof ProjectionSubPrefs) { 39 for (String code : ((ProjectionSubPrefs)p).allCodes()) { 40 ProjectionSubPrefs projSub = recreateProj((ProjectionSubPrefs)p); 41 Collection<String> prefs = projSub.getPreferencesFromCode(code); 42 projSub.setPreferences(prefs); 43 allCodes.put(code, projSub); 44 } 45 } else { 46 allCodes.put(p.toCode(), p); 38 Map<String, Projection> allCodes = new HashMap<String, Projection>(); 39 for (ProjectionChoice pc : ProjectionPreference.getProjectionChoices()) { 40 for (String code : pc.allCodes()) { 41 Collection<String> pref = pc.getPreferencesFromCode(code); 42 pc.setPreferences(pref); 43 Projection p = pc.getProjection(); 44 allCodes.put(code, p); 47 45 } 48 46 } … … 51 49 } 52 50 } 53 54 private static ProjectionSubPrefs recreateProj(ProjectionSubPrefs proj) { 55 try { 56 return proj.getClass().newInstance(); 57 } catch (Exception e) { 58 throw new IllegalStateException( 59 tr("Cannot instantiate projection ''{0}''", proj.getClass().toString()), e); 60 } 61 } 62 51 63 52 @Test 64 53 public void test() throws IOException, FileNotFoundException { -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
r5073 r5236 2 2 package org.openstreetmap.josm.data.projection; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 4 6 5 import java.io.BufferedReader; … … 12 11 import java.io.IOException; 13 12 import java.util.ArrayList; 14 import java.util.Arrays;15 13 import java.util.Collection; 16 import java.util.Collections;17 14 import java.util.HashMap; 18 15 import java.util.HashSet; 19 import java.util.LinkedHash Map;16 import java.util.LinkedHashSet; 20 17 import java.util.List; 21 18 import java.util.Map; … … 31 28 import org.openstreetmap.josm.data.coor.EastNorth; 32 29 import org.openstreetmap.josm.data.coor.LatLon; 33 import org.openstreetmap.josm.tools.Utils; 30 import org.openstreetmap.josm.gui.preferences.projection.ProjectionChoice; 31 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 34 32 import org.openstreetmap.josm.tools.Pair; 35 33 … … 58 56 public static void main(String[] args) throws IOException, FileNotFoundException { 59 57 setUp(); 60 Map<String, Projection> allCodes = new LinkedHashMap<String, Projection>(); 61 List<Projection> projs = Projections.getProjections(); 62 for (Projection p: projs) { 63 if (p instanceof ProjectionSubPrefs) { 64 for (String code : ((ProjectionSubPrefs)p).allCodes()) { 65 ProjectionSubPrefs projSub = recreateProj((ProjectionSubPrefs)p); 66 Collection<String> prefs = projSub.getPreferencesFromCode(code); 67 projSub.setPreferences(prefs); 68 allCodes.put(code, projSub); 69 } 70 } else { 71 allCodes.put(p.toCode(), p); 58 59 Map<String, Projection> supportedCodesMap = new HashMap<String, Projection>(); 60 for (ProjectionChoice pc : ProjectionPreference.getProjectionChoices()) { 61 for (String code : pc.allCodes()) { 62 Collection<String> pref = pc.getPreferencesFromCode(code); 63 pc.setPreferences(pref); 64 Projection p = pc.getProjection(); 65 supportedCodesMap.put(code, p); 72 66 } 73 67 } … … 77 71 prevData = readData(); 78 72 } 79 Map<String,TestData> prevCodes = new HashMap<String,TestData>();73 Map<String,TestData> prevCodesMap = new HashMap<String,TestData>(); 80 74 for (TestData data : prevData) { 81 prevCodes.put(data.code, data); 75 prevCodesMap.put(data.code, data); 76 } 77 78 Set<String> codesToWrite = new LinkedHashSet<String>(); 79 for (TestData data : prevData) { 80 if (supportedCodesMap.containsKey(data.code)) { 81 codesToWrite.add(data.code); 82 } 83 } 84 for (String code : supportedCodesMap.keySet()) { 85 if (!codesToWrite.contains(code)) { 86 codesToWrite.add(code); 87 } 82 88 } 83 89 … … 86 92 out.write("# Data for test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java\n"); 87 93 out.write("# Format: 1. Projection code; 2. lat/lon; 3. lat/lon projected -> east/north; 4. east/north (3.) inverse projected\n"); 88 for (Entry<String, Projection> e : allCodes.entrySet()) { 89 Projection proj = e.getValue(); 94 for (Entry<String, Projection> e : supportedCodesMap.entrySet()) { 95 } 96 for (String code : codesToWrite) { 97 Projection proj = supportedCodesMap.get(code); 90 98 Bounds b = proj.getWorldBoundsLatLon(); 91 99 double lat, lon; 92 TestData prev = prevCodes .get(proj.toCode());100 TestData prev = prevCodesMap.get(proj.toCode()); 93 101 if (prev != null) { 94 102 lat = prev.ll.lat(); … … 103 111 } 104 112 out.close(); 105 }106 107 private static ProjectionSubPrefs recreateProj(ProjectionSubPrefs proj) {108 try {109 return proj.getClass().newInstance();110 } catch (Exception e) {111 throw new IllegalStateException(112 tr("Cannot instantiate projection ''{0}''", proj.getClass().toString()), e);113 }114 113 } 115 114 … … 163 162 StringBuilder fail = new StringBuilder(); 164 163 165 List<Projection> projs = Projections.getProjections(); 166 for (Projection p: projs) { 167 Collection<String> codes = null; 168 if (p instanceof ProjectionSubPrefs) { 169 codes = Arrays.asList(((ProjectionSubPrefs)p).allCodes()); 170 } else { 171 codes = Collections.singleton(p.toCode()); 172 } 173 for (String code : codes) { 164 for (ProjectionChoice pc : ProjectionPreference.getProjectionChoices()) { 165 for (String code : pc.allCodes()) { 174 166 if (!dataCodes.contains(code)) { 175 167 fail.append("Did not find projection "+code+" in test data!\n"); -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionTest.java
r4837 r5236 2 2 package org.openstreetmap.josm.data.projection; 3 3 4 import java.util.Collections;5 4 import java.util.Random; 6 5 … … 30 29 } 31 30 32 Lambert lam = new Lambert(); 33 for (int zone=1; zone<=4; ++zone) { 34 lam.setPreferences(Collections.singletonList(Integer.toString(zone))); 35 testProj(lam); 31 for (int i=0; i<=3; ++i) { 32 testProj(new Lambert(i)); 36 33 } 37 34 38 Puwg puwg = new Puwg(); 39 for (PuwgData pd : Puwg.Zones) { 40 puwg.setPreferences(Collections.singletonList(pd.toCode())); 41 testProj(puwg); 35 for (int i=0; i<=4; ++i) { 36 testProj(new Puwg(i)); 42 37 } 43 38 44 39 testProj(new SwissGrid()); 45 40 46 UTM utm = new UTM();47 41 for (int i=0; i<=6; ++i) { 48 42 int zone; 49 43 if (i==0) { 50 zone = 0;44 zone = 1; 51 45 } else if (i==6) { 52 zone = 59;46 zone = 60; 53 47 } else { 54 zone = rand.nextInt(60) ;48 zone = rand.nextInt(60) + 1; 55 49 } 56 utm.setPreferences(Collections.singletonList(Integer.toString(zone))); 57 testProj(utm); 58 50 UTM.Hemisphere hem = rand.nextBoolean() ? UTM.Hemisphere.North : UTM.Hemisphere.South; 51 testProj(new UTM(zone, hem)); 59 52 } 60 53 61 54 if (!"yes".equals(System.getProperty("suppressPermanentFailure"))) { 62 UTM_France_DOM utmFr = new UTM_France_DOM(); 63 for (int zone=1; zone<=5; ++zone) { 64 utmFr.setPreferences(Collections.singletonList(Integer.toString(zone))); 65 testProj(utmFr); 55 for (int i=0; i<=4; ++i) { 56 testProj(new UTM_France_DOM(i)); 66 57 } 67 58 } 68 59 69 LambertCC9Zones lamCC9 = new LambertCC9Zones(); 70 for (int i=1; i<=9; ++i) { 71 lamCC9.setPreferences(Collections.singletonList(Integer.toString(i))); 72 testProj(lamCC9); 60 for (int i=0; i<=8; ++i) { 61 testProj(new LambertCC9Zones(i)); 73 62 } 74 63
Note:
See TracChangeset
for help on using the changeset viewer.