Changeset 14049 in josm


Ignore:
Timestamp:
2018-07-25T10:37:36+02:00 (6 years ago)
Author:
simon04
Message:

Specify +axis=neu for Austrian projections

This allows to use the following WMTS in JOSM:

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/data_nodist/projection/josm-epsg

    r13707 r14049  
    137137# Rijksdriehoekscoördinaten (Netherlands)
    138138<28992> +proj=sterea +lat_0=52d9'22.178" +lon_0=5d23'15.5" +k_0=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.877402,4.0725 +units=m +bounds=3.1,50.56,7.6,53.63  <>
     139# MGI / Austria GK West
     140<31254> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     141# MGI / Austria GK Central
     142<31255> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     143# MGI / Austria GK East
     144<31256> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     145# MGI / Austria GK M28
     146<31257> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     147# MGI / Austria GK M31
     148<31258> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     149# MGI / Austria GK M34
     150<31259> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     151# MGI / Austria M28
     152<31284> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     153# MGI / Austria M31
     154<31285> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     155# MGI / Austria M34
     156<31286> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
    139157# Belgian Lambert 1972
    140158<31370> +proj=lcc +lat_0=90 +lat_1=49d50'0.00204" +lat_2=51d10'0.00204" +lon_0=4d22'2.952" +x_0=150000.013 +y_0=5400088.438 +ellps=intl +towgs84=-99.06,53.32,-112.49,0.419,-0.83,1.885,-1.0 +units=m +bounds=2.54,49.51,6.4,51.5  <>
  • trunk/data_nodist/projection/projection-reference-data

    r13708 r14049  
    4070640706    15.524765489720075,33.410063680681546,-75183.516480737,-1301974.097651883
    4070740707    17.714969153272243,41.95626382892638,114613.50402083,-352794.234822817
    40708 <EPSG:31254> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +no_defs  <>
    40709     16.704350576440667,-39.41588558839312,548608.348782722,-9384308.839667352
    40710     5.087633521900576,17.108808074044234,-559010.047996347,-3100567.64755282
    40711     15.666677969458915,-34.40922213777655,490350.226643089,-8822241.271279193
    40712     9.690320367835717,88.37461558751613,-1862.992877556,4819928.196660712
    40713     7.468172431868942,66.89859119880882,-125360.372816732,2425469.643286673
    40714     3.8717794473707015,53.175498424234775,-431744.174344061,913226.670631299
    40715     8.32007239439972,2.47050145901828,-224091.519560919,-4727102.845311792
    40716     4.9165084473155645,-47.401477376232286,-409010.197850572,-1.0266254746832352E7
    40717 <EPSG:31255> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +no_defs  <>
    40718     8.67313664070818,-55.412876309633965,-295188.014062428,-1.115311950843294E7
    40719     12.030991255614705,-52.73854306270829,-88135.772732602,-1.084639088447732E7
    40720     19.326290038178904,66.28556690059324,268859.569666519,2367081.482130386
    40721     13.330323931528447,-57.326465794171476,-362.78387282,-1.1356280997460961E7
    40722     16.005180972083455,-12.180518806582526,290711.323819052,-6348903.630341711
    40723     10.064833975691988,33.48095820363737,-303850.448807786,-1289600.574302534
    40724     16.49004061332503,-13.74756906010434,341386.981515982,-6523066.148107393
    40725     8.370596747358844,84.34174020389617,-54388.756031201,4371846.481533451
    40726 <EPSG:31256> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +no_defs  <>
    40727     19.26116920574693,-49.50209926295006,211880.512772576,-1.0489705368865669E7
    40728     17.772997176758544,-14.019952020147699,155403.853970618,-6551440.343802076
    40729     14.185625190161282,55.15498470379126,-136782.491779541,1116108.823951378
    40730     17.833041069886967,80.16816405523562,28806.884251539,3903781.509803871
    40731     19.56075144806445,52.470561654383204,219398.535322658,820109.024656454
    40732     21.84831732125914,-23.449898010564297,563943.426222092,-7605554.40989493
    40733     17.303341081831697,47.71596300261794,72870.775349523,286809.988571543
    40734     20.057760643586608,-63.57795601561598,184738.706368463,-1.2058118092505034E7
    40735 <EPSG:31257> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=-5000000 +datum=hermannskogel +units=m +no_defs  <>
    40736     13.448401593631255,64.52484983699696,299605.652907127,2161565.934544209
    40737     14.203275259722618,50.410043030402306,425090.197643468,593143.596089071
    40738     17.173358610730297,-16.684866947714355,880806.893453153,-6858399.951952142
    40739     11.682714560747462,-63.57136643046246,216819.722608131,-1.205269461225022E7
    40740     10.93122287780162,-44.78903212353934,197092.995464648,-9961828.937782118
    40741     8.740138044782562,69.44608283644465,87666.715800917,2707534.602843526
    40742     13.620797019690203,-55.220102124110596,358947.497544642,-1.1126694546275374E7
    40743     7.680823951376442,-67.18636947547739,35028.990681827,-1.2457450903145585E7
    40744 <EPSG:31258> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +datum=hermannskogel +units=m +no_defs  <>
    40745     12.590198107995802,16.442517510416565,370569.802350324,-3181723.246549226
    40746     11.8665072853921,86.7052452813036,440785.567445377,4633577.501248924
    40747     18.275787064857063,-40.37286951931421,869611.12864879,-9482887.638135448
    40748     20.259069228531445,19.80823472202232,1176948.884550049,-2794434.064953919
    40749     8.423245401277198,16.85965100161053,-73839.953326467,-3129173.047191193
    40750     17.500035696816255,-75.54465549376074,565887.935558478,-1.3391550897149337E7
    40751     16.19979701807265,-77.72235653229082,517886.090622711,-1.3632193777176695E7
    40752     7.659180887080413,-59.96081885103282,133127.372874345,-1.1663278175061641E7
    40753 <EPSG:31259> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=-5000000 +datum=hermannskogel +units=m +no_defs  <>
    40754     20.918742613188435,-26.948692039343058,1205443.81485499,-7990556.772326373
    40755     17.2661800367815,-53.8551414264235,811222.705431764,-1.09702582889706E7
    40756     22.331879647606314,-46.549431111290275,1209797.528876063,-1.0174820729489682E7
    40757     20.4610660157538,1.8513360182217582,1209565.083762779,-4795236.796061303
    40758     10.667080624892535,-6.560159968111705,122249.024440974,-5729402.618996352
    40759     11.891705658188755,-54.86009920939572,464750.024453696,-1.1090752217170356E7
    40760     22.93794995592335,-24.79750250198299,1418606.570728261,-7760195.77688208
    40761     16.535143842283208,9.032484500188119,772128.276377434,-4001636.07943975
     40708<EPSG:31254> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40709    6.730314873219369,-69.69840143924209,-1.273927358168633E7,-139679.060102705
     40710    12.738757917616734,18.783969274272167,-2921014.330947396,253567.657402286
     40711    6.688306432545563,68.32972402524805,2586640.003561706,-150087.576615822
     40712    11.265434695904169,-57.797613267052796,-1.1409120070204725E7,55209.561872397
     40713    14.72786534899139,36.397066285744444,-961903.46344969,394328.664099535
     40714    11.987427313839381,23.64659533183864,-2383359.511940803,168709.549712422
     40715    7.810948110658461,12.551848660310938,-3611018.489869419,-274310.530291306
     40716    14.408808358964423,56.171758003812016,1234695.364493803,253130.583536554
     40717<EPSG:31255> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40718    6.659177402263931,27.328282812171608,-1958722.762968794,-661403.901141615
     40719    13.021673875683433,43.39888653159559,-193397.970156568,-25209.059760873
     40720    8.301024091305832,53.4205188386365,932763.718452002,-334359.864970386
     40721    7.224678887098913,-11.979717873405193,-6332637.794125505,-666583.274605781
     40722    13.358013234734702,8.356928776262905,-4076347.551431638,2625.546138356
     40723    14.240188761677107,-65.22529406402168,-1.223666089292557E7,42241.210472981
     40724    15.775484075375518,44.66313847158665,-50075.334803669,193726.898691697
     40725    6.561347984166816,60.316247933022225,1708072.888632488,-373711.696724133
     40726<EPSG:31256> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40727    16.759668681213324,-30.901122394186174,-8420390.948030356,40606.846856753
     40728    16.4016878456974,82.07818442935445,4116696.159370877,1268.483484066
     40729    12.271493231978237,66.46256539601606,2379824.069573296,-180814.678380738
     40730    19.644133611113915,29.890566033609545,-1687917.319396146,319903.177880804
     40731    19.767948807320735,-27.88938867397534,-8091259.118252624,338125.244787625
     40732    21.43578881884023,-34.1633667584683,-8793848.864002436,470526.48397385
     40733    12.645800027631017,-25.598612923210105,-7837861.478322087,-370714.159632664
     40734    15.872859135658661,86.89985942211337,4655192.307714144,-2549.950056397
     40735<EPSG:31257> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40736    10.560875957791676,55.662992682618324,1170599.039042499,164377.815368743
     40737    11.22848497717215,24.82145632815846,-2253907.981058999,240432.898975241
     40738    17.00644973938342,-60.07077812272408,-1.168068238101615E7,520885.642843092
     40739    16.15262736782673,-11.08462854847842,-6232484.356807952,786612.102000498
     40740    6.11197244804813,29.88404250069371,-1685707.801666059,-258009.800535642
     40741    3.8590043339475364,-59.96318798605575,-1.1667640702586405E7,-211447.915001738
     40742    15.434264682770774,62.538630463845465,1946860.32097498,412434.430111524
     40743    8.175095198139655,-22.250204177357006,-7463438.739869332,-72695.09436691
     40744<EPSG:31258> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40745    10.07321416205033,-62.48835165992507,-1.193553946244595E7,281813.58450063
     40746    18.276131610431783,52.940337854309604,878939.921825171,782269.479020944
     40747    15.17665557743833,-73.42328012290898,-1.3151631796618886E7,508547.218424846
     40748    12.825139506665362,71.1596173066396,2897957.323115613,431824.451326199
     40749    12.427736934400773,-87.9970476404854,-1.4777781124639673E7,446340.797723736
     40750    11.06471863774162,85.71640336375393,4523391.225284217,431276.411780573
     40751    14.03406003365375,-38.59231217558362,-9273705.148820184,510858.179039465
     40752    9.974516057419613,-81.46191539600729,-1.4049626701430367E7,394203.399571382
     40753<EPSG:31259> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=-5000000 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40754    14.78204158224276,49.00231374502894,430560.162869235,636588.25465315
     40755    16.521628122360983,-15.556994975404379,-6721033.941452511,770070.909327875
     40756    18.530674086263957,72.7193273810658,3073239.659277619,823052.80516032
     40757    22.37086877638862,-18.458556077723713,-7052818.465702474,1388517.80731598
     40758    17.07821970006808,15.262813153548748,-3312288.395651119,829976.513712813
     40759    18.71285251414203,-68.86375782592633,-1.2643929321156632E7,845623.245426774
     40760    14.811289238777649,-59.31129211341745,-1.1578327081662858E7,663177.168855002
     40761    17.514334016743835,-31.52905673537753,-8490534.240089234,862008.634557255
    4076240762<EPSG:31281> +proj=tmerc +lat_0=0 +lon_0=28 +k=1 +x_0=0 +y_0=0 +ellps=bessel +towgs84=682,-203,480,0,0,0,0 +pm=ferro +units=m +no_defs  <>
    4076340763    4.0882722642889,-46.54825307485722,-478542.846294492,-5176212.230585787
     
    4078740787    17.640003060351916,-10.404490633362187,143474.662352777,-1151335.783062453
    4078840788    9.943094981839526,-67.88328161251748,-267771.354348882,-7546622.386831757
    40789 <EPSG:31284> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +datum=hermannskogel +units=m +no_defs  <>
    40790     15.286621803280568,2.1340511332023766,701552.836199112,236392.474376777
    40791     3.6653709584901786,35.621817921204965,-454531.538381915,3963668.839454047
    40792     15.435359546747966,-41.27531610301946,577287.006379613,-4583917.735622705
    40793     8.578447025193597,-35.97607280316944,-8483.668881716,-3984553.887893575
    40794     10.755553352800247,55.86839250745504,176491.213320361,6193524.524652229
    40795     14.509259002702011,-56.90708709871884,404078.856177584,-6317344.241347691
    40796     4.52744229054763,-44.18957603682991,-314378.580613598,-4911471.327579508
    40797     14.73284907499732,-66.09179973252475,348680.561083564,-7339936.6295874
    40798 <EPSG:31285> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +datum=hermannskogel +units=m +no_defs  <>
    40799     14.059516102940531,-1.0443168059733523,530703.711648107,-115939.378417757
    40800     16.64566225572161,-84.0299415674132,488315.760898431,-9335855.429067118
    40801     9.714602388019875,-40.21458519391454,141758.935692836,-4459851.572334943
    40802     11.012615344098226,-61.490610689697846,326229.931352217,-6822318.464054843
    40803     14.225791498807995,-41.00422679230941,524889.908812501,-4541629.03306314
    40804     20.293336801249392,20.659662903670622,1176560.855931565,2300508.182125558
    40805     13.878260767198341,-43.25744703671536,494057.253125972,-4791644.5507617
    40806     18.027042894248538,-61.90311929727129,696360.339459566,-6874994.767531895
    40807 <EPSG:31286> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +datum=hermannskogel +units=m +no_defs  <>
    40808     19.004271543822085,36.24001080695001,990158.013678415,4014980.491648905
    40809     13.663072714199915,21.0072130547143,472292.86516495,2325708.874633281
    40810     15.142885726742211,5.789846874139172,618074.00384702,639893.053575442
    40811     20.193234694075922,10.263926142768668,1173091.147446598,1137089.753825814
    40812     15.185467931822355,-0.5319751419024783,622130.903477759,-59294.814428547
    40813     10.953808022298784,2.025605807153127,150571.503653903,224521.447258264
    40814     17.111697176755214,-54.122796185491254,800731.534442119,-5999922.748970442
    40815     13.967892100411978,-55.060619654382386,598733.251562021,-6106584.447802988
     40789<EPSG:31284> +proj=tmerc +lat_0=0 +lon_0=10.33333333333333 +k=1 +x_0=150000 +y_0=0 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40790    12.614421442382513,-74.03171894970914,-8219954.949429885,219860.408315334
     40791    7.0508734938691795,-48.077234917251914,-5332349.996298105,-94766.085853663
     40792    5.644411229963503,-81.5607948072056,-9062155.19327514,73067.237620325
     40793    6.4179598691503985,73.40931858531869,8153021.387357713,25371.981856439
     40794    7.501712732445383,88.46379309324405,9830086.546793057,141699.140212748
     40795    10.635045476070244,-36.399050597364194,-4030103.765558198,176849.465288824
     40796    10.127792324995042,35.85216978622914,3968684.486449129,131410.806539786
     40797    6.514611478962749,36.83330737924497,4084361.984777927,-190742.616343133
     40798<EPSG:31285> +proj=tmerc +lat_0=0 +lon_0=13.33333333333333 +k=1 +x_0=450000 +y_0=0 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40799    13.511714633181665,46.20031141468425,5117886.888807316,463818.558844569
     40800    19.03189224305742,-29.89276660859322,-3322216.522077793,1000664.509880753
     40801    10.844074363908756,53.93561202273264,5981151.131061024,286610.09285676
     40802    10.060888074442454,22.46655061605452,2488666.81235159,113023.622754924
     40803    6.8222132351809215,-48.67739661691417,-5414369.290230017,-29503.498432913
     40804    8.829171591659012,17.37160593811808,1926593.705211206,-29141.615609154
     40805    13.46861326906186,15.83044807140324,1750401.568629719,464424.218978021
     40806    20.248456356585137,-28.724186880067208,-3198700.241049194,1126246.671089831
     40807<EPSG:31286> +proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=750000 +y_0=0 +datum=hermannskogel +units=m +axis=neu +no_defs  <>
     40808    16.243660537612545,7.319482118666315,808910.070263495,740032.951689704
     40809    21.130888504118502,75.92944808691954,8435472.734712053,880309.846776067
     40810    19.594289575040854,-84.65626618572723,-9405653.930594724,783792.787172848
     40811    19.5189401115055,9.229895821081826,1021744.121268782,1100166.582299268
     40812    20.5344135831888,-75.58144719389215,-8395720.67736465,866582.760523444
     40813    19.85511497160883,88.95357630574316,9884779.305095969,757416.567306758
     40814    15.496599804584175,56.91997046114929,6310829.640370189,699165.547006866
     40815    22.51680055304349,21.746526207058096,2418054.763704245,1390537.337003009
    4081640816<EPSG:31287> +proj=lcc +lat_1=49 +lat_2=46 +lat_0=47.5 +lon_0=13.33333333333333 +x_0=400000 +y_0=400000 +datum=hermannskogel +units=m +no_defs  <>
    4081740817    67.44461981554436,3.643671039991613,7563591.252528059,-2315218.850381509
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r13763 r14049  
    6565    protected Bounds bounds;
    6666    private double metersPerUnitWMTS;
     67    /**
     68     * Starting in PROJ 4.8.0, the {@code +axis} argument can be used to control the axis orientation of the coordinate system.
     69     * The default orientation is "easting, northing, up" but directions can be flipped, or axes flipped using
     70     * combinations of the axes in the {@code +axis} switch. The values are: {@code e} (Easting), {@code w} (Westing),
     71     * {@code n} (Northing), {@code s} (Southing), {@code u} (Up), {@code d} (Down);
     72     * Examples: {@code +axis=enu} (the default easting, northing, elevation), {@code +axis=neu} (northing, easting, up;
     73     * useful for "lat/long" geographic coordinates, or south orientated transverse mercator), {@code +axis=wnu}
     74     * (westing, northing, up - some planetary coordinate systems have "west positive" coordinate systems)
     75     * @apiNote https://proj4.org/usage/projections.html#axis-orientation
     76     */
    6777    private String axis = "enu"; // default axis orientation is East, North, Up
    6878
     
    725735    public boolean switchXY() {
    726736        // TODO: support for other axis orientation such as West South, and Up Down
     737        // +axis=neu
    727738        return this.axis.startsWith("ne");
    728739    }
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

    r13757 r14049  
    1919import org.junit.Rule;
    2020import org.junit.Test;
     21import org.openstreetmap.gui.jmapviewer.TileXY;
    2122import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;
    2223import org.openstreetmap.josm.Main;
     
    6667    private ImageryInfo testMultipleTileMatrixForLayer = getImagery(TestUtils.getTestDataRoot() +
    6768            "wmts/bug13975-multiple-tile-matrices-for-one-layer-projection.xml");
     69    private ImageryInfo testImageryGisKtnGvAt = getImagery(TestUtils.getTestDataRoot() + "wmts/gis.ktn.gv.at.xml");
    6870
    6971    private static ImageryInfo getImagery(String path) {
     
    409411        assertEquals("Latitude", expected.lat(), result.lat(), 1e-04);
    410412    }
     413
     414    @Test
     415    public void testGisKtnGvAt() throws IOException, WMTSGetCapabilitiesException {
     416        Main.setProjection(Projections.getProjectionByCode("EPSG:31258"));
     417        final WMTSTileSource source = new WMTSTileSource(testImageryGisKtnGvAt);
     418        source.initProjection(Main.getProjection());
     419        final TileXY tile = source.latLonToTileXY(46.6103, 13.8558, 11);
     420        assertEquals("https://gis.ktn.gv.at/arcgis/rest/services/tilecache/Ortho_2013_2015" +
     421                        "/MapServer/WMTS/tile/1.0.0/tilecache_Ortho_2013_2015/default/default028mm/11/6299/7373.jpg",
     422                source.getTileUrl(11, tile.getXIndex(), tile.getYIndex()));
     423    }
    411424}
Note: See TracChangeset for help on using the changeset viewer.