Changeset 8568 in josm for trunk


Ignore:
Timestamp:
2015-07-04T22:52:23+02:00 (9 years ago)
Author:
wiktorn
Message:

Basic WMTS support.

  • added information about units and to_meter to EPSG projection definitions (needed for WMTS)
  • added WMTSTileSource and WMTSLayer classes
  • a bit of cleanup of AbstractTileSourceLayer and align so it will work properly with WMTS tile definitions
  • added Imagery Preferences panel for WMTS and icon for button
  • added removal of wms: / tms: / wmts: prefix, if user will paste them into the field
  • CachedFile - added possibility to send custom headers with request
  • added support for unit and to_meter in CustomProjection
  • AbstractTMSTileSource cleanups (change of Coordinate to ICoordinate)
  • moved JCSCachedTileLoaderJob.read() to Utils

Addresses: #10623

Tested with Polish WMTS service proivders, Walonnie needs still some debugging, as it is not working right now.

Location:
trunk
Files:
8 added
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/projection/epsg

    r8255 r8568  
    11# NAD27(76) / MTM zone 8
    2 <2017> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-75.5,40,-74,60  <>
     2<2017> +proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-75.5,40,-74,60  <>
    33# NAD27(76) / MTM zone 9
    4 <2018> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-78.5,40,-74.5,60  <>
     4<2018> +proj=tmerc +lat_0=0 +lon_0=-76.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-78.5,40,-74.5,60  <>
    55# NAD27(76) / MTM zone 10
    6 <2019> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-81.5,40,-77.5,60  <>
     6<2019> +proj=tmerc +lat_0=0 +lon_0=-79.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-81.5,40,-77.5,60  <>
    77# NAD27(76) / MTM zone 11
    8 <2020> +proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-84,40,-80.5,60  <>
     8<2020> +proj=tmerc +lat_0=0 +lon_0=-82.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-84,40,-80.5,60  <>
    99# NAD27(76) / MTM zone 12
    10 <2021> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-83,40,-79,60  <>
     10<2021> +proj=tmerc +lat_0=0 +lon_0=-81 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-83,40,-79,60  <>
    1111# NAD27(76) / MTM zone 13
    12 <2022> +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-86,40,-82,60  <>
     12<2022> +proj=tmerc +lat_0=0 +lon_0=-84 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-86,40,-82,60  <>
    1313# NAD27(76) / MTM zone 14
    14 <2023> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-89,40,-85,60  <>
     14<2023> +proj=tmerc +lat_0=0 +lon_0=-87 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-89,40,-85,60  <>
    1515# NAD27(76) / MTM zone 15
    16 <2024> +proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-92,40,-88,60  <>
     16<2024> +proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-92,40,-88,60  <>
    1717# NAD27(76) / MTM zone 16
    18 <2025> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-95,40,-91,60  <>
     18<2025> +proj=tmerc +lat_0=0 +lon_0=-93 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-95,40,-91,60  <>
    1919# NAD27(76) / MTM zone 17
    20 <2026> +proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +bounds=-96,40,-94,60  <>
     20<2026> +proj=tmerc +lat_0=0 +lon_0=-96 +k=0.9999 +x_0=304800 +y_0=0 +ellps=clrk66 +units=m +bounds=-96,40,-94,60  <>
    2121# Lambert 93 (France)
    22 <2154> +proj=lcc +lat_0=46.5 +lat_1=44 +lat_2=49 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,41,10.2,51  <>
     22<2154> +proj=lcc +lat_0=46.5 +lat_1=44 +lat_2=49 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,41,10.2,51  <>
    2323# PUWG 2000 Zone 5 (Poland)
    24 <2176> +proj=tmerc +lon_0=15 +k_0=0.999923 +x_0=5500000 +ellps=GRS80 +nadgrids=null +bounds=13.5,49,16.5,54.84  <>
     24<2176> +proj=tmerc +lon_0=15 +k_0=0.999923 +x_0=5500000 +ellps=GRS80 +nadgrids=null +units=m +bounds=13.5,49,16.5,54.84  <>
    2525# PUWG 2000 Zone 6 (Poland)
    26 <2177> +proj=tmerc +lon_0=18 +k_0=0.999923 +x_0=6500000 +ellps=GRS80 +nadgrids=null +bounds=16.5,49,19.5,54.84  <>
     26<2177> +proj=tmerc +lon_0=18 +k_0=0.999923 +x_0=6500000 +ellps=GRS80 +nadgrids=null +units=m +bounds=16.5,49,19.5,54.84  <>
    2727# PUWG 2000 Zone 7 (Poland)
    28 <2178> +proj=tmerc +lon_0=21 +k_0=0.999923 +x_0=7500000 +ellps=GRS80 +nadgrids=null +bounds=19.5,49,22.5,54.84  <>
     28<2178> +proj=tmerc +lon_0=21 +k_0=0.999923 +x_0=7500000 +ellps=GRS80 +nadgrids=null +units=m +bounds=19.5,49,22.5,54.84  <>
    2929# PUWG 2000 Zone 8 (Poland)
    30 <2179> +proj=tmerc +lon_0=24 +k_0=0.999923 +x_0=8500000 +ellps=GRS80 +nadgrids=null +bounds=22.5,49,25.5,54.84  <>
     30<2179> +proj=tmerc +lon_0=24 +k_0=0.999923 +x_0=8500000 +ellps=GRS80 +nadgrids=null +units=m +bounds=22.5,49,25.5,54.84  <>
    3131# PUWG 1992 (Poland)
    32 <2180> +proj=tmerc +lon_0=19 +k_0=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +nadgrids=null +bounds=14.12,49,24.15,54.84  <>
     32<2180> +proj=tmerc +lon_0=19 +k_0=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 +nadgrids=null +units=m +bounds=14.12,49,24.15,54.84  <>
    3333# UTM France (DOM) Fort Marigot
    34 <2969> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=intl +towgs84=136.596,248.148,-429.789 +bounds=-63.25,17.6,-62.5,18.5  <>
     34<2969> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=intl +towgs84=136.596,248.148,-429.789 +units=m +bounds=-63.25,17.6,-62.5,18.5  <>
    3535# UTM France (DOM) Sainte Anne
    36 <2970> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=intl +towgs84=-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984 +bounds=-61.9,15.8,-60.9,16.6  <>
     36<2970> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=intl +towgs84=-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984 +units=m +bounds=-61.9,15.8,-60.9,16.6  <>
    3737# UTM France (DOM) Guyane
    38 <2972> +proj=tmerc +lon_0=-51 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +nadgrids=null +bounds=-54,2.16,-49.62,9.06  <>
     38<2972> +proj=tmerc +lon_0=-51 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-54,2.16,-49.62,9.06  <>
    3939# UTM France (DOM) Martinique
    40 <2973> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=intl +towgs84=126.926,547.939,130.409,-2.7867,5.16124,-0.85844,13.82265 +bounds=-61.25,14.25,-60.725,15.025  <>
     40<2973> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=intl +towgs84=126.926,547.939,130.409,-2.7867,5.16124,-0.85844,13.82265 +units=m +bounds=-61.25,14.25,-60.725,15.025  <>
    4141# UTM France (DOM) Reunion
    42 <2975> +proj=tmerc +lon_0=57 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=GRS80 +nadgrids=null +bounds=37.58,-25.92,58.27,-10.6  <>
     42<2975> +proj=tmerc +lon_0=57 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=GRS80 +nadgrids=null +units=m +bounds=37.58,-25.92,58.27,-10.6  <>
    4343# Monte Mario / Italy zone 1
    44 <3003> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +bounds=5,36,13,48 <>
     44<3003> +proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +bounds=5,36,13,48 <>
    4545# Monte Mario / Italy zone 2
    46 <3004> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +bounds=11,34,24,48 <>
     46<3004> +proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +units=m +bounds=11,34,24,48 <>
    4747# SWEREF99 13 30 / EPSG:3008 (Sweden)
    48 <3008> +proj=tmerc +lon_0=13.5 +x_0=150000 +ellps=GRS80 +nadgrids=null +bounds=12.1,55.2,14.65,62.26  <>
     48<3008> +proj=tmerc +lon_0=13.5 +x_0=150000 +ellps=GRS80 +nadgrids=null +units=m +bounds=12.1,55.2,14.65,62.26  <>
    4949# LKS-92 (Latvia TM)
    50 <3059> +proj=tmerc +lon_0=24 +k_0=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +nadgrids=null +bounds=-180,-90,180,90  <>
     50<3059> +proj=tmerc +lon_0=24 +k_0=0.9996 +x_0=500000 +y_0=-6000000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-180,-90,180,90  <>
    5151# Lambert Zone (Estonia)
    52 <3301> +proj=lcc +lat_0=57.51755393055556 +lat_1=59.333333333333336 +lat_2=58 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +nadgrids=null +bounds=21.64,56.05,28.58,61.13  <>
     52<3301> +proj=lcc +lat_0=57.51755393055556 +lat_1=59.333333333333336 +lat_2=58 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +nadgrids=null +units=m +bounds=21.64,56.05,28.58,61.13  <>
    5353# Belgian Lambert 2008
    54 <3812> +proj=lcc +lat_0=50d47'52.134" +lat_1=49d50'0" +lat_2=51d10'0" +lon_0=4d21'33.177" +x_0=649328 +y_0=665262 +ellps=GRS80 +nadgrids=null +bounds=2.54,49.51,6.4,51.5  <>
     54<3812> +proj=lcc +lat_0=50d47'52.134" +lat_1=49d50'0" +lat_2=51d10'0" +lon_0=4d21'33.177" +x_0=649328 +y_0=665262 +ellps=GRS80 +nadgrids=null +units=m +bounds=2.54,49.51,6.4,51.5  <>
    5555# Pseudo-Mercator
    56 <3857> +proj=josm:smerc +ellps=WGS84 +datum=WGS84 +bounds=-180,-85.05112877980659,180,85.05112877980659  <>
     56<3857> +proj=josm:smerc +ellps=WGS84 +datum=WGS84 +units=m +bounds=-180,-85.05112877980659,180,85.05112877980659  <>
    5757# Lambert CC9 (France) Zone 42
    58 <3942> +proj=lcc +lat_0=42 +lat_1=41.25 +lat_2=42.75 +lon_0=3 +x_0=1700000 +y_0=1200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,41,10.2,44.5  <>
     58<3942> +proj=lcc +lat_0=42 +lat_1=41.25 +lat_2=42.75 +lon_0=3 +x_0=1700000 +y_0=1200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,41,10.2,44.5  <>
    5959# Lambert CC9 (France) Zone 43
    60 <3943> +proj=lcc +lat_0=43 +lat_1=42.25 +lat_2=43.75 +lon_0=3 +x_0=1700000 +y_0=2200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,41,10.2,45.5  <>
     60<3943> +proj=lcc +lat_0=43 +lat_1=42.25 +lat_2=43.75 +lon_0=3 +x_0=1700000 +y_0=2200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,41,10.2,45.5  <>
    6161# Lambert CC9 (France) Zone 44
    62 <3944> +proj=lcc +lat_0=44 +lat_1=43.25 +lat_2=44.75 +lon_0=3 +x_0=1700000 +y_0=3200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,41.5,10.2,46.5  <>
     62<3944> +proj=lcc +lat_0=44 +lat_1=43.25 +lat_2=44.75 +lon_0=3 +x_0=1700000 +y_0=3200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,41.5,10.2,46.5  <>
    6363# Lambert CC9 (France) Zone 45
    64 <3945> +proj=lcc +lat_0=45 +lat_1=44.25 +lat_2=45.75 +lon_0=3 +x_0=1700000 +y_0=4200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,42.5,10.2,47.5  <>
     64<3945> +proj=lcc +lat_0=45 +lat_1=44.25 +lat_2=45.75 +lon_0=3 +x_0=1700000 +y_0=4200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,42.5,10.2,47.5  <>
    6565# Lambert CC9 (France) Zone 46
    66 <3946> +proj=lcc +lat_0=46 +lat_1=45.25 +lat_2=46.75 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,43.5,10.2,48.5  <>
     66<3946> +proj=lcc +lat_0=46 +lat_1=45.25 +lat_2=46.75 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,43.5,10.2,48.5  <>
    6767# Lambert CC9 (France) Zone 47
    68 <3947> +proj=lcc +lat_0=47 +lat_1=46.25 +lat_2=47.75 +lon_0=3 +x_0=1700000 +y_0=6200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,44.5,10.2,49.5  <>
     68<3947> +proj=lcc +lat_0=47 +lat_1=46.25 +lat_2=47.75 +lon_0=3 +x_0=1700000 +y_0=6200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,44.5,10.2,49.5  <>
    6969# Lambert CC9 (France) Zone 48
    70 <3948> +proj=lcc +lat_0=48 +lat_1=47.25 +lat_2=48.75 +lon_0=3 +x_0=1700000 +y_0=7200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,45.5,10.2,50.5  <>
     70<3948> +proj=lcc +lat_0=48 +lat_1=47.25 +lat_2=48.75 +lon_0=3 +x_0=1700000 +y_0=7200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,45.5,10.2,50.5  <>
    7171# Lambert CC9 (France) Zone 49
    72 <3949> +proj=lcc +lat_0=49 +lat_1=48.25 +lat_2=49.75 +lon_0=3 +x_0=1700000 +y_0=8200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,46.5,10.2,51.1  <>
     72<3949> +proj=lcc +lat_0=49 +lat_1=48.25 +lat_2=49.75 +lon_0=3 +x_0=1700000 +y_0=8200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,46.5,10.2,51.1  <>
    7373# Lambert CC9 (France) Zone 50
    74 <3950> +proj=lcc +lat_0=50 +lat_1=49.25 +lat_2=50.75 +lon_0=3 +x_0=1700000 +y_0=9200000 +ellps=GRS80 +nadgrids=null +bounds=-5.5,47.5,10.2,51.1  <>
     74<3950> +proj=lcc +lat_0=50 +lat_1=49.25 +lat_2=50.75 +lon_0=3 +x_0=1700000 +y_0=9200000 +ellps=GRS80 +nadgrids=null +units=m +bounds=-5.5,47.5,10.2,51.1  <>
    7575# ETRS89
    7676<4258> +proj=lonlat +ellps=GRS80 +datum=GRS80 +bounds=-180,-90,180,90  <>
     
    7878<4326> +proj=lonlat +ellps=WGS84 +datum=WGS84 +bounds=-180,-90,180,90  <>
    7979# Swiss Grid (Switzerland)
    80 <21781> +proj=somerc +lat_0=46d57'8.66" +lon_0=7d26'22.5" +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346 +bounds=5.7,45.7,10.6,47.9  <>
     80<21781> +proj=somerc +lat_0=46d57'8.66" +lon_0=7d26'22.5" +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346 +units=m +bounds=5.7,45.7,10.6,47.9  <>
    8181# HD72 / EOV (Hungary)
    8282<23700> +proj=somerc +lat_0=47.14439372222222 +lon_0=19.04857177777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +towgs84=52.17,-71.82,-14.9 +units=m +bounds=16.1200,45.7800,22.9100,48.6000  <>
    8383# ETRS89 / UTM zone 28N
    84 <25828> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=-20,-5,-10,85 <>
     84<25828> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=-20,-5,-10,85 <>
    8585# ETRS89 / UTM zone 29N
    86 <25829> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=-14,-5,-4,85  <>
     86<25829> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=-14,-5,-4,85  <>
    8787# ETRS89 / UTM zone 30N
    88 <25830> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=-8,-5,2,85  <>
     88<25830> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=-8,-5,2,85  <>
    8989# ETRS89 / UTM zone 31N
    90 <25831> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=-2,-5,8,85  <>
     90<25831> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=-2,-5,8,85  <>
    9191# ETRS89 / UTM zone 32N
    92 <25832> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=4,-5,14,85  <>
     92<25832> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=4,-5,14,85  <>
    9393# ETRS89 / UTM zone 33N
    94 <25833> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=10,-5,20,85  <>
     94<25833> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=10,-5,20,85  <>
    9595# ETRS89 / UTM zone 34N
    96 <25834> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=16,-5,26,85  <>
     96<25834> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=16,-5,26,85  <>
    9797# ETRS89 / UTM zone 35N
    98 <25835> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=22,-5,32,85  <>
     98<25835> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=22,-5,32,85  <>
    9999# ETRS89 / UTM zone 36N
    100 <25836> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=28,-5,38,85  <>
     100<25836> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=28,-5,38,85  <>
    101101# ETRS89 / UTM zone 37N
    102 <25837> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=34,-5,44,85  <>
     102<25837> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=34,-5,44,85  <>
    103103# ETRS89 / UTM zone 38N
    104 <25838> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=40,-5,50,85  <>
     104<25838> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=40,-5,50,85  <>
    105105# Lambert 4 Zones France (Nord)
    106 <27561> +proj=lcc +lat_0=49.5 +lat_1=48d35'54.682" +lat_2=50d23'45.282" +lon_0=2d20'14.025" +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +nadgrids=ntf_r93_b.gsb +bounds=-4.416666666666665,46.65,9.18,51.300000000000004  <>
     106<27561> +proj=lcc +lat_0=49.5 +lat_1=48d35'54.682" +lat_2=50d23'45.282" +lon_0=2d20'14.025" +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +nadgrids=ntf_r93_b.gsb +units=m +bounds=-4.416666666666665,46.65,9.18,51.300000000000004  <>
    107107# Lambert 4 Zones France (Centre)
    108 <27562> +proj=lcc +lat_0=46.8 +lat_1=45d53'56.108" +lat_2=47d41'45.652" +lon_0=2d20'14.025" +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +nadgrids=ntf_r93_b.gsb +bounds=-4.416666666666665,43.95,9.18,49.65  <>
     108<27562> +proj=lcc +lat_0=46.8 +lat_1=45d53'56.108" +lat_2=47d41'45.652" +lon_0=2d20'14.025" +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +nadgrids=ntf_r93_b.gsb +units=m +bounds=-4.416666666666665,43.95,9.18,49.65  <>
    109109# Lambert 4 Zones France (South)
    110 <27563> +proj=lcc +lat_0=44.1 +lat_1=43d11'57.449" +lat_2=44d59'45.938" +lon_0=2d20'14.025" +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +nadgrids=ntf_r93_b.gsb +bounds=-4.416666666666665,41.49,9.18,46.95  <>
     110<27563> +proj=lcc +lat_0=44.1 +lat_1=43d11'57.449" +lat_2=44d59'45.938" +lon_0=2d20'14.025" +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +nadgrids=ntf_r93_b.gsb +units=m +bounds=-4.416666666666665,41.49,9.18,46.95  <>
    111111# Lambert 4 Zones France (Corsica)
    112 <27564> +proj=lcc +lat_0=42.165 +lat_1=41d33'37.396" +lat_2=42d46'3.588" +lon_0=2d20'14.025" +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +nadgrids=ntf_r93_b.gsb +bounds=-4.416666666666665,41.49,9.18,44.267667  <>
     112<27564> +proj=lcc +lat_0=42.165 +lat_1=41d33'37.396" +lat_2=42d46'3.588" +lon_0=2d20'14.025" +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +nadgrids=ntf_r93_b.gsb +units=m +bounds=-4.416666666666665,41.49,9.18,44.267667  <>
    113113# Belgian Lambert 1972
    114 <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 +bounds=2.54,49.51,6.4,51.5  <>
     114<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  <>
    115115# Gauß-Krüger Zone 2
    116 <31466> +proj=tmerc +lon_0=6 +x_0=2500000 +ellps=bessel +nadgrids=BETA2007.gsb +bounds=3.5,-5,8.5,85  <>
     116<31466> +proj=tmerc +lon_0=6 +x_0=2500000 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +bounds=3.5,-5,8.5,85  <>
    117117# Gauß-Krüger Zone 3
    118 <31467> +proj=tmerc +lon_0=9 +x_0=3500000 +ellps=bessel +nadgrids=BETA2007.gsb +bounds=6.5,-5,11.5,85  <>
     118<31467> +proj=tmerc +lon_0=9 +x_0=3500000 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +bounds=6.5,-5,11.5,85  <>
    119119# Gauß-Krüger Zone 4
    120 <31468> +proj=tmerc +lon_0=12 +x_0=4500000 +ellps=bessel +nadgrids=BETA2007.gsb +bounds=9.5,-5,14.5,85  <>
     120<31468> +proj=tmerc +lon_0=12 +x_0=4500000 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +bounds=9.5,-5,14.5,85  <>
    121121# Gauß-Krüger Zone 5
    122 <31469> +proj=tmerc +lon_0=15 +x_0=5500000 +ellps=bessel +nadgrids=BETA2007.gsb +bounds=12.5,-5,17.5,85  <>
     122<31469> +proj=tmerc +lon_0=15 +x_0=5500000 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +bounds=12.5,-5,17.5,85  <>
    123123# UTM zone 1N
    124 <32601> +proj=tmerc +lon_0=-177 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-182,-5,-172,85  <>
     124<32601> +proj=tmerc +lon_0=-177 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-182,-5,-172,85  <>
    125125# UTM zone 2N
    126 <32602> +proj=tmerc +lon_0=-171 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-176,-5,-166,85  <>
     126<32602> +proj=tmerc +lon_0=-171 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-176,-5,-166,85  <>
    127127# UTM zone 3N
    128 <32603> +proj=tmerc +lon_0=-165 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-170,-5,-160,85  <>
     128<32603> +proj=tmerc +lon_0=-165 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-170,-5,-160,85  <>
    129129# UTM zone 4N
    130 <32604> +proj=tmerc +lon_0=-159 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-164,-5,-154,85  <>
     130<32604> +proj=tmerc +lon_0=-159 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-164,-5,-154,85  <>
    131131# UTM zone 5N
    132 <32605> +proj=tmerc +lon_0=-153 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-158,-5,-148,85  <>
     132<32605> +proj=tmerc +lon_0=-153 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-158,-5,-148,85  <>
    133133# UTM zone 6N
    134 <32606> +proj=tmerc +lon_0=-147 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-152,-5,-142,85  <>
     134<32606> +proj=tmerc +lon_0=-147 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-152,-5,-142,85  <>
    135135# UTM zone 7N
    136 <32607> +proj=tmerc +lon_0=-141 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-146,-5,-136,85  <>
     136<32607> +proj=tmerc +lon_0=-141 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-146,-5,-136,85  <>
    137137# UTM zone 8N
    138 <32608> +proj=tmerc +lon_0=-135 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-140,-5,-130,85  <>
     138<32608> +proj=tmerc +lon_0=-135 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-140,-5,-130,85  <>
    139139# UTM zone 9N
    140 <32609> +proj=tmerc +lon_0=-129 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-134,-5,-124,85  <>
     140<32609> +proj=tmerc +lon_0=-129 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-134,-5,-124,85  <>
    141141# UTM zone 10N
    142 <32610> +proj=tmerc +lon_0=-123 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-128,-5,-118,85  <>
     142<32610> +proj=tmerc +lon_0=-123 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-128,-5,-118,85  <>
    143143# UTM zone 11N
    144 <32611> +proj=tmerc +lon_0=-117 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-122,-5,-112,85  <>
     144<32611> +proj=tmerc +lon_0=-117 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-122,-5,-112,85  <>
    145145# UTM zone 12N
    146 <32612> +proj=tmerc +lon_0=-111 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-116,-5,-106,85  <>
     146<32612> +proj=tmerc +lon_0=-111 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-116,-5,-106,85  <>
    147147# UTM zone 13N
    148 <32613> +proj=tmerc +lon_0=-105 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-110,-5,-100,85  <>
     148<32613> +proj=tmerc +lon_0=-105 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-110,-5,-100,85  <>
    149149# UTM zone 14N
    150 <32614> +proj=tmerc +lon_0=-99 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-104,-5,-94,85  <>
     150<32614> +proj=tmerc +lon_0=-99 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-104,-5,-94,85  <>
    151151# UTM zone 15N
    152 <32615> +proj=tmerc +lon_0=-93 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-98,-5,-88,85  <>
     152<32615> +proj=tmerc +lon_0=-93 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-98,-5,-88,85  <>
    153153# UTM zone 16N
    154 <32616> +proj=tmerc +lon_0=-87 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-92,-5,-82,85  <>
     154<32616> +proj=tmerc +lon_0=-87 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-92,-5,-82,85  <>
    155155# UTM zone 17N
    156 <32617> +proj=tmerc +lon_0=-81 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-86,-5,-76,85  <>
     156<32617> +proj=tmerc +lon_0=-81 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-86,-5,-76,85  <>
    157157# UTM zone 18N
    158 <32618> +proj=tmerc +lon_0=-75 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-80,-5,-70,85  <>
     158<32618> +proj=tmerc +lon_0=-75 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-80,-5,-70,85  <>
    159159# UTM zone 19N
    160 <32619> +proj=tmerc +lon_0=-69 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-74,-5,-64,85  <>
     160<32619> +proj=tmerc +lon_0=-69 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-74,-5,-64,85  <>
    161161# UTM zone 20N
    162 <32620> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-68,-5,-58,85  <>
     162<32620> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-68,-5,-58,85  <>
    163163# UTM zone 21N
    164 <32621> +proj=tmerc +lon_0=-57 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-62,-5,-52,85  <>
     164<32621> +proj=tmerc +lon_0=-57 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-62,-5,-52,85  <>
    165165# UTM zone 22N
    166 <32622> +proj=tmerc +lon_0=-51 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-56,-5,-46,85  <>
     166<32622> +proj=tmerc +lon_0=-51 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-56,-5,-46,85  <>
    167167# UTM zone 23N
    168 <32623> +proj=tmerc +lon_0=-45 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-50,-5,-40,85  <>
     168<32623> +proj=tmerc +lon_0=-45 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-50,-5,-40,85  <>
    169169# UTM zone 24N
    170 <32624> +proj=tmerc +lon_0=-39 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-44,-5,-34,85  <>
     170<32624> +proj=tmerc +lon_0=-39 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-44,-5,-34,85  <>
    171171# UTM zone 25N
    172 <32625> +proj=tmerc +lon_0=-33 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-38,-5,-28,85  <>
     172<32625> +proj=tmerc +lon_0=-33 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-38,-5,-28,85  <>
    173173# UTM zone 26N
    174 <32626> +proj=tmerc +lon_0=-27 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-32,-5,-22,85  <>
     174<32626> +proj=tmerc +lon_0=-27 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-32,-5,-22,85  <>
    175175# UTM zone 27N
    176 <32627> +proj=tmerc +lon_0=-21 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-26,-5,-16,85  <>
     176<32627> +proj=tmerc +lon_0=-21 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-26,-5,-16,85  <>
    177177# UTM zone 28N
    178 <32628> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-20,-5,-10,85  <>
     178<32628> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-20,-5,-10,85  <>
    179179# UTM zone 29N
    180 <32629> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-14,-5,-4,85  <>
     180<32629> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-14,-5,-4,85  <>
    181181# UTM zone 30N
    182 <32630> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-8,-5,2,85  <>
     182<32630> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-8,-5,2,85  <>
    183183# UTM zone 31N
    184 <32631> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-2,-5,8,85  <>
     184<32631> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-2,-5,8,85  <>
    185185# UTM zone 32N
    186 <32632> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=4,-5,14,85  <>
     186<32632> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=4,-5,14,85  <>
    187187# UTM zone 33N
    188 <32633> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=10,-5,20,85  <>
     188<32633> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=10,-5,20,85  <>
    189189# UTM zone 34N
    190 <32634> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=16,-5,26,85  <>
     190<32634> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=16,-5,26,85  <>
    191191# UTM zone 35N
    192 <32635> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=22,-5,32,85  <>
     192<32635> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=22,-5,32,85  <>
    193193# UTM zone 36N
    194 <32636> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=28,-5,38,85  <>
     194<32636> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=28,-5,38,85  <>
    195195# UTM zone 37N
    196 <32637> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=34,-5,44,85  <>
     196<32637> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=34,-5,44,85  <>
    197197# UTM zone 38N
    198 <32638> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=40,-5,50,85  <>
     198<32638> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=40,-5,50,85  <>
    199199# UTM zone 39N
    200 <32639> +proj=tmerc +lon_0=51 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=46,-5,56,85  <>
     200<32639> +proj=tmerc +lon_0=51 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=46,-5,56,85  <>
    201201# UTM zone 40N
    202 <32640> +proj=tmerc +lon_0=57 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=52,-5,62,85  <>
     202<32640> +proj=tmerc +lon_0=57 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=52,-5,62,85  <>
    203203# UTM zone 41N
    204 <32641> +proj=tmerc +lon_0=63 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=58,-5,68,85  <>
     204<32641> +proj=tmerc +lon_0=63 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=58,-5,68,85  <>
    205205# UTM zone 42N
    206 <32642> +proj=tmerc +lon_0=69 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=64,-5,74,85  <>
     206<32642> +proj=tmerc +lon_0=69 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=64,-5,74,85  <>
    207207# UTM zone 43N
    208 <32643> +proj=tmerc +lon_0=75 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=70,-5,80,85  <>
     208<32643> +proj=tmerc +lon_0=75 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=70,-5,80,85  <>
    209209# UTM zone 44N
    210 <32644> +proj=tmerc +lon_0=81 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=76,-5,86,85  <>
     210<32644> +proj=tmerc +lon_0=81 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=76,-5,86,85  <>
    211211# UTM zone 45N
    212 <32645> +proj=tmerc +lon_0=87 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=82,-5,92,85  <>
     212<32645> +proj=tmerc +lon_0=87 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=82,-5,92,85  <>
    213213# UTM zone 46N
    214 <32646> +proj=tmerc +lon_0=93 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=88,-5,98,85  <>
     214<32646> +proj=tmerc +lon_0=93 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=88,-5,98,85  <>
    215215# UTM zone 47N
    216 <32647> +proj=tmerc +lon_0=99 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=94,-5,104,85  <>
     216<32647> +proj=tmerc +lon_0=99 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=94,-5,104,85  <>
    217217# UTM zone 48N
    218 <32648> +proj=tmerc +lon_0=105 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=100,-5,110,85  <>
     218<32648> +proj=tmerc +lon_0=105 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=100,-5,110,85  <>
    219219# UTM zone 49N
    220 <32649> +proj=tmerc +lon_0=111 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=106,-5,116,85  <>
     220<32649> +proj=tmerc +lon_0=111 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=106,-5,116,85  <>
    221221# UTM zone 50N
    222 <32650> +proj=tmerc +lon_0=117 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=112,-5,122,85  <>
     222<32650> +proj=tmerc +lon_0=117 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=112,-5,122,85  <>
    223223# UTM zone 51N
    224 <32651> +proj=tmerc +lon_0=123 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=118,-5,128,85  <>
     224<32651> +proj=tmerc +lon_0=123 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=118,-5,128,85  <>
    225225# UTM zone 52N
    226 <32652> +proj=tmerc +lon_0=129 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=124,-5,134,85  <>
     226<32652> +proj=tmerc +lon_0=129 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=124,-5,134,85  <>
    227227# UTM zone 53N
    228 <32653> +proj=tmerc +lon_0=135 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=130,-5,140,85  <>
     228<32653> +proj=tmerc +lon_0=135 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=130,-5,140,85  <>
    229229# UTM zone 54N
    230 <32654> +proj=tmerc +lon_0=141 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=136,-5,146,85  <>
     230<32654> +proj=tmerc +lon_0=141 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=136,-5,146,85  <>
    231231# UTM zone 55N
    232 <32655> +proj=tmerc +lon_0=147 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=142,-5,152,85  <>
     232<32655> +proj=tmerc +lon_0=147 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=142,-5,152,85  <>
    233233# UTM zone 56N
    234 <32656> +proj=tmerc +lon_0=153 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=148,-5,158,85  <>
     234<32656> +proj=tmerc +lon_0=153 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=148,-5,158,85  <>
    235235# UTM zone 57N
    236 <32657> +proj=tmerc +lon_0=159 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=154,-5,164,85  <>
     236<32657> +proj=tmerc +lon_0=159 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=154,-5,164,85  <>
    237237# UTM zone 58N
    238 <32658> +proj=tmerc +lon_0=165 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=160,-5,170,85  <>
     238<32658> +proj=tmerc +lon_0=165 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=160,-5,170,85  <>
    239239# UTM zone 59N
    240 <32659> +proj=tmerc +lon_0=171 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=166,-5,176,85  <>
     240<32659> +proj=tmerc +lon_0=171 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=166,-5,176,85  <>
    241241# UTM zone 60N
    242 <32660> +proj=tmerc +lon_0=177 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=172,-5,182,85  <>
     242<32660> +proj=tmerc +lon_0=177 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=172,-5,182,85  <>
    243243# UTM zone 1S
    244 <32701> +proj=tmerc +lon_0=-177 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-182,-85,-172,5  <>
     244<32701> +proj=tmerc +lon_0=-177 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-182,-85,-172,5  <>
    245245# UTM zone 2S
    246 <32702> +proj=tmerc +lon_0=-171 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-176,-85,-166,5  <>
     246<32702> +proj=tmerc +lon_0=-171 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-176,-85,-166,5  <>
    247247# UTM zone 3S
    248 <32703> +proj=tmerc +lon_0=-165 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-170,-85,-160,5  <>
     248<32703> +proj=tmerc +lon_0=-165 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-170,-85,-160,5  <>
    249249# UTM zone 4S
    250 <32704> +proj=tmerc +lon_0=-159 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-164,-85,-154,5  <>
     250<32704> +proj=tmerc +lon_0=-159 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-164,-85,-154,5  <>
    251251# UTM zone 5S
    252 <32705> +proj=tmerc +lon_0=-153 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-158,-85,-148,5  <>
     252<32705> +proj=tmerc +lon_0=-153 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-158,-85,-148,5  <>
    253253# UTM zone 6S
    254 <32706> +proj=tmerc +lon_0=-147 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-152,-85,-142,5  <>
     254<32706> +proj=tmerc +lon_0=-147 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-152,-85,-142,5  <>
    255255# UTM zone 7S
    256 <32707> +proj=tmerc +lon_0=-141 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-146,-85,-136,5  <>
     256<32707> +proj=tmerc +lon_0=-141 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-146,-85,-136,5  <>
    257257# UTM zone 8S
    258 <32708> +proj=tmerc +lon_0=-135 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-140,-85,-130,5  <>
     258<32708> +proj=tmerc +lon_0=-135 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-140,-85,-130,5  <>
    259259# UTM zone 9S
    260 <32709> +proj=tmerc +lon_0=-129 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-134,-85,-124,5  <>
     260<32709> +proj=tmerc +lon_0=-129 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-134,-85,-124,5  <>
    261261# UTM zone 10S
    262 <32710> +proj=tmerc +lon_0=-123 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-128,-85,-118,5  <>
     262<32710> +proj=tmerc +lon_0=-123 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-128,-85,-118,5  <>
    263263# UTM zone 11S
    264 <32711> +proj=tmerc +lon_0=-117 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-122,-85,-112,5  <>
     264<32711> +proj=tmerc +lon_0=-117 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-122,-85,-112,5  <>
    265265# UTM zone 12S
    266 <32712> +proj=tmerc +lon_0=-111 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-116,-85,-106,5  <>
     266<32712> +proj=tmerc +lon_0=-111 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-116,-85,-106,5  <>
    267267# UTM zone 13S
    268 <32713> +proj=tmerc +lon_0=-105 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-110,-85,-100,5  <>
     268<32713> +proj=tmerc +lon_0=-105 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-110,-85,-100,5  <>
    269269# UTM zone 14S
    270 <32714> +proj=tmerc +lon_0=-99 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-104,-85,-94,5  <>
     270<32714> +proj=tmerc +lon_0=-99 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-104,-85,-94,5  <>
    271271# UTM zone 15S
    272 <32715> +proj=tmerc +lon_0=-93 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-98,-85,-88,5  <>
     272<32715> +proj=tmerc +lon_0=-93 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-98,-85,-88,5  <>
    273273# UTM zone 16S
    274 <32716> +proj=tmerc +lon_0=-87 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-92,-85,-82,5  <>
     274<32716> +proj=tmerc +lon_0=-87 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-92,-85,-82,5  <>
    275275# UTM zone 17S
    276 <32717> +proj=tmerc +lon_0=-81 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-86,-85,-76,5  <>
     276<32717> +proj=tmerc +lon_0=-81 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-86,-85,-76,5  <>
    277277# UTM zone 18S
    278 <32718> +proj=tmerc +lon_0=-75 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-80,-85,-70,5  <>
     278<32718> +proj=tmerc +lon_0=-75 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-80,-85,-70,5  <>
    279279# UTM zone 19S
    280 <32719> +proj=tmerc +lon_0=-69 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-74,-85,-64,5  <>
     280<32719> +proj=tmerc +lon_0=-69 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-74,-85,-64,5  <>
    281281# UTM zone 20S
    282 <32720> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-68,-85,-58,5  <>
     282<32720> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-68,-85,-58,5  <>
    283283# UTM zone 21S
    284 <32721> +proj=tmerc +lon_0=-57 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-62,-85,-52,5  <>
     284<32721> +proj=tmerc +lon_0=-57 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-62,-85,-52,5  <>
    285285# UTM zone 22S
    286 <32722> +proj=tmerc +lon_0=-51 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-56,-85,-46,5  <>
     286<32722> +proj=tmerc +lon_0=-51 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-56,-85,-46,5  <>
    287287# UTM zone 23S
    288 <32723> +proj=tmerc +lon_0=-45 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-50,-85,-40,5  <>
     288<32723> +proj=tmerc +lon_0=-45 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-50,-85,-40,5  <>
    289289# UTM zone 24S
    290 <32724> +proj=tmerc +lon_0=-39 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-44,-85,-34,5  <>
     290<32724> +proj=tmerc +lon_0=-39 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-44,-85,-34,5  <>
    291291# UTM zone 25S
    292 <32725> +proj=tmerc +lon_0=-33 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-38,-85,-28,5  <>
     292<32725> +proj=tmerc +lon_0=-33 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-38,-85,-28,5  <>
    293293# UTM zone 26S
    294 <32726> +proj=tmerc +lon_0=-27 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-32,-85,-22,5  <>
     294<32726> +proj=tmerc +lon_0=-27 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-32,-85,-22,5  <>
    295295# UTM zone 27S
    296 <32727> +proj=tmerc +lon_0=-21 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-26,-85,-16,5  <>
     296<32727> +proj=tmerc +lon_0=-21 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-26,-85,-16,5  <>
    297297# UTM zone 28S
    298 <32728> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-20,-85,-10,5  <>
     298<32728> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-20,-85,-10,5  <>
    299299# UTM zone 29S
    300 <32729> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-14,-85,-4,5  <>
     300<32729> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-14,-85,-4,5  <>
    301301# UTM zone 30S
    302 <32730> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-8,-85,2,5  <>
     302<32730> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-8,-85,2,5  <>
    303303# UTM zone 31S
    304 <32731> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=-2,-85,8,5  <>
     304<32731> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-2,-85,8,5  <>
    305305# UTM zone 32S
    306 <32732> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=4,-85,14,5  <>
     306<32732> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=4,-85,14,5  <>
    307307# UTM zone 33S
    308 <32733> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=10,-85,20,5  <>
     308<32733> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=10,-85,20,5  <>
    309309# UTM zone 34S
    310 <32734> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=16,-85,26,5  <>
     310<32734> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=16,-85,26,5  <>
    311311# UTM zone 35S
    312 <32735> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=22,-85,32,5  <>
     312<32735> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=22,-85,32,5  <>
    313313# UTM zone 36S
    314 <32736> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=28,-85,38,5  <>
     314<32736> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=28,-85,38,5  <>
    315315# UTM zone 37S
    316 <32737> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=34,-85,44,5  <>
     316<32737> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=34,-85,44,5  <>
    317317# UTM zone 38S
    318 <32738> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=40,-85,50,5  <>
     318<32738> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=40,-85,50,5  <>
    319319# UTM zone 39S
    320 <32739> +proj=tmerc +lon_0=51 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=46,-85,56,5  <>
     320<32739> +proj=tmerc +lon_0=51 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=46,-85,56,5  <>
    321321# UTM zone 40S
    322 <32740> +proj=tmerc +lon_0=57 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=52,-85,62,5  <>
     322<32740> +proj=tmerc +lon_0=57 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=52,-85,62,5  <>
    323323# UTM zone 41S
    324 <32741> +proj=tmerc +lon_0=63 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=58,-85,68,5  <>
     324<32741> +proj=tmerc +lon_0=63 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=58,-85,68,5  <>
    325325# UTM zone 42S
    326 <32742> +proj=tmerc +lon_0=69 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=64,-85,74,5  <>
     326<32742> +proj=tmerc +lon_0=69 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=64,-85,74,5  <>
    327327# UTM zone 43S
    328 <32743> +proj=tmerc +lon_0=75 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=70,-85,80,5  <>
     328<32743> +proj=tmerc +lon_0=75 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=70,-85,80,5  <>
    329329# UTM zone 44S
    330 <32744> +proj=tmerc +lon_0=81 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=76,-85,86,5  <>
     330<32744> +proj=tmerc +lon_0=81 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=76,-85,86,5  <>
    331331# UTM zone 45S
    332 <32745> +proj=tmerc +lon_0=87 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=82,-85,92,5  <>
     332<32745> +proj=tmerc +lon_0=87 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=82,-85,92,5  <>
    333333# UTM zone 46S
    334 <32746> +proj=tmerc +lon_0=93 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=88,-85,98,5  <>
     334<32746> +proj=tmerc +lon_0=93 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=88,-85,98,5  <>
    335335# UTM zone 47S
    336 <32747> +proj=tmerc +lon_0=99 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=94,-85,104,5  <>
     336<32747> +proj=tmerc +lon_0=99 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=94,-85,104,5  <>
    337337# UTM zone 48S
    338 <32748> +proj=tmerc +lon_0=105 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=100,-85,110,5  <>
     338<32748> +proj=tmerc +lon_0=105 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=100,-85,110,5  <>
    339339# UTM zone 49S
    340 <32749> +proj=tmerc +lon_0=111 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=106,-85,116,5  <>
     340<32749> +proj=tmerc +lon_0=111 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=106,-85,116,5  <>
    341341# UTM zone 50S
    342 <32750> +proj=tmerc +lon_0=117 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=112,-85,122,5  <>
     342<32750> +proj=tmerc +lon_0=117 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=112,-85,122,5  <>
    343343# UTM zone 51S
    344 <32751> +proj=tmerc +lon_0=123 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=118,-85,128,5  <>
     344<32751> +proj=tmerc +lon_0=123 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=118,-85,128,5  <>
    345345# UTM zone 52S
    346 <32752> +proj=tmerc +lon_0=129 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=124,-85,134,5  <>
     346<32752> +proj=tmerc +lon_0=129 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=124,-85,134,5  <>
    347347# UTM zone 53S
    348 <32753> +proj=tmerc +lon_0=135 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=130,-85,140,5  <>
     348<32753> +proj=tmerc +lon_0=135 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=130,-85,140,5  <>
    349349# UTM zone 54S
    350 <32754> +proj=tmerc +lon_0=141 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=136,-85,146,5  <>
     350<32754> +proj=tmerc +lon_0=141 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=136,-85,146,5  <>
    351351# UTM zone 55S
    352 <32755> +proj=tmerc +lon_0=147 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=142,-85,152,5  <>
     352<32755> +proj=tmerc +lon_0=147 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=142,-85,152,5  <>
    353353# UTM zone 56S
    354 <32756> +proj=tmerc +lon_0=153 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=148,-85,158,5  <>
     354<32756> +proj=tmerc +lon_0=153 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=148,-85,158,5  <>
    355355# UTM zone 57S
    356 <32757> +proj=tmerc +lon_0=159 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=154,-85,164,5  <>
     356<32757> +proj=tmerc +lon_0=159 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=154,-85,164,5  <>
    357357# UTM zone 58S
    358 <32758> +proj=tmerc +lon_0=165 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=160,-85,170,5  <>
     358<32758> +proj=tmerc +lon_0=165 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=160,-85,170,5  <>
    359359# UTM zone 59S
    360 <32759> +proj=tmerc +lon_0=171 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=166,-85,176,5  <>
     360<32759> +proj=tmerc +lon_0=171 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=166,-85,176,5  <>
    361361# UTM zone 60S
    362 <32760> +proj=tmerc +lon_0=177 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +bounds=172,-85,182,5  <>
     362<32760> +proj=tmerc +lon_0=177 +k_0=0.9996 +x_0=500000 +y_0=10000000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=172,-85,182,5  <>
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r8540 r8568  
    22package org.openstreetmap.josm.data.cache;
    33
    4 import java.io.ByteArrayOutputStream;
    54import java.io.FileNotFoundException;
    65import java.io.IOException;
    7 import java.io.InputStream;
    86import java.net.HttpURLConnection;
    97import java.net.URL;
     
    3028import org.openstreetmap.josm.data.cache.ICachedLoaderListener.LoadResult;
    3129import org.openstreetmap.josm.data.preferences.IntegerProperty;
     30import org.openstreetmap.josm.tools.Utils;
    3231
    3332/**
     
    350349
    351350                attributes.setResponseCode(responseCode(urlConn));
    352                 byte[] raw = read(urlConn);
     351                byte[] raw = Utils.readBytesFromStream(urlConn.getInputStream());
    353352
    354353                if (isResponseLoadable(urlConn.getHeaderFields(), responseCode(urlConn), raw)) {
     
    473472    }
    474473
    475     private static byte[] read(URLConnection urlConn) throws IOException {
    476         InputStream input = urlConn.getInputStream();
    477         try {
    478             ByteArrayOutputStream bout = new ByteArrayOutputStream(input.available());
    479             byte[] buffer = new byte[2048];
    480             boolean finished = false;
    481             do {
    482                 int read = input.read(buffer);
    483                 if (read >= 0) {
    484                     bout.write(buffer, 0, read);
    485                 } else {
    486                     finished = true;
    487                 }
    488             } while (!finished);
    489             if (bout.size() == 0)
    490                 return null;
    491             return bout.toByteArray();
    492         } finally {
    493             input.close();
    494         }
    495     }
    496 
    497474    /**
    498475     * TODO: move to JobFactory
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r8526 r8568  
    5656        SCANEX("scanex"),
    5757        /** A WMS endpoint entry only stores the WMS server info, without layer, which are chosen later by the user. **/
    58         WMS_ENDPOINT("wms_endpoint");
     58        WMS_ENDPOINT("wms_endpoint"),
     59        /** WMTS stores GetCapabilities URL. Does not store any information about the layer **/
     60        WMTS("wmts");
    5961
    6062
  • trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java

    r8533 r8568  
    88import java.util.List;
    99import java.util.Map;
     10import java.util.concurrent.ConcurrentHashMap;
    1011import java.util.regex.Matcher;
    1112import java.util.regex.Pattern;
     
    3536public class CustomProjection extends AbstractProjection {
    3637
     38    private final static Map<String, Double> UNITS_TO_METERS = getUnitsToMeters();
     39    private final static double METER_PER_UNIT_DEGREE = 2 * Math.PI * 6370997 / 360;
     40
    3741    /**
    3842     * pref String that defines the projection
     
    4549    protected String cacheDir;
    4650    protected Bounds bounds;
     51    private double metersPerUnit = METER_PER_UNIT_DEGREE; // default to degrees
    4752
    4853    /**
     
    8994        wktext("wktext", false),  // ignored
    9095        /** meters, US survey feet, etc. */
    91         units("units", true),     // ignored
     96        units("units", true),
    9297        /** Don't use the /usr/share/proj/proj_def.dat defaults file */
    9398        no_defs("no_defs", false),
    9499        init("init", true),
     100        to_meter("to_meter", true),
    95101        // JOSM extensions, not present in PROJ.4
    96102        wmssrs("wmssrs", true),
     
    103109
    104110        /** Map of all parameters by key */
    105         static final Map<String, Param> paramsByKey = new HashMap<>();
     111        static final Map<String, Param> paramsByKey = new ConcurrentHashMap<>();
    106112        static {
    107113            for (Param p : Param.values()) {
     
    198204            if (s != null) {
    199205                this.code = s;
     206            }
     207            s = parameters.get(Param.units.key);
     208            if (s != null) {
     209                this.metersPerUnit = UNITS_TO_METERS.get(s);
     210            }
     211            s = parameters.get(Param.to_meter.key);
     212            if (s != null) {
     213                this.metersPerUnit = parseDouble(s, Param.to_meter.key);
    200214            }
    201215        }
     
    528542        return name != null ? name : tr("Custom Projection");
    529543    }
     544
     545    @Override
     546    public double getMetersPerUnit() {
     547        return metersPerUnit;
     548    }
     549
     550    private static Map<String, Double> getUnitsToMeters() {
     551        Map<String, Double> ret = new ConcurrentHashMap<>();
     552        ret.put("km", 1000d);
     553        ret.put("m", 1d);
     554        ret.put("dm", 1d/10);
     555        ret.put("cm", 1d/100);
     556        ret.put("mm", 1d/1000);
     557        ret.put("kmi", 1852.0);
     558        ret.put("in", 0.0254);
     559        ret.put("ft", 0.3048);
     560        ret.put("yd", 0.9144);
     561        ret.put("mi", 1609.344);
     562        ret.put("fathom", 1.8288);
     563        ret.put("chain", 20.1168);
     564        ret.put("link", 0.201168);
     565        ret.put("us-in", 1d/39.37);
     566        ret.put("us-ft", 0.304800609601219);
     567        ret.put("us-yd", 0.914401828803658);
     568        ret.put("us-ch", 20.11684023368047);
     569        ret.put("us-mi", 1609.347218694437);
     570        ret.put("ind-yd", 0.91439523);
     571        ret.put("ind-ft", 0.30479841);
     572        ret.put("ind-ch", 20.11669506);
     573        ret.put("degree", METER_PER_UNIT_DEGREE);
     574        return ret;
     575    }
    530576}
  • trunk/src/org/openstreetmap/josm/data/projection/Projection.java

    r6069 r8568  
    6868     */
    6969    Bounds getWorldBoundsLatLon();
     70
     71    /**
     72     * Get the number of meters per unit of this projection. This more
     73     * defines the scale of the map, than real conversion of unit to meters
     74     * as this value is more less correct only along great circles.
     75     *
     76     * Used by WMTS to properly scale tiles
     77     * @return meters per unit of projection
     78     *
     79     */
     80    double getMetersPerUnit();
    7081}
  • trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java

    r7509 r8568  
    6464     */
    6565    double[] invproject(double east, double north);
    66 
    6766}
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r8542 r8568  
    3131import java.util.Set;
    3232import java.util.concurrent.ConcurrentSkipListSet;
     33import java.util.concurrent.atomic.AtomicInteger;
    3334
    3435import javax.swing.AbstractAction;
     
    4445
    4546import org.openstreetmap.gui.jmapviewer.AttributionSupport;
    46 import org.openstreetmap.gui.jmapviewer.Coordinate;
    4747import org.openstreetmap.gui.jmapviewer.MemoryTileCache;
    4848import org.openstreetmap.gui.jmapviewer.OsmTileLoader;
     
    5151import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader;
    5252import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
     53import org.openstreetmap.gui.jmapviewer.interfaces.TemplatedTileSource;
    5354import org.openstreetmap.gui.jmapviewer.interfaces.TileCache;
    5455import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;
     
    102103    /** do set autoload when creating a new layer */
    103104    public static final BooleanProperty PROP_DEFAULT_AUTOLOAD = new BooleanProperty(PREFERENCE_PREFIX + ".default_autoload", true);
    104     /** do set showerrors when creating a new layer */
     105    /** do show errors per default */
    105106    public static final BooleanProperty PROP_DEFAULT_SHOWERRORS = new BooleanProperty(PREFERENCE_PREFIX + ".default_showerrors", true);
    106107    /** minimum zoom level to show to user */
     
    118119
    119120    private AttributionSupport attribution = new AttributionSupport();
    120     Tile showMetadataTile;
    121121
    122122    // needed public access for session exporter
     
    130130    protected TileCache tileCache;
    131131    protected TileSource tileSource;
    132     //protected  tileMatrix;
    133132    protected TileLoader tileLoader;
    134133
     
    154153    protected abstract TileSource getTileSource(ImageryInfo info) throws IllegalArgumentException;
    155154
    156     protected abstract Map<String, String> getHeaders(TileSource tileSource);
    157 
    158     protected void initTileSource(TileSource tileMatrix) {
    159         this.tileSource = tileMatrix;
    160         attribution.initialize(tileMatrix);
     155    protected Map<String, String> getHeaders(TileSource tileSource) {
     156        if (tileSource instanceof TemplatedTileSource) {
     157            return ((TemplatedTileSource) tileSource).getHeaders();
     158        }
     159        return null;
     160    }
     161
     162    protected void initTileSource(TileSource tileSource) {
     163        attribution.initialize(tileSource);
    161164
    162165        currentZoomLevel = getBestZoom();
    163166
    164         Map<String, String> headers = getHeaders(tileMatrix);
     167        Map<String, String> headers = getHeaders(tileSource);
    165168
    166169        tileLoader = getTileLoaderFactory().makeTileLoader(this, headers);
     
    247250    }
    248251
    249     private int getBestZoom() {
     252    protected int getBestZoom() {
    250253        double factor = getScaleFactor(1); // check the ratio between area of tilesize at zoom 1 to current view
    251254        double result = Math.log(factor)/Math.log(2)/2+1;
     
    273276
    274277    private final class ShowTileInfoAction extends AbstractAction {
    275         private final TileHolder clickedTileHolder;
     278        private transient final TileHolder clickedTileHolder;
    276279
    277280        private ShowTileInfoAction(TileHolder clickedTileHolder) {
     
    349352        }
    350353
     354        @Override
    351355        public Component createMenuComponent() {
    352356            JCheckBoxMenuItem item = new JCheckBoxMenuItem(this);
     
    414418        @Override
    415419        public void actionPerformed(ActionEvent ae) {
    416             double new_factor = Math.sqrt(getScaleFactor(currentZoomLevel));
    417             Main.map.mapView.zoomToFactor(new_factor);
     420            double newFactor = Math.sqrt(getScaleFactor(currentZoomLevel));
     421            Main.map.mapView.zoomToFactor(newFactor);
    418422            redraw();
    419423        }
     
    451455    @Override
    452456    public void hookUpMapView() {
    453         initTileSource(getTileSource(info));
     457        this.tileSource = getTileSource(info);
    454458        projectionChanged(null, Main.getProjection()); // check if projection is supported
     459        initTileSource(this.tileSource);
    455460
    456461        // keep them final here, so we avoid namespace clutter in the class
     
    538543                    @Override
    539544                    protected void finish() {
     545                        // empty - flush is instaneus
    540546                    }
    541547
    542548                    @Override
    543549                    protected void cancel() {
     550                        // empty - flush is instaneus
    544551                    }
    545552                }.run();
     
    642649     */
    643650    public static void setMaxZoomLvl(int maxZoomLvl) {
    644         maxZoomLvl = checkMaxZoomLvl(maxZoomLvl, null);
    645         PROP_MAX_ZOOM_LVL.put(maxZoomLvl);
     651        PROP_MAX_ZOOM_LVL.put(checkMaxZoomLvl(maxZoomLvl, null));
    646652    }
    647653
     
    651657     */
    652658    public static void setMinZoomLvl(int minZoomLvl) {
    653         minZoomLvl = checkMinZoomLvl(minZoomLvl, null);
    654         PROP_MIN_ZOOM_LVL.put(minZoomLvl);
     659        PROP_MIN_ZOOM_LVL.put(checkMinZoomLvl(minZoomLvl, null));
    655660    }
    656661
     
    742747     */
    743748    public boolean decreaseZoomLevel() {
    744         //int minZoom = this.getMinZoomLvl();
    745749        if (zoomDecreaseAllowed()) {
    746750            if (Main.isDebugEnabled()) {
     
    750754            zoomChanged();
    751755        } else {
    752             /*Main.debug("Current zoom level could not be decreased. Min. zoom level "+minZoom+" reached.");*/
    753756            return false;
    754757        }
     
    786789     */
    787790    private Tile getTile(int x, int y, int zoom) {
    788         int max = (1 << zoom);
    789         if (x < 0 || x >= max || y < 0 || y >= max)
     791        if (x < 0 || x >= tileSource.getTileXMax(zoom) || y < 0 || y >= tileSource.getTileYMax(zoom))
    790792            return null;
    791793        return tileCache.getTile(tileSource, x, y, zoom);
     
    10031005        }
    10041006
    1005         /*int xCursor = -1;
     1007        int xCursor = -1;
    10061008        int yCursor = -1;
    1007         if (PROP_DRAW_DEBUG.get()) {
     1009        if (Main.isDebugEnabled()) {
    10081010            if (yCursor < t.getYtile()) {
    10091011                if (t.getYtile() % 32 == 31) {
     
    10261028                xCursor = t.getXtile();
    10271029            }
    1028         }*/
     1030        }
    10291031    }
    10301032
     
    10421044    }
    10431045
    1044     private Coordinate getShiftedCoord(EastNorth en) {
    1045         LatLon ll = getShiftedLatLon(en);
    1046         return new Coordinate(ll.lat(), ll.lon());
     1046    private ICoordinate getShiftedCoord(EastNorth en) {
     1047        return getShiftedLatLon(en).toCoordinate();
    10471048    }
    10481049
     
    11171118
    11181119        private int size() {
    1119             int x_span = x1 - x0 + 1;
    1120             int y_span = y1 - y0 + 1;
    1121             return x_span * y_span;
     1120            int xSpan = x1 - x0 + 1;
     1121            int ySpan = y1 - y0 + 1;
     1122            return xSpan * ySpan;
    11221123        }
    11231124
     
    13551356            }
    13561357            int newzoom = displayZoomLevel + zoomOffset;
    1357             if (newzoom < MIN_ZOOM) {
     1358            if (newzoom < getMinZoomLvl() || newzoom > getMaxZoomLvl()) {
    13581359                continue;
    13591360            }
     
    15131514    public class PrecacheTask implements TileLoaderListener {
    15141515        private final ProgressMonitor progressMonitor;
    1515         private volatile int totalCount;
    1516         private volatile int processedCount = 0;
    1517         private TileLoader tileLoader;
     1516        private int totalCount;
     1517        private AtomicInteger processedCount = new AtomicInteger(0);
     1518        private final TileLoader tileLoader;
    15181519
    15191520        /**
     
    15341535         */
    15351536        public boolean isFinished() {
    1536             return processedCount >= totalCount;
     1537            return processedCount.get() >= totalCount;
    15371538        }
    15381539
     
    15561557        public void tileLoadingFinished(Tile tile, boolean success) {
    15571558            if (success) {
    1558                 this.processedCount++;
     1559                int processed = this.processedCount.incrementAndGet();
    15591560                this.progressMonitor.worked(1);
    1560                 this.progressMonitor.setCustomText(tr("Downloaded {0}/{1} tiles", processedCount, totalCount));
     1561                this.progressMonitor.setCustomText(tr("Downloaded {0}/{1} tiles", processed, totalCount));
    15611562            }
    15621563        }
  • trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java

    r8540 r8568  
    4141import org.openstreetmap.josm.data.ProjectionBounds;
    4242import org.openstreetmap.josm.data.imagery.ImageryInfo;
    43 import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
    4443import org.openstreetmap.josm.data.imagery.OffsetBookmark;
    4544import org.openstreetmap.josm.data.preferences.ColorProperty;
     
    153152
    154153    public static ImageryLayer create(ImageryInfo info) {
    155         ImageryType type = info.getImageryType();
    156         if (type == ImageryType.WMS || type == ImageryType.HTML)
     154        switch(info.getImageryType()) {
     155        case WMS:
     156        case HTML:
    157157            return new WMSLayer(info);
    158         else if (type == ImageryType.TMS || type == ImageryType.BING || type == ImageryType.SCANEX)
     158        case WMTS:
     159            return new WMTSLayer(info);
     160        case TMS:
     161        case BING:
     162        case SCANEX:
    159163            return new TMSLayer(info);
    160         else throw new AssertionError();
     164        default:
     165            throw new AssertionError(tr("Unsupported imagery type: {0}", info.getImageryType()));
     166        }
    161167    }
    162168
  • trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java

    r8540 r8568  
    7878    }
    7979
    80     @Override
    81     protected Map<String, String> getHeaders(TileSource tileSource) {
    82         if (tileSource instanceof TemplatedTMSTileSource) {
    83             return ((TemplatedTMSTileSource) tileSource).getHeaders();
    84         }
    85         return null;
    86     }
    87 
    8880    /**
    8981     * Creates and returns a new TileSource instance depending on the {@link ImageryType}
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java

    r8513 r8568  
    1616
    1717import org.openstreetmap.josm.data.imagery.ImageryInfo;
     18import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
    1819import org.openstreetmap.josm.gui.widgets.JosmTextArea;
    1920import org.openstreetmap.josm.gui.widgets.JosmTextField;
     
    8687    }
    8788
     89    protected static String sanitize(String s, ImageryType type) {
     90        String ret = s;
     91        String imageryType = type.getTypeString() + ":";
     92        if (ret.startsWith(imageryType)) {
     93            // remove ImageryType from URL
     94            ret = ret.substring(imageryType.length());
     95        }
     96        return sanitize(ret);
     97    }
     98
    8899    protected final String getImageryName() {
    89100        return sanitize(name.getText());
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java

    r8390 r8568  
    1111
    1212import org.openstreetmap.josm.data.imagery.ImageryInfo;
     13import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
    1314import org.openstreetmap.josm.gui.widgets.JosmTextArea;
    1415import org.openstreetmap.josm.gui.widgets.JosmTextField;
     
    7172            a.append('[').append(z).append(']');
    7273        }
    73         a.append(':').append(getImageryRawUrl());
     74        a.append(':').append(sanitize(getImageryRawUrl(), ImageryType.TMS));
    7475        return a.toString();
    7576    }
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java

    r8426 r8568  
    178178
    179179    protected final String getWmsUrl() {
    180         return sanitize(wmsUrl.getText());
     180        return sanitize(wmsUrl.getText(), ImageryInfo.ImageryType.WMS);
    181181    }
    182182
  • trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java

    r8510 r8568  
    389389            activeToolbar.add(new NewEntryAction(ImageryInfo.ImageryType.WMS));
    390390            activeToolbar.add(new NewEntryAction(ImageryInfo.ImageryType.TMS));
     391            activeToolbar.add(new NewEntryAction(ImageryInfo.ImageryType.WMTS));
    391392            //activeToolbar.add(edit); TODO
    392393            activeToolbar.add(remove);
     
    482483                putValue(SHORT_DESCRIPTION, tr("Add a new {0} entry by entering the URL", type.toString()));
    483484                String icon = /* ICON(dialogs/) */ "add";
    484                 if (ImageryInfo.ImageryType.WMS.equals(type))
     485                switch (type) {
     486                case WMS:
    485487                    icon = /* ICON(dialogs/) */ "add_wms";
    486                 else if (ImageryInfo.ImageryType.TMS.equals(type))
     488                    break;
     489                case TMS:
    487490                    icon = /* ICON(dialogs/) */ "add_tms";
     491                    break;
     492                case WMTS:
     493                    icon = /* ICON(dialogs/) */ "add_wmts";
     494                    break;
     495                default:
     496                    break;
     497                }
    488498                putValue(SMALL_ICON, ImageProvider.get("dialogs", icon));
    489499                this.type = type;
     
    493503            public void actionPerformed(ActionEvent evt) {
    494504                final AddImageryPanel p;
    495                 if (ImageryInfo.ImageryType.WMS.equals(type)) {
     505                switch (type) {
     506                case WMS:
    496507                    p = new AddWMSLayerPanel();
    497                 } else if (ImageryInfo.ImageryType.TMS.equals(type)) {
     508                    break;
     509                case TMS:
    498510                    p = new AddTMSLayerPanel();
    499                 } else {
     511                    break;
     512                case WMTS:
     513                    p = new AddWMTSLayerPanel();
     514                    break;
     515                default:
    500516                    throw new IllegalStateException("Type " + type + " not supported");
    501517                }
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r8510 r8568  
    2020import java.util.Enumeration;
    2121import java.util.List;
     22import java.util.Map;
     23import java.util.Map.Entry;
     24import java.util.concurrent.ConcurrentHashMap;
    2225import java.util.zip.ZipEntry;
    2326import java.util.zip.ZipFile;
     
    7275    public static final long DAYS = 24*60*60; // factor to get caching time in days
    7376
     77    private Map<String, String> httpHeaders = new ConcurrentHashMap<>();
     78
    7479    /**
    7580     * Constructs a CachedFile object from a given filename, URL or internal resource.
     
    142147    public CachedFile setCachingStrategy(CachingStrategy cachingStrategy) {
    143148        this.cachingStrategy = cachingStrategy;
     149        return this;
     150    }
     151
     152    /**
     153     * Sets the http headers. Only applies to URL pointing to http or https resources
     154     * @param headers that should be sent together with request
     155     * @return this object
     156     */
     157    public CachedFile setHttpHeaders(Map<String, String> headers) {
     158        this.httpHeaders.putAll(headers);
    144159        return this;
    145160    }
     
    397412        destDirFile = new File(destDir, localPath + ".tmp");
    398413        try {
    399             HttpURLConnection con = connectFollowingRedirect(url, httpAccept, ifModifiedSince);
     414            HttpURLConnection con = connectFollowingRedirect(url, httpAccept, ifModifiedSince, httpHeaders);
    400415            if (ifModifiedSince != null && con.getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED) {
    401416                if (Main.isDebugEnabled()) {
     
    464479    public static HttpURLConnection connectFollowingRedirect(URL downloadUrl, String httpAccept, Long ifModifiedSince)
    465480            throws MalformedURLException, IOException {
     481        return connectFollowingRedirect(downloadUrl, httpAccept, ifModifiedSince, null);
     482    }
     483    /**
     484     * Opens a connection for downloading a resource.
     485     * <p>
     486     * Manually follows redirects because
     487     * {@link HttpURLConnection#setFollowRedirects(boolean)} fails if the redirect
     488     * is going from a http to a https URL, see <a href="https://bugs.openjdk.java.net/browse/JDK-4620571">bug report</a>.
     489     * <p>
     490     * This can cause problems when downloading from certain GitHub URLs.
     491     *
     492     * @param downloadUrl The resource URL to download
     493     * @param httpAccept The accepted MIME types sent in the HTTP Accept header. Can be {@code null}
     494     * @param ifModifiedSince The download time of the cache file, optional
     495     * @param headers http headers to be sent together with http request
     496     * @return The HTTP connection effectively linked to the resource, after all potential redirections
     497     * @throws MalformedURLException If a redirected URL is wrong
     498     * @throws IOException If any I/O operation goes wrong
     499     * @throws OfflineAccessException if resource is accessed in offline mode, in any protocol
     500     * @since TODO
     501     */
     502    public static HttpURLConnection connectFollowingRedirect(URL downloadUrl, String httpAccept, Long ifModifiedSince, Map<String, String> headers)
     503            throws MalformedURLException, IOException {
    466504        CheckParameterUtil.ensureParameterNotNull(downloadUrl, "downloadUrl");
    467505        String downloadString = downloadUrl.toExternalForm();
     
    474512            if (ifModifiedSince != null) {
    475513                con.setIfModifiedSince(ifModifiedSince);
     514            }
     515            if (headers != null) {
     516                for (Entry<String, String> header: headers.entrySet()) {
     517                    con.setRequestProperty(header.getKey(), header.getValue());
     518                }
    476519            }
    477520            con.setInstanceFollowRedirects(false);
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r8567 r8568  
    1414import java.awt.datatransfer.UnsupportedFlavorException;
    1515import java.io.BufferedReader;
     16import java.io.ByteArrayOutputStream;
    1617import java.io.Closeable;
    1718import java.io.File;
     
    13371338        return hasExtension(file.getName(), extensions);
    13381339    }
     1340
     1341    /**
     1342     * Reads the input stream and closes the stream at the end of processing (regardless if an exception was thrown)
     1343     *
     1344     * @param stream
     1345     * @return byte array of data in input stream
     1346     * @throws IOException
     1347     */
     1348    public static byte[] readBytesFromStream(InputStream stream) throws IOException {
     1349        try {
     1350            ByteArrayOutputStream bout = new ByteArrayOutputStream(stream.available());
     1351            byte[] buffer = new byte[2048];
     1352            boolean finished = false;
     1353            do {
     1354                int read = stream.read(buffer);
     1355                if (read >= 0) {
     1356                    bout.write(buffer, 0, read);
     1357                } else {
     1358                    finished = true;
     1359                }
     1360            } while (!finished);
     1361            if (bout.size() == 0)
     1362                return null;
     1363            return bout.toByteArray();
     1364        } finally {
     1365            stream.close();
     1366        }
     1367    }
    13391368}
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java

    r8542 r8568  
    77import org.junit.BeforeClass;
    88import org.junit.Test;
    9 import org.openstreetmap.gui.jmapviewer.Tile;
    109import org.openstreetmap.gui.jmapviewer.TileXY;
    1110import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;
     
    4847            }
    4948        }
     49        verifyTileSquarness(source, 150, 20, 18);
    5050        verifyTileSquarness(source, 2270, 1323, 12);
    5151        verifyLocation(source, new LatLon(53.5937132, 19.5652017));
     
    109109
    110110    private LatLon getTileLatLon(TemplatedWMSTileSource source, int x, int y, int z) {
    111         return new LatLon(source.tileXYToLatLon(new Tile(source, x, y, z)));
     111        return new LatLon(source.tileXYToLatLon(x, y, z));
    112112    }
    113113
Note: See TracChangeset for help on using the changeset viewer.