Index: trunk/data/projection/epsg
===================================================================
--- trunk/data/projection/epsg	(revision 8567)
+++ trunk/data/projection/epsg	(revision 8568)
@@ -1,76 +1,76 @@
 # NAD27(76) / MTM zone 8
-<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  <>
+<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  <>
 # NAD27(76) / MTM zone 9
-<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  <>
+<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  <>
 # NAD27(76) / MTM zone 10
-<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  <>
+<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  <>
 # NAD27(76) / MTM zone 11
-<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  <>
+<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  <>
 # NAD27(76) / MTM zone 12
-<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  <>
+<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  <>
 # NAD27(76) / MTM zone 13
-<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  <>
+<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  <>
 # NAD27(76) / MTM zone 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  <>
+<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  <>
 # NAD27(76) / MTM zone 15
-<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  <>
+<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  <>
 # NAD27(76) / MTM zone 16
-<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  <>
+<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  <>
 # NAD27(76) / MTM zone 17
-<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  <>
+<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  <>
 # Lambert 93 (France)
-<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  <>
+<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  <>
 # PUWG 2000 Zone 5 (Poland)
-<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  <>
+<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  <>
 # PUWG 2000 Zone 6 (Poland)
-<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  <>
+<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  <>
 # PUWG 2000 Zone 7 (Poland)
-<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  <>
+<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  <>
 # PUWG 2000 Zone 8 (Poland)
-<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  <>
+<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  <>
 # PUWG 1992 (Poland)
-<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  <>
+<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  <>
 # UTM France (DOM) Fort Marigot
-<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  <>
+<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  <>
 # UTM France (DOM) Sainte Anne
-<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  <>
+<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  <>
 # UTM France (DOM) Guyane
-<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  <>
+<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  <>
 # UTM France (DOM) Martinique
-<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  <>
+<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  <>
 # UTM France (DOM) Reunion
-<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  <>
+<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  <>
 # Monte Mario / Italy zone 1
-<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 <>
+<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 <>
 # Monte Mario / Italy zone 2
-<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 <>
+<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 <>
 # SWEREF99 13 30 / EPSG:3008 (Sweden)
-<3008> +proj=tmerc +lon_0=13.5 +x_0=150000 +ellps=GRS80 +nadgrids=null +bounds=12.1,55.2,14.65,62.26  <>
+<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  <>
 # LKS-92 (Latvia TM)
-<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  <>
+<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  <>
 # Lambert Zone (Estonia)
-<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  <>
+<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  <>
 # Belgian Lambert 2008
-<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  <>
+<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  <>
 # Pseudo-Mercator
-<3857> +proj=josm:smerc +ellps=WGS84 +datum=WGS84 +bounds=-180,-85.05112877980659,180,85.05112877980659  <>
+<3857> +proj=josm:smerc +ellps=WGS84 +datum=WGS84 +units=m +bounds=-180,-85.05112877980659,180,85.05112877980659  <>
 # Lambert CC9 (France) Zone 42
-<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  <>
+<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  <>
 # Lambert CC9 (France) Zone 43
-<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  <>
+<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  <>
 # Lambert CC9 (France) Zone 44
-<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  <>
+<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  <>
 # Lambert CC9 (France) Zone 45
-<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  <>
+<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  <>
 # Lambert CC9 (France) Zone 46
-<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  <>
+<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  <>
 # Lambert CC9 (France) Zone 47
-<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  <>
+<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  <>
 # Lambert CC9 (France) Zone 48
-<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  <>
+<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  <>
 # Lambert CC9 (France) Zone 49
-<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  <>
+<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  <>
 # Lambert CC9 (France) Zone 50
-<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  <>
+<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  <>
 # ETRS89
 <4258> +proj=lonlat +ellps=GRS80 +datum=GRS80 +bounds=-180,-90,180,90  <>
@@ -78,285 +78,285 @@
 <4326> +proj=lonlat +ellps=WGS84 +datum=WGS84 +bounds=-180,-90,180,90  <>
 # Swiss Grid (Switzerland)
-<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  <>
+<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  <>
 # HD72 / EOV (Hungary)
 <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  <>
 # ETRS89 / UTM zone 28N
-<25828> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=-20,-5,-10,85 <>
+<25828> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=-20,-5,-10,85 <>
 # ETRS89 / UTM zone 29N
-<25829> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=-14,-5,-4,85  <>
+<25829> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=-14,-5,-4,85  <>
 # ETRS89 / UTM zone 30N
-<25830> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=-8,-5,2,85  <>
+<25830> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=-8,-5,2,85  <>
 # ETRS89 / UTM zone 31N
-<25831> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=-2,-5,8,85  <>
+<25831> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=-2,-5,8,85  <>
 # ETRS89 / UTM zone 32N
-<25832> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=4,-5,14,85  <>
+<25832> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=4,-5,14,85  <>
 # ETRS89 / UTM zone 33N
-<25833> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=10,-5,20,85  <>
+<25833> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=10,-5,20,85  <>
 # ETRS89 / UTM zone 34N
-<25834> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=16,-5,26,85  <>
+<25834> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=16,-5,26,85  <>
 # ETRS89 / UTM zone 35N
-<25835> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=22,-5,32,85  <>
+<25835> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=22,-5,32,85  <>
 # ETRS89 / UTM zone 36N
-<25836> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=28,-5,38,85  <>
+<25836> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=28,-5,38,85  <>
 # ETRS89 / UTM zone 37N
-<25837> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=34,-5,44,85  <>
+<25837> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=34,-5,44,85  <>
 # ETRS89 / UTM zone 38N
-<25838> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +bounds=40,-5,50,85  <>
+<25838> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +ellps=GRS80 +datum=GRS80 +units=m +bounds=40,-5,50,85  <>
 # Lambert 4 Zones France (Nord)
-<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  <>
+<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  <>
 # Lambert 4 Zones France (Centre)
-<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  <>
+<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  <>
 # Lambert 4 Zones France (South)
-<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  <>
+<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  <>
 # Lambert 4 Zones France (Corsica)
-<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  <>
+<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  <>
 # Belgian Lambert 1972
-<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  <>
+<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  <>
 # Gauß-Krüger Zone 2
-<31466> +proj=tmerc +lon_0=6 +x_0=2500000 +ellps=bessel +nadgrids=BETA2007.gsb +bounds=3.5,-5,8.5,85  <>
+<31466> +proj=tmerc +lon_0=6 +x_0=2500000 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +bounds=3.5,-5,8.5,85  <>
 # Gauß-Krüger Zone 3
-<31467> +proj=tmerc +lon_0=9 +x_0=3500000 +ellps=bessel +nadgrids=BETA2007.gsb +bounds=6.5,-5,11.5,85  <>
+<31467> +proj=tmerc +lon_0=9 +x_0=3500000 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +bounds=6.5,-5,11.5,85  <>
 # Gauß-Krüger Zone 4
-<31468> +proj=tmerc +lon_0=12 +x_0=4500000 +ellps=bessel +nadgrids=BETA2007.gsb +bounds=9.5,-5,14.5,85  <>
+<31468> +proj=tmerc +lon_0=12 +x_0=4500000 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +bounds=9.5,-5,14.5,85  <>
 # Gauß-Krüger Zone 5
-<31469> +proj=tmerc +lon_0=15 +x_0=5500000 +ellps=bessel +nadgrids=BETA2007.gsb +bounds=12.5,-5,17.5,85  <>
+<31469> +proj=tmerc +lon_0=15 +x_0=5500000 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +bounds=12.5,-5,17.5,85  <>
 # UTM zone 1N
-<32601> +proj=tmerc +lon_0=-177 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-182,-5,-172,85  <>
+<32601> +proj=tmerc +lon_0=-177 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-182,-5,-172,85  <>
 # UTM zone 2N
-<32602> +proj=tmerc +lon_0=-171 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-176,-5,-166,85  <>
+<32602> +proj=tmerc +lon_0=-171 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-176,-5,-166,85  <>
 # UTM zone 3N
-<32603> +proj=tmerc +lon_0=-165 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-170,-5,-160,85  <>
+<32603> +proj=tmerc +lon_0=-165 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-170,-5,-160,85  <>
 # UTM zone 4N
-<32604> +proj=tmerc +lon_0=-159 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-164,-5,-154,85  <>
+<32604> +proj=tmerc +lon_0=-159 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-164,-5,-154,85  <>
 # UTM zone 5N
-<32605> +proj=tmerc +lon_0=-153 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-158,-5,-148,85  <>
+<32605> +proj=tmerc +lon_0=-153 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-158,-5,-148,85  <>
 # UTM zone 6N
-<32606> +proj=tmerc +lon_0=-147 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-152,-5,-142,85  <>
+<32606> +proj=tmerc +lon_0=-147 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-152,-5,-142,85  <>
 # UTM zone 7N
-<32607> +proj=tmerc +lon_0=-141 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-146,-5,-136,85  <>
+<32607> +proj=tmerc +lon_0=-141 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-146,-5,-136,85  <>
 # UTM zone 8N
-<32608> +proj=tmerc +lon_0=-135 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-140,-5,-130,85  <>
+<32608> +proj=tmerc +lon_0=-135 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-140,-5,-130,85  <>
 # UTM zone 9N
-<32609> +proj=tmerc +lon_0=-129 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-134,-5,-124,85  <>
+<32609> +proj=tmerc +lon_0=-129 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-134,-5,-124,85  <>
 # UTM zone 10N
-<32610> +proj=tmerc +lon_0=-123 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-128,-5,-118,85  <>
+<32610> +proj=tmerc +lon_0=-123 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-128,-5,-118,85  <>
 # UTM zone 11N
-<32611> +proj=tmerc +lon_0=-117 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-122,-5,-112,85  <>
+<32611> +proj=tmerc +lon_0=-117 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-122,-5,-112,85  <>
 # UTM zone 12N
-<32612> +proj=tmerc +lon_0=-111 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-116,-5,-106,85  <>
+<32612> +proj=tmerc +lon_0=-111 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-116,-5,-106,85  <>
 # UTM zone 13N
-<32613> +proj=tmerc +lon_0=-105 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-110,-5,-100,85  <>
+<32613> +proj=tmerc +lon_0=-105 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-110,-5,-100,85  <>
 # UTM zone 14N
-<32614> +proj=tmerc +lon_0=-99 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-104,-5,-94,85  <>
+<32614> +proj=tmerc +lon_0=-99 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-104,-5,-94,85  <>
 # UTM zone 15N
-<32615> +proj=tmerc +lon_0=-93 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-98,-5,-88,85  <>
+<32615> +proj=tmerc +lon_0=-93 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-98,-5,-88,85  <>
 # UTM zone 16N
-<32616> +proj=tmerc +lon_0=-87 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-92,-5,-82,85  <>
+<32616> +proj=tmerc +lon_0=-87 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-92,-5,-82,85  <>
 # UTM zone 17N
-<32617> +proj=tmerc +lon_0=-81 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-86,-5,-76,85  <>
+<32617> +proj=tmerc +lon_0=-81 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-86,-5,-76,85  <>
 # UTM zone 18N
-<32618> +proj=tmerc +lon_0=-75 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-80,-5,-70,85  <>
+<32618> +proj=tmerc +lon_0=-75 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-80,-5,-70,85  <>
 # UTM zone 19N
-<32619> +proj=tmerc +lon_0=-69 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-74,-5,-64,85  <>
+<32619> +proj=tmerc +lon_0=-69 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-74,-5,-64,85  <>
 # UTM zone 20N
-<32620> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-68,-5,-58,85  <>
+<32620> +proj=tmerc +lon_0=-63 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-68,-5,-58,85  <>
 # UTM zone 21N
-<32621> +proj=tmerc +lon_0=-57 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-62,-5,-52,85  <>
+<32621> +proj=tmerc +lon_0=-57 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-62,-5,-52,85  <>
 # UTM zone 22N
-<32622> +proj=tmerc +lon_0=-51 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-56,-5,-46,85  <>
+<32622> +proj=tmerc +lon_0=-51 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-56,-5,-46,85  <>
 # UTM zone 23N
-<32623> +proj=tmerc +lon_0=-45 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-50,-5,-40,85  <>
+<32623> +proj=tmerc +lon_0=-45 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-50,-5,-40,85  <>
 # UTM zone 24N
-<32624> +proj=tmerc +lon_0=-39 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-44,-5,-34,85  <>
+<32624> +proj=tmerc +lon_0=-39 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-44,-5,-34,85  <>
 # UTM zone 25N
-<32625> +proj=tmerc +lon_0=-33 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-38,-5,-28,85  <>
+<32625> +proj=tmerc +lon_0=-33 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-38,-5,-28,85  <>
 # UTM zone 26N
-<32626> +proj=tmerc +lon_0=-27 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-32,-5,-22,85  <>
+<32626> +proj=tmerc +lon_0=-27 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-32,-5,-22,85  <>
 # UTM zone 27N
-<32627> +proj=tmerc +lon_0=-21 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-26,-5,-16,85  <>
+<32627> +proj=tmerc +lon_0=-21 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-26,-5,-16,85  <>
 # UTM zone 28N
-<32628> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-20,-5,-10,85  <>
+<32628> +proj=tmerc +lon_0=-15 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-20,-5,-10,85  <>
 # UTM zone 29N
-<32629> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-14,-5,-4,85  <>
+<32629> +proj=tmerc +lon_0=-9 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-14,-5,-4,85  <>
 # UTM zone 30N
-<32630> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-8,-5,2,85  <>
+<32630> +proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-8,-5,2,85  <>
 # UTM zone 31N
-<32631> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-2,-5,8,85  <>
+<32631> +proj=tmerc +lon_0=3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=-2,-5,8,85  <>
 # UTM zone 32N
-<32632> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=4,-5,14,85  <>
+<32632> +proj=tmerc +lon_0=9 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=4,-5,14,85  <>
 # UTM zone 33N
-<32633> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=10,-5,20,85  <>
+<32633> +proj=tmerc +lon_0=15 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=10,-5,20,85  <>
 # UTM zone 34N
-<32634> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=16,-5,26,85  <>
+<32634> +proj=tmerc +lon_0=21 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=16,-5,26,85  <>
 # UTM zone 35N
-<32635> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=22,-5,32,85  <>
+<32635> +proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=22,-5,32,85  <>
 # UTM zone 36N
-<32636> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=28,-5,38,85  <>
+<32636> +proj=tmerc +lon_0=33 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=28,-5,38,85  <>
 # UTM zone 37N
-<32637> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=34,-5,44,85  <>
+<32637> +proj=tmerc +lon_0=39 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=34,-5,44,85  <>
 # UTM zone 38N
-<32638> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=40,-5,50,85  <>
+<32638> +proj=tmerc +lon_0=45 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=40,-5,50,85  <>
 # UTM zone 39N
-<32639> +proj=tmerc +lon_0=51 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=46,-5,56,85  <>
+<32639> +proj=tmerc +lon_0=51 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=46,-5,56,85  <>
 # UTM zone 40N
-<32640> +proj=tmerc +lon_0=57 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=52,-5,62,85  <>
+<32640> +proj=tmerc +lon_0=57 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=52,-5,62,85  <>
 # UTM zone 41N
-<32641> +proj=tmerc +lon_0=63 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=58,-5,68,85  <>
+<32641> +proj=tmerc +lon_0=63 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=58,-5,68,85  <>
 # UTM zone 42N
-<32642> +proj=tmerc +lon_0=69 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=64,-5,74,85  <>
+<32642> +proj=tmerc +lon_0=69 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=64,-5,74,85  <>
 # UTM zone 43N
-<32643> +proj=tmerc +lon_0=75 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=70,-5,80,85  <>
+<32643> +proj=tmerc +lon_0=75 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=70,-5,80,85  <>
 # UTM zone 44N
-<32644> +proj=tmerc +lon_0=81 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=76,-5,86,85  <>
+<32644> +proj=tmerc +lon_0=81 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=76,-5,86,85  <>
 # UTM zone 45N
-<32645> +proj=tmerc +lon_0=87 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=82,-5,92,85  <>
+<32645> +proj=tmerc +lon_0=87 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=82,-5,92,85  <>
 # UTM zone 46N
-<32646> +proj=tmerc +lon_0=93 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=88,-5,98,85  <>
+<32646> +proj=tmerc +lon_0=93 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=88,-5,98,85  <>
 # UTM zone 47N
-<32647> +proj=tmerc +lon_0=99 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=94,-5,104,85  <>
+<32647> +proj=tmerc +lon_0=99 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=94,-5,104,85  <>
 # UTM zone 48N
-<32648> +proj=tmerc +lon_0=105 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=100,-5,110,85  <>
+<32648> +proj=tmerc +lon_0=105 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=100,-5,110,85  <>
 # UTM zone 49N
-<32649> +proj=tmerc +lon_0=111 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=106,-5,116,85  <>
+<32649> +proj=tmerc +lon_0=111 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=106,-5,116,85  <>
 # UTM zone 50N
-<32650> +proj=tmerc +lon_0=117 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=112,-5,122,85  <>
+<32650> +proj=tmerc +lon_0=117 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=112,-5,122,85  <>
 # UTM zone 51N
-<32651> +proj=tmerc +lon_0=123 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=118,-5,128,85  <>
+<32651> +proj=tmerc +lon_0=123 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=118,-5,128,85  <>
 # UTM zone 52N
-<32652> +proj=tmerc +lon_0=129 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=124,-5,134,85  <>
+<32652> +proj=tmerc +lon_0=129 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=124,-5,134,85  <>
 # UTM zone 53N
-<32653> +proj=tmerc +lon_0=135 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=130,-5,140,85  <>
+<32653> +proj=tmerc +lon_0=135 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=130,-5,140,85  <>
 # UTM zone 54N
-<32654> +proj=tmerc +lon_0=141 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=136,-5,146,85  <>
+<32654> +proj=tmerc +lon_0=141 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=136,-5,146,85  <>
 # UTM zone 55N
-<32655> +proj=tmerc +lon_0=147 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=142,-5,152,85  <>
+<32655> +proj=tmerc +lon_0=147 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=142,-5,152,85  <>
 # UTM zone 56N
-<32656> +proj=tmerc +lon_0=153 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=148,-5,158,85  <>
+<32656> +proj=tmerc +lon_0=153 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=148,-5,158,85  <>
 # UTM zone 57N
-<32657> +proj=tmerc +lon_0=159 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=154,-5,164,85  <>
+<32657> +proj=tmerc +lon_0=159 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=154,-5,164,85  <>
 # UTM zone 58N
-<32658> +proj=tmerc +lon_0=165 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=160,-5,170,85  <>
+<32658> +proj=tmerc +lon_0=165 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=160,-5,170,85  <>
 # UTM zone 59N
-<32659> +proj=tmerc +lon_0=171 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=166,-5,176,85  <>
+<32659> +proj=tmerc +lon_0=171 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=166,-5,176,85  <>
 # UTM zone 60N
-<32660> +proj=tmerc +lon_0=177 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=172,-5,182,85  <>
+<32660> +proj=tmerc +lon_0=177 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +units=m +bounds=172,-5,182,85  <>
 # UTM zone 1S
-<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  <>
+<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  <>
 # UTM zone 2S
-<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  <>
+<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  <>
 # UTM zone 3S
-<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  <>
+<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  <>
 # UTM zone 4S
-<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  <>
+<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  <>
 # UTM zone 5S
-<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  <>
+<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  <>
 # UTM zone 6S
-<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  <>
+<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  <>
 # UTM zone 7S
-<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  <>
+<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  <>
 # UTM zone 8S
-<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  <>
+<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  <>
 # UTM zone 9S
-<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  <>
+<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  <>
 # UTM zone 10S
-<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  <>
+<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  <>
 # UTM zone 11S
-<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  <>
+<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  <>
 # UTM zone 12S
-<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  <>
+<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  <>
 # UTM zone 13S
-<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  <>
+<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  <>
 # UTM zone 14S
-<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  <>
+<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  <>
 # UTM zone 15S
-<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  <>
+<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  <>
 # UTM zone 16S
-<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  <>
+<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  <>
 # UTM zone 17S
-<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  <>
+<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  <>
 # UTM zone 18S
-<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  <>
+<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  <>
 # UTM zone 19S
-<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  <>
+<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  <>
 # UTM zone 20S
-<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  <>
+<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  <>
 # UTM zone 21S
-<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  <>
+<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  <>
 # UTM zone 22S
-<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  <>
+<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  <>
 # UTM zone 23S
-<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  <>
+<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  <>
 # UTM zone 24S
-<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  <>
+<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  <>
 # UTM zone 25S
-<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  <>
+<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  <>
 # UTM zone 26S
-<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  <>
+<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  <>
 # UTM zone 27S
-<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  <>
+<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  <>
 # UTM zone 28S
-<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  <>
+<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  <>
 # UTM zone 29S
-<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  <>
+<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  <>
 # UTM zone 30S
-<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  <>
+<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  <>
 # UTM zone 31S
-<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  <>
+<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  <>
 # UTM zone 32S
-<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  <>
+<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  <>
 # UTM zone 33S
-<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  <>
+<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  <>
 # UTM zone 34S
-<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  <>
+<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  <>
 # UTM zone 35S
-<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  <>
+<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  <>
 # UTM zone 36S
-<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  <>
+<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  <>
 # UTM zone 37S
-<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  <>
+<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  <>
 # UTM zone 38S
-<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  <>
+<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  <>
 # UTM zone 39S
-<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  <>
+<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  <>
 # UTM zone 40S
-<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  <>
+<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  <>
 # UTM zone 41S
-<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  <>
+<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  <>
 # UTM zone 42S
-<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  <>
+<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  <>
 # UTM zone 43S
-<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  <>
+<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  <>
 # UTM zone 44S
-<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  <>
+<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  <>
 # UTM zone 45S
-<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  <>
+<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  <>
 # UTM zone 46S
-<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  <>
+<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  <>
 # UTM zone 47S
-<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  <>
+<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  <>
 # UTM zone 48S
-<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  <>
+<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  <>
 # UTM zone 49S
-<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  <>
+<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  <>
 # UTM zone 50S
-<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  <>
+<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  <>
 # UTM zone 51S
-<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  <>
+<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  <>
 # UTM zone 52S
-<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  <>
+<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  <>
 # UTM zone 53S
-<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  <>
+<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  <>
 # UTM zone 54S
-<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  <>
+<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  <>
 # UTM zone 55S
-<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  <>
+<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  <>
 # UTM zone 56S
-<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  <>
+<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  <>
 # UTM zone 57S
-<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  <>
+<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  <>
 # UTM zone 58S
-<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  <>
+<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  <>
 # UTM zone 59S
-<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  <>
+<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  <>
 # UTM zone 60S
-<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  <>
+<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  <>
Index: trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 8568)
@@ -2,8 +2,6 @@
 package org.openstreetmap.josm.data.cache;
 
-import java.io.ByteArrayOutputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.HttpURLConnection;
 import java.net.URL;
@@ -30,4 +28,5 @@
 import org.openstreetmap.josm.data.cache.ICachedLoaderListener.LoadResult;
 import org.openstreetmap.josm.data.preferences.IntegerProperty;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -350,5 +349,5 @@
 
                 attributes.setResponseCode(responseCode(urlConn));
-                byte[] raw = read(urlConn);
+                byte[] raw = Utils.readBytesFromStream(urlConn.getInputStream());
 
                 if (isResponseLoadable(urlConn.getHeaderFields(), responseCode(urlConn), raw)) {
@@ -473,26 +472,4 @@
     }
 
-    private static byte[] read(URLConnection urlConn) throws IOException {
-        InputStream input = urlConn.getInputStream();
-        try {
-            ByteArrayOutputStream bout = new ByteArrayOutputStream(input.available());
-            byte[] buffer = new byte[2048];
-            boolean finished = false;
-            do {
-                int read = input.read(buffer);
-                if (read >= 0) {
-                    bout.write(buffer, 0, read);
-                } else {
-                    finished = true;
-                }
-            } while (!finished);
-            if (bout.size() == 0)
-                return null;
-            return bout.toByteArray();
-        } finally {
-            input.close();
-        }
-    }
-
     /**
      * TODO: move to JobFactory
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 8568)
@@ -56,5 +56,7 @@
         SCANEX("scanex"),
         /** A WMS endpoint entry only stores the WMS server info, without layer, which are chosen later by the user. **/
-        WMS_ENDPOINT("wms_endpoint");
+        WMS_ENDPOINT("wms_endpoint"),
+        /** WMTS stores GetCapabilities URL. Does not store any information about the layer **/
+        WMTS("wmts");
 
 
Index: trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 8568)
+++ trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java	(revision 8568)
@@ -0,0 +1,606 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.imagery;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Dimension;
+import java.awt.GridBagLayout;
+import java.awt.Point;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.ListSelectionModel;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.openstreetmap.gui.jmapviewer.Coordinate;
+import org.openstreetmap.gui.jmapviewer.Tile;
+import org.openstreetmap.gui.jmapviewer.TileXY;
+import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
+import org.openstreetmap.gui.jmapviewer.interfaces.TemplatedTileSource;
+import org.openstreetmap.gui.jmapviewer.tilesources.TMSTileSource;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.coor.EastNorth;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.gui.ExtendedDialog;
+import org.openstreetmap.josm.io.CachedFile;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
+import org.openstreetmap.josm.tools.GBC;
+import org.openstreetmap.josm.tools.Utils;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Tile Source handling WMS providers
+ *
+ * @author Wiktor Niesiobędzki
+ * @since 8526
+ */
+public class WMTSTileSource extends TMSTileSource implements TemplatedTileSource {
+    private static final String PATTERN_HEADER  = "\\{header\\(([^,]+),([^}]+)\\)\\}";
+
+    private static final String URL_GET_ENCODING_PARAMS = "SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER={layer}&STYLE={style}&"
+            + "FORMAT={format}&tileMatrixSet={TileMatrixSet}&tileMatrix={TileMatrix}&tileRow={TileRow}&tileCol={TileCol}";
+
+    private static final String[] ALL_PATTERNS = {
+        PATTERN_HEADER,
+    };
+
+    private class TileMatrix {
+        String identifier;
+        double scaleDenominator;
+        EastNorth topLeftCorner;
+        int tileWidth;
+        int tileHeight;
+    }
+
+    private class TileMatrixSet {
+        SortedSet<TileMatrix> tileMatrix = new TreeSet<>(new Comparator<TileMatrix>() {
+            @Override
+            public int compare(TileMatrix o1, TileMatrix o2) {
+                // reverse the order, so it will be from greatest (lowest zoom level) to lowest value (highest zoom level)
+                return -1 * Double.compare(o1.scaleDenominator, o2.scaleDenominator);
+            }
+        }); // sorted by zoom level
+        String crs;
+        String identifier;
+    }
+
+    private class Layer {
+        String format;
+        String name;
+        Map<String, TileMatrixSet> tileMatrixSetByCRS = new ConcurrentHashMap<>();
+        public String baseUrl;
+    }
+
+    private enum TransferMode {
+        KVP("KVP"),
+        REST("RESTful");
+
+        private final String typeString;
+
+        private TransferMode(String urlString) {
+            this.typeString = urlString;
+        }
+
+        private final String getTypeString() {
+            return typeString;
+        }
+
+        private static TransferMode fromString(String s) {
+            for (TransferMode type : TransferMode.values()) {
+                if (type.getTypeString().equals(s)) {
+                    return type;
+                }
+            }
+            return null;
+        }
+    }
+
+    private class SelectLayerDialog extends ExtendedDialog {
+        private Layer[] layers;
+        private JList<String> list;
+
+        private SelectLayerDialog(Collection<Layer> layers) {
+            super(Main.parent, tr("Select WMTS layer"), new String[]{tr("Add layers"), tr("Cancel")});
+            this.layers = layers.toArray(new Layer[]{});
+            this.list = new JList<>(getLayerNames(layers));
+            this.list.setPreferredSize(new Dimension(400, 400));
+            this.list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION) ;
+            JPanel panel = new JPanel(new GridBagLayout());
+            panel.add(this.list, GBC.eol().fill());
+            setContent(panel);
+        }
+
+        private String[] getLayerNames(Collection<Layer> layers) {
+            Collection<String> ret = new ArrayList<>();
+            for(Layer layer: layers) {
+                ret.add(layer.name);
+            }
+            return ret.toArray(new String[]{});
+        }
+
+        public Layer getSelectedLayer() {
+            int index = list.getSelectedIndex();
+            if (index < 0) {
+                return null; //nothing selected
+            }
+            return layers[index];
+        }
+    }
+
+    private Map<String, String> headers = new HashMap<>();
+    private Collection<Layer> layers;
+    private Layer currentLayer;
+    private TileMatrixSet currentTileMatrixSet;
+    private double crsScale;
+    private TransferMode transferMode;
+
+    /**
+     * Creates a tile source based on imagery info
+     * @param info imagery info
+     * @throws IOException
+     */
+    public WMTSTileSource(ImageryInfo info) throws IOException {
+        super(info);
+        this.baseUrl = normalizeCapabilitiesUrl(handleTemplate(info.getUrl()));
+        this.layers = getCapabilities();
+        if (layers.size() > 1) {
+            SelectLayerDialog layerSelection = new SelectLayerDialog(layers);
+            if (layerSelection.showDialog().getValue() == 1) {
+                this.currentLayer = layerSelection.getSelectedLayer();
+                // TODO: save layer information into ImageryInfo / ImageryPreferences
+            } else {
+                throw new IllegalArgumentException(); //user canceled operation
+            }
+        } else if (layers.size() == 1) {
+            this.currentLayer = this.layers.iterator().next();
+        } else {
+            throw new IllegalArgumentException(tr("No layers defined by getCapabilities document: {0}", info.getUrl()));
+        }
+
+        initProjection();
+    }
+
+
+
+    private String handleTemplate(String url) {
+        Pattern pattern = Pattern.compile(PATTERN_HEADER);
+        StringBuffer output = new StringBuffer();
+        Matcher matcher = pattern.matcher(url);
+        while (matcher.find()) {
+            this.headers.put(matcher.group(1), matcher.group(2));
+            matcher.appendReplacement(output, "");
+        }
+        matcher.appendTail(output);
+        return output.toString();
+    }
+
+    private Collection<Layer> getCapabilities() throws IOException  {
+        DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+        builderFactory.setValidating(false);
+        builderFactory.setNamespaceAware(false);
+        DocumentBuilder builder = null;
+        byte[] data = {};
+        InputStream in = new CachedFile(baseUrl).
+                setHttpHeaders(headers).
+                setMaxAge(7 * CachedFile.DAYS).
+                setCachingStrategy(CachedFile.CachingStrategy.IfModifiedSince).
+                getInputStream();
+        try {
+            builder = builderFactory.newDocumentBuilder();
+            data = Utils.readBytesFromStream(in);
+            if (data == null || data.length == 0) {
+                throw new IllegalArgumentException("Could not read data from: " + baseUrl);
+            }
+            Document document = builder.parse(new ByteArrayInputStream(data));
+            Node getTileOperation = getByXpath(document, "/Capabilities/OperationsMetadata/Operation[@name=\"GetTile\"]/DCP/HTTP/Get").item(0);
+            this.baseUrl = getStringByXpath(getTileOperation, "@href");
+            this.transferMode = TransferMode.fromString(getStringByXpath(getTileOperation, "Constraint[@name=\"GetEncoding\"]/AllowedValues/Value"));
+            NodeList layersNodeList = getByXpath(document, "/Capabilities/Contents/Layer");
+            Map<String, TileMatrixSet> matrixSetById = parseMatrices(getByXpath(document, "/Capabilities/Contents/TileMatrixSet"));
+            return parseLayer(layersNodeList, matrixSetById);
+
+        } catch (Exception e) {
+            Main.error(e);
+            //Main.error(new String(data, "UTF-8"));
+        }
+        return null;
+    }
+
+    private static String normalizeCapabilitiesUrl(String url) throws MalformedURLException {
+        URL inUrl = new URL(url);
+        URL ret = new URL(inUrl.getProtocol(), inUrl.getHost(), inUrl.getPort(), inUrl.getFile());
+        return ret.toExternalForm();
+    }
+
+    private final Collection<Layer> parseLayer(NodeList nodeList, Map<String, TileMatrixSet> matrixSetById) throws XPathExpressionException {
+        Collection<Layer> ret = new ArrayList<>();
+        for (int layerId = 0; layerId < nodeList.getLength(); layerId++) {
+            Node layerNode = nodeList.item(layerId);
+            Layer layer = new Layer();
+            layer.format = getStringByXpath(layerNode, "Format");
+            layer.name = getStringByXpath(layerNode, "Identifier");
+            layer.baseUrl = getStringByXpath(layerNode, "ResourceURL[@resourceType='tile']/@template");
+            NodeList tileMatrixSetLinks = getByXpath(layerNode, "TileMatrixSetLink");
+            for (int tileMatrixId = 0; tileMatrixId < tileMatrixSetLinks.getLength(); tileMatrixId++) {
+                Node tileMatrixLink = tileMatrixSetLinks.item(tileMatrixId);
+                TileMatrixSet tms = matrixSetById.get(getStringByXpath(tileMatrixLink, "TileMatrixSet"));
+                layer.tileMatrixSetByCRS.put(tms.crs, tms);
+            }
+            ret.add(layer);
+        }
+        return ret;
+
+    }
+
+    private final Map<String, TileMatrixSet> parseMatrices(NodeList nodeList) throws DOMException, XPathExpressionException {
+        Map<String, TileMatrixSet> ret = new ConcurrentHashMap<>();
+        for (int matrixSetId = 0; matrixSetId < nodeList.getLength(); matrixSetId++) {
+            Node matrixSetNode = nodeList.item(matrixSetId);
+            TileMatrixSet matrixSet = new TileMatrixSet();
+            matrixSet.identifier = getStringByXpath(matrixSetNode, "Identifier");
+            matrixSet.crs = crsToCode(getStringByXpath(matrixSetNode, "SupportedCRS"));
+            NodeList tileMatrixList = getByXpath(matrixSetNode, "TileMatrix");
+            for (int matrixId = 0; matrixId < tileMatrixList.getLength(); matrixId++) {
+                Node tileMatrixNode = tileMatrixList.item(matrixId);
+                TileMatrix tileMatrix = new TileMatrix();
+                tileMatrix.identifier = getStringByXpath(tileMatrixNode, "Identifier");
+                tileMatrix.scaleDenominator = Double.parseDouble(getStringByXpath(tileMatrixNode, "ScaleDenominator"));
+                String[] topLeftCorner = getStringByXpath(tileMatrixNode, "TopLeftCorner").split(" ");
+                tileMatrix.topLeftCorner = new EastNorth(Double.parseDouble(topLeftCorner[1]), Double.parseDouble(topLeftCorner[0]));
+                tileMatrix.tileHeight = Integer.parseInt(getStringByXpath(tileMatrixNode, "TileHeight"));
+                tileMatrix.tileWidth = Integer.parseInt(getStringByXpath(tileMatrixNode, "TileHeight"));
+                if (tileMatrix.tileHeight != tileMatrix.tileWidth) {
+                    throw new AssertionError(tr("Only square tiles are supported. {0}x{1} returned by server for TileMatrix identifier {2}",
+                            tileMatrix.tileHeight, tileMatrix.tileWidth, tileMatrix.identifier));
+                }
+
+                matrixSet.tileMatrix.add(tileMatrix);
+            }
+            ret.put(matrixSet.identifier, matrixSet);
+        }
+        return ret;
+    }
+
+    private static String crsToCode(String crsIdentifier) {
+        if(crsIdentifier.startsWith("urn:ogc:def:crs:")) {
+            return crsIdentifier.replaceFirst("urn:ogc:def:crs:([^:]*):[^:]*:(.*)$", "$1:$2");
+        }
+        return crsIdentifier;
+    }
+    private static String getStringByXpath(Node document, String xpathQuery) throws XPathExpressionException {
+        return (String) getByXpath(document, xpathQuery, XPathConstants.STRING);
+    }
+
+    private static NodeList getByXpath(Node document, String xpathQuery) throws XPathExpressionException {
+        return (NodeList) getByXpath(document, xpathQuery, XPathConstants.NODESET);
+    }
+
+
+    private static Object getByXpath(Node document, String xpathQuery, QName returnType) throws XPathExpressionException {
+        XPath xpath = XPathFactory.newInstance().newXPath();
+        XPathExpression expr = xpath.compile(xpathQuery);
+        return expr.evaluate(document, returnType);
+    }
+
+    /**
+     * Initializes projection for this TileSource with current projection
+     */
+    protected void initProjection() {
+        initProjection(Main.getProjection());
+    }
+
+    /**
+     * Initializes projection for this TileSource with projection
+     * @param proj projection to be used by this TileSource
+     */
+    public void initProjection(Projection proj) {
+        this.currentTileMatrixSet = currentLayer.tileMatrixSetByCRS.get(proj.toCode());
+        if(this.currentTileMatrixSet == null) {
+            Main.warn("Unsupported CRS selected");
+            // take first, maybe it will work (if user sets custom projections, codes will not match)
+            this.currentTileMatrixSet = currentLayer.tileMatrixSetByCRS.values().iterator().next();
+        }
+        this.crsScale = getTileSize() * 0.28e-03 / proj.getMetersPerUnit() ;
+    }
+
+    @Override
+    public int getDefaultTileSize() {
+        return getTileSize();
+    }
+
+    // FIXME: remove in September 2015, when ImageryPreferenceEntry.tileSize will be initialized to -1 instead to 256
+    // need to leave it as it is to keep compatiblity between tested and latest JOSM versions
+    @Override
+    public int getTileSize() {
+        TileMatrix matrix = getTileMatrix(1);
+        if (matrix == null) {
+            return 1;
+        }
+        return matrix.tileHeight;
+    }
+
+    @Override
+    public String getTileUrl(int zoom, int tilex, int tiley) throws IOException {
+        String url;
+        switch (transferMode) {
+        case KVP:
+            url = baseUrl + URL_GET_ENCODING_PARAMS;
+            break;
+        case REST:
+            url = currentLayer.baseUrl;
+            break;
+        default:
+            url = "";
+            break;
+        }
+
+        TileMatrix tileMatrix = getTileMatrix(zoom);
+
+        if (tileMatrix == null) {
+            return ""; // no matrix, probably unsupported CRS selected.
+        }
+
+        return url.replaceAll("\\{layer\\}", this.currentLayer.name)
+                .replaceAll("\\{format\\}", this.currentLayer.format)
+                .replaceAll("\\{TileMatrixSet\\}", this.currentTileMatrixSet.identifier)
+                .replaceAll("\\{TileMatrix\\}", tileMatrix.identifier)
+                .replaceAll("\\{TileRow\\}", Integer.toString(tiley))
+                .replaceAll("\\{TileCol\\}", Integer.toString(tilex));
+    }
+
+    /**
+     *
+     * @param zoom
+     * @return TileMatrix that's working on this zoom level
+     */
+    private TileMatrix getTileMatrix(int zoom) {
+        if (zoom > getMaxZoom()) {
+            return null;
+        }
+        if (zoom < 1) {
+            return null;
+        }
+        return this.currentTileMatrixSet.tileMatrix.toArray(new TileMatrix[]{})[zoom - 1];
+    }
+
+    @Override
+    public double getDistance(double lat1, double lon1, double lat2, double lon2) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public int lonToX(double lon, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public int latToY(double lat, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double XToLon(int x, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double YToLat(int y, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double latToTileY(double lat, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+
+    @Override
+    public ICoordinate tileXYToLatLon(Tile tile) {
+        return tileXYToLatLon(tile.getXtile(), tile.getYtile(), tile.getZoom());
+    }
+
+    @Override
+    public ICoordinate tileXYToLatLon(TileXY xy, int zoom) {
+        return tileXYToLatLon(xy.getXIndex(), xy.getYIndex(), zoom);
+    }
+
+    @Override
+    public ICoordinate tileXYToLatLon(int x, int y, int zoom) {
+        TileMatrix matrix = getTileMatrix(zoom);
+        if (matrix == null) {
+            return Main.getProjection().getWorldBoundsLatLon().getCenter().toCoordinate();
+        }
+        double scale = matrix.scaleDenominator * this.crsScale;
+        EastNorth ret = new EastNorth(matrix.topLeftCorner.getX() + x * scale, matrix.topLeftCorner.getY() - y * scale);
+        return Main.getProjection().eastNorth2latlon(ret).toCoordinate();
+    }
+
+    @Override
+    public TileXY latLonToTileXY(double lat, double lon, int zoom) {
+        Projection proj = Main.getProjection();
+        EastNorth enPoint = proj.latlon2eastNorth(new LatLon(lat, lon));
+        TileMatrix matrix = getTileMatrix(zoom);
+        if (matrix == null) {
+            return new TileXY(0, 0);
+        }
+        double scale = matrix.scaleDenominator * this.crsScale;
+        return new TileXY(
+                (enPoint.east() - matrix.topLeftCorner.east()) / scale,
+                (matrix.topLeftCorner.north() - enPoint.north()) / scale
+                );
+    }
+
+    @Override
+    public TileXY latLonToTileXY(ICoordinate point, int zoom) {
+        return latLonToTileXY(point.getLat(),  point.getLon(), zoom);
+    }
+
+    @Override
+    public int getTileXMax(int zoom) {
+        return getTileXMax(zoom, Main.getProjection());
+    }
+
+    @Override
+    public int getTileXMin(int zoom) {
+        return 0;
+    }
+
+    @Override
+    public int getTileYMax(int zoom) {
+        return getTileYMax(zoom, Main.getProjection());
+    }
+
+    @Override
+    public int getTileYMin(int zoom) {
+        return 0;
+    }
+
+    @Override
+    public Point latLonToXY(double lat, double lon, int zoom) {
+        TileMatrix matrix = getTileMatrix(zoom);
+        if (matrix == null) {
+            return new Point(0, 0);
+        }
+        double scale = matrix.scaleDenominator * this.crsScale;
+        EastNorth point = Main.getProjection().latlon2eastNorth(new LatLon(lat, lon));
+        return new Point(
+                    (int) Math.round((point.east() - matrix.topLeftCorner.east())   / scale),
+                    (int) Math.round((matrix.topLeftCorner.north() - point.north()) / scale)
+                );
+    }
+
+    @Override
+    public Point latLonToXY(ICoordinate point, int zoom) {
+        return latLonToXY(point.getLat(), point.getLon(), zoom);
+    }
+
+    @Override
+    public Coordinate XYToLatLon(Point point, int zoom) {
+        return XYToLatLon(point.x, point.y, zoom);
+    }
+
+    @Override
+    public Coordinate XYToLatLon(int x, int y, int zoom) {
+        TileMatrix matrix = getTileMatrix(zoom);
+        if (matrix == null ){
+            return new Coordinate(0, 0);
+        }
+        double scale = matrix.scaleDenominator * this.crsScale;
+        Projection proj = Main.getProjection();
+        EastNorth ret = new EastNorth(
+                matrix.topLeftCorner.east() + x * scale,
+                matrix.topLeftCorner.north() - y * scale
+                );
+        LatLon ll = proj.eastNorth2latlon(ret);
+        return new Coordinate(ll.lat(), ll.lon());
+    }
+
+    @Override
+    public double lonToTileX(double lon, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double tileXToLon(int x, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public double tileYToLat(int y, int zoom) {
+        throw new UnsupportedOperationException("Not implemented");
+    }
+
+    @Override
+    public Map<String, String> getHeaders() {
+        return headers;
+    }
+
+    @Override
+    public int getMaxZoom() {
+        if (this.currentTileMatrixSet != null) {
+            return this.currentTileMatrixSet.tileMatrix.size();
+        }
+        return 0;
+    }
+
+    /**
+     * Checks if url is acceptable by this Tile Source
+     * @param url URL to check
+     */
+    public static void checkUrl(String url) {
+        CheckParameterUtil.ensureParameterNotNull(url, "url");
+        Matcher m = Pattern.compile("\\{[^}]*\\}").matcher(url);
+        while (m.find()) {
+            boolean isSupportedPattern = false;
+            for (String pattern : ALL_PATTERNS) {
+                if (m.group().matches(pattern)) {
+                    isSupportedPattern = true;
+                    break;
+                }
+            }
+            if (!isSupportedPattern) {
+                throw new IllegalArgumentException(
+                        tr("{0} is not a valid WMS argument. Please check this server URL:\n{1}", m.group(), url));
+            }
+        }
+    }
+
+    /**
+     * @return set of projection codes that this TileSource supports
+     */
+    public Set<String> getSupportedProjections() {
+        return this.currentLayer.tileMatrixSetByCRS.keySet();
+    }
+
+    private int getTileYMax(int zoom, Projection proj) {
+        TileMatrix matrix = getTileMatrix(zoom);
+        if (matrix == null) {
+            return 0;
+        }
+        double scale = matrix.scaleDenominator * this.crsScale;
+        Bounds bounds = Main.getProjection().getWorldBoundsLatLon();
+        EastNorth min = proj.latlon2eastNorth(bounds.getMin());
+        EastNorth max = proj.latlon2eastNorth(bounds.getMax());
+        return (int) Math.ceil(Math.abs(max.getY() - min.getY()) / scale);
+    }
+
+    private int getTileXMax(int zoom, Projection proj) {
+        TileMatrix matrix = getTileMatrix(zoom);
+        if (matrix == null) {
+            return 0;
+        }
+        double scale = matrix.scaleDenominator * this.crsScale;
+        Bounds bounds = Main.getProjection().getWorldBoundsLatLon();
+        EastNorth min = proj.latlon2eastNorth(bounds.getMin());
+        EastNorth max = proj.latlon2eastNorth(bounds.getMax());
+        return (int) Math.ceil(Math.abs(max.getX() - min.getX()) / scale);
+    }
+}
Index: trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 8568)
@@ -8,4 +8,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -35,4 +36,7 @@
 public class CustomProjection extends AbstractProjection {
 
+    private final static Map<String, Double> UNITS_TO_METERS = getUnitsToMeters();
+    private final static double METER_PER_UNIT_DEGREE = 2 * Math.PI * 6370997 / 360;
+
     /**
      * pref String that defines the projection
@@ -45,4 +49,5 @@
     protected String cacheDir;
     protected Bounds bounds;
+    private double metersPerUnit = METER_PER_UNIT_DEGREE; // default to degrees
 
     /**
@@ -89,8 +94,9 @@
         wktext("wktext", false),  // ignored
         /** meters, US survey feet, etc. */
-        units("units", true),     // ignored
+        units("units", true),
         /** Don't use the /usr/share/proj/proj_def.dat defaults file */
         no_defs("no_defs", false),
         init("init", true),
+        to_meter("to_meter", true),
         // JOSM extensions, not present in PROJ.4
         wmssrs("wmssrs", true),
@@ -103,5 +109,5 @@
 
         /** Map of all parameters by key */
-        static final Map<String, Param> paramsByKey = new HashMap<>();
+        static final Map<String, Param> paramsByKey = new ConcurrentHashMap<>();
         static {
             for (Param p : Param.values()) {
@@ -198,4 +204,12 @@
             if (s != null) {
                 this.code = s;
+            }
+            s = parameters.get(Param.units.key);
+            if (s != null) {
+                this.metersPerUnit = UNITS_TO_METERS.get(s);
+            }
+            s = parameters.get(Param.to_meter.key);
+            if (s != null) {
+                this.metersPerUnit = parseDouble(s, Param.to_meter.key);
             }
         }
@@ -528,3 +542,35 @@
         return name != null ? name : tr("Custom Projection");
     }
+
+    @Override
+    public double getMetersPerUnit() {
+        return metersPerUnit;
+    }
+
+    private static Map<String, Double> getUnitsToMeters() {
+        Map<String, Double> ret = new ConcurrentHashMap<>();
+        ret.put("km", 1000d);
+        ret.put("m", 1d);
+        ret.put("dm", 1d/10);
+        ret.put("cm", 1d/100);
+        ret.put("mm", 1d/1000);
+        ret.put("kmi", 1852.0);
+        ret.put("in", 0.0254);
+        ret.put("ft", 0.3048);
+        ret.put("yd", 0.9144);
+        ret.put("mi", 1609.344);
+        ret.put("fathom", 1.8288);
+        ret.put("chain", 20.1168);
+        ret.put("link", 0.201168);
+        ret.put("us-in", 1d/39.37);
+        ret.put("us-ft", 0.304800609601219);
+        ret.put("us-yd", 0.914401828803658);
+        ret.put("us-ch", 20.11684023368047);
+        ret.put("us-mi", 1609.347218694437);
+        ret.put("ind-yd", 0.91439523);
+        ret.put("ind-ft", 0.30479841);
+        ret.put("ind-ch", 20.11669506);
+        ret.put("degree", METER_PER_UNIT_DEGREE);
+        return ret;
+    }
 }
Index: trunk/src/org/openstreetmap/josm/data/projection/Projection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Projection.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/data/projection/Projection.java	(revision 8568)
@@ -68,3 +68,14 @@
      */
     Bounds getWorldBoundsLatLon();
+
+    /**
+     * Get the number of meters per unit of this projection. This more
+     * defines the scale of the map, than real conversion of unit to meters
+     * as this value is more less correct only along great circles.
+     *
+     * Used by WMTS to properly scale tiles
+     * @return meters per unit of projection
+     *
+     */
+    double getMetersPerUnit();
 }
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java	(revision 8568)
@@ -64,4 +64,3 @@
      */
     double[] invproject(double east, double north);
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 8568)
@@ -31,4 +31,5 @@
 import java.util.Set;
 import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import javax.swing.AbstractAction;
@@ -44,5 +45,4 @@
 
 import org.openstreetmap.gui.jmapviewer.AttributionSupport;
-import org.openstreetmap.gui.jmapviewer.Coordinate;
 import org.openstreetmap.gui.jmapviewer.MemoryTileCache;
 import org.openstreetmap.gui.jmapviewer.OsmTileLoader;
@@ -51,4 +51,5 @@
 import org.openstreetmap.gui.jmapviewer.interfaces.CachedTileLoader;
 import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
+import org.openstreetmap.gui.jmapviewer.interfaces.TemplatedTileSource;
 import org.openstreetmap.gui.jmapviewer.interfaces.TileCache;
 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;
@@ -102,5 +103,5 @@
     /** do set autoload when creating a new layer */
     public static final BooleanProperty PROP_DEFAULT_AUTOLOAD = new BooleanProperty(PREFERENCE_PREFIX + ".default_autoload", true);
-    /** do set showerrors when creating a new layer */
+    /** do show errors per default */
     public static final BooleanProperty PROP_DEFAULT_SHOWERRORS = new BooleanProperty(PREFERENCE_PREFIX + ".default_showerrors", true);
     /** minimum zoom level to show to user */
@@ -118,5 +119,4 @@
 
     private AttributionSupport attribution = new AttributionSupport();
-    Tile showMetadataTile;
 
     // needed public access for session exporter
@@ -130,5 +130,4 @@
     protected TileCache tileCache;
     protected TileSource tileSource;
-    //protected  tileMatrix;
     protected TileLoader tileLoader;
 
@@ -154,13 +153,17 @@
     protected abstract TileSource getTileSource(ImageryInfo info) throws IllegalArgumentException;
 
-    protected abstract Map<String, String> getHeaders(TileSource tileSource);
-
-    protected void initTileSource(TileSource tileMatrix) {
-        this.tileSource = tileMatrix;
-        attribution.initialize(tileMatrix);
+    protected Map<String, String> getHeaders(TileSource tileSource) {
+        if (tileSource instanceof TemplatedTileSource) {
+            return ((TemplatedTileSource) tileSource).getHeaders();
+        }
+        return null;
+    }
+
+    protected void initTileSource(TileSource tileSource) {
+        attribution.initialize(tileSource);
 
         currentZoomLevel = getBestZoom();
 
-        Map<String, String> headers = getHeaders(tileMatrix);
+        Map<String, String> headers = getHeaders(tileSource);
 
         tileLoader = getTileLoaderFactory().makeTileLoader(this, headers);
@@ -247,5 +250,5 @@
     }
 
-    private int getBestZoom() {
+    protected int getBestZoom() {
         double factor = getScaleFactor(1); // check the ratio between area of tilesize at zoom 1 to current view
         double result = Math.log(factor)/Math.log(2)/2+1;
@@ -273,5 +276,5 @@
 
     private final class ShowTileInfoAction extends AbstractAction {
-        private final TileHolder clickedTileHolder;
+        private transient final TileHolder clickedTileHolder;
 
         private ShowTileInfoAction(TileHolder clickedTileHolder) {
@@ -349,4 +352,5 @@
         }
 
+        @Override
         public Component createMenuComponent() {
             JCheckBoxMenuItem item = new JCheckBoxMenuItem(this);
@@ -414,6 +418,6 @@
         @Override
         public void actionPerformed(ActionEvent ae) {
-            double new_factor = Math.sqrt(getScaleFactor(currentZoomLevel));
-            Main.map.mapView.zoomToFactor(new_factor);
+            double newFactor = Math.sqrt(getScaleFactor(currentZoomLevel));
+            Main.map.mapView.zoomToFactor(newFactor);
             redraw();
         }
@@ -451,6 +455,7 @@
     @Override
     public void hookUpMapView() {
-        initTileSource(getTileSource(info));
+        this.tileSource = getTileSource(info);
         projectionChanged(null, Main.getProjection()); // check if projection is supported
+        initTileSource(this.tileSource);
 
         // keep them final here, so we avoid namespace clutter in the class
@@ -538,8 +543,10 @@
                     @Override
                     protected void finish() {
+                        // empty - flush is instaneus
                     }
 
                     @Override
                     protected void cancel() {
+                        // empty - flush is instaneus
                     }
                 }.run();
@@ -642,6 +649,5 @@
      */
     public static void setMaxZoomLvl(int maxZoomLvl) {
-        maxZoomLvl = checkMaxZoomLvl(maxZoomLvl, null);
-        PROP_MAX_ZOOM_LVL.put(maxZoomLvl);
+        PROP_MAX_ZOOM_LVL.put(checkMaxZoomLvl(maxZoomLvl, null));
     }
 
@@ -651,6 +657,5 @@
      */
     public static void setMinZoomLvl(int minZoomLvl) {
-        minZoomLvl = checkMinZoomLvl(minZoomLvl, null);
-        PROP_MIN_ZOOM_LVL.put(minZoomLvl);
+        PROP_MIN_ZOOM_LVL.put(checkMinZoomLvl(minZoomLvl, null));
     }
 
@@ -742,5 +747,4 @@
      */
     public boolean decreaseZoomLevel() {
-        //int minZoom = this.getMinZoomLvl();
         if (zoomDecreaseAllowed()) {
             if (Main.isDebugEnabled()) {
@@ -750,5 +754,4 @@
             zoomChanged();
         } else {
-            /*Main.debug("Current zoom level could not be decreased. Min. zoom level "+minZoom+" reached.");*/
             return false;
         }
@@ -786,6 +789,5 @@
      */
     private Tile getTile(int x, int y, int zoom) {
-        int max = (1 << zoom);
-        if (x < 0 || x >= max || y < 0 || y >= max)
+        if (x < 0 || x >= tileSource.getTileXMax(zoom) || y < 0 || y >= tileSource.getTileYMax(zoom))
             return null;
         return tileCache.getTile(tileSource, x, y, zoom);
@@ -1003,7 +1005,7 @@
         }
 
-        /*int xCursor = -1;
+        int xCursor = -1;
         int yCursor = -1;
-        if (PROP_DRAW_DEBUG.get()) {
+        if (Main.isDebugEnabled()) {
             if (yCursor < t.getYtile()) {
                 if (t.getYtile() % 32 == 31) {
@@ -1026,5 +1028,5 @@
                 xCursor = t.getXtile();
             }
-        }*/
+        }
     }
 
@@ -1042,7 +1044,6 @@
     }
 
-    private Coordinate getShiftedCoord(EastNorth en) {
-        LatLon ll = getShiftedLatLon(en);
-        return new Coordinate(ll.lat(), ll.lon());
+    private ICoordinate getShiftedCoord(EastNorth en) {
+        return getShiftedLatLon(en).toCoordinate();
     }
 
@@ -1117,7 +1118,7 @@
 
         private int size() {
-            int x_span = x1 - x0 + 1;
-            int y_span = y1 - y0 + 1;
-            return x_span * y_span;
+            int xSpan = x1 - x0 + 1;
+            int ySpan = y1 - y0 + 1;
+            return xSpan * ySpan;
         }
 
@@ -1355,5 +1356,5 @@
             }
             int newzoom = displayZoomLevel + zoomOffset;
-            if (newzoom < MIN_ZOOM) {
+            if (newzoom < getMinZoomLvl() || newzoom > getMaxZoomLvl()) {
                 continue;
             }
@@ -1513,7 +1514,7 @@
     public class PrecacheTask implements TileLoaderListener {
         private final ProgressMonitor progressMonitor;
-        private volatile int totalCount;
-        private volatile int processedCount = 0;
-        private TileLoader tileLoader;
+        private int totalCount;
+        private AtomicInteger processedCount = new AtomicInteger(0);
+        private final TileLoader tileLoader;
 
         /**
@@ -1534,5 +1535,5 @@
          */
         public boolean isFinished() {
-            return processedCount >= totalCount;
+            return processedCount.get() >= totalCount;
         }
 
@@ -1556,7 +1557,7 @@
         public void tileLoadingFinished(Tile tile, boolean success) {
             if (success) {
-                this.processedCount++;
+                int processed = this.processedCount.incrementAndGet();
                 this.progressMonitor.worked(1);
-                this.progressMonitor.setCustomText(tr("Downloaded {0}/{1} tiles", processedCount, totalCount));
+                this.progressMonitor.setCustomText(tr("Downloaded {0}/{1} tiles", processed, totalCount));
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java	(revision 8568)
@@ -41,5 +41,4 @@
 import org.openstreetmap.josm.data.ProjectionBounds;
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
-import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
 import org.openstreetmap.josm.data.imagery.OffsetBookmark;
 import org.openstreetmap.josm.data.preferences.ColorProperty;
@@ -153,10 +152,17 @@
 
     public static ImageryLayer create(ImageryInfo info) {
-        ImageryType type = info.getImageryType();
-        if (type == ImageryType.WMS || type == ImageryType.HTML)
+        switch(info.getImageryType()) {
+        case WMS:
+        case HTML:
             return new WMSLayer(info);
-        else if (type == ImageryType.TMS || type == ImageryType.BING || type == ImageryType.SCANEX)
+        case WMTS:
+            return new WMTSLayer(info);
+        case TMS:
+        case BING:
+        case SCANEX:
             return new TMSLayer(info);
-        else throw new AssertionError();
+        default:
+            throw new AssertionError(tr("Unsupported imagery type: {0}", info.getImageryType()));
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 8568)
@@ -78,12 +78,4 @@
     }
 
-    @Override
-    protected Map<String, String> getHeaders(TileSource tileSource) {
-        if (tileSource instanceof TemplatedTMSTileSource) {
-            return ((TemplatedTMSTileSource) tileSource).getHeaders();
-        }
-        return null;
-    }
-
     /**
      * Creates and returns a new TileSource instance depending on the {@link ImageryType}
Index: trunk/src/org/openstreetmap/josm/gui/layer/WMTSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/WMTSLayer.java	(revision 8568)
+++ trunk/src/org/openstreetmap/josm/gui/layer/WMTSLayer.java	(revision 8568)
@@ -0,0 +1,126 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.layer;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.imagery.CachedTileLoaderFactory;
+import org.openstreetmap.josm.data.imagery.ImageryInfo;
+import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
+import org.openstreetmap.josm.data.imagery.TileLoaderFactory;
+import org.openstreetmap.josm.data.imagery.WMSCachedTileLoader;
+import org.openstreetmap.josm.data.imagery.WMTSTileSource;
+import org.openstreetmap.josm.data.preferences.BooleanProperty;
+import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.gui.MapView;
+
+/**
+ * WMTS layer based on AbstractTileSourceLayer. Overrides few methods to align WMTS to Tile based computations
+ * but most magic is done within WMTSTileSource class.
+ *
+ * Full specification of the protocol available at:
+ * http://www.opengeospatial.org/standards/wmts
+ *
+ * @author Wiktor Niesiobędzki
+ *
+ */
+public class WMTSLayer extends AbstractTileSourceLayer {
+    /**
+     * default setting of autozoom per layer
+     */
+    public static final BooleanProperty PROP_DEFAULT_AUTOZOOM = new BooleanProperty("imagery.wmts.default_autozoom", true);
+
+
+    /**
+     * Creates WMTS layer from ImageryInfo
+     * @param info Imagery Info describing the layer
+     */
+    public WMTSLayer(ImageryInfo info) {
+        super(info);
+    }
+
+    private static TileLoaderFactory loaderFactory = new CachedTileLoaderFactory("WMTS") {
+        @Override
+        protected TileLoader getLoader(TileLoaderListener listener, String cacheName, int connectTimeout,
+                int readTimeout, Map<String, String> headers, String cacheDir) throws IOException {
+            return new WMSCachedTileLoader(listener, cacheName, connectTimeout, readTimeout, headers, cacheDir);
+        }
+
+    };
+
+    @Override
+    protected TileLoaderFactory getTileLoaderFactory() {
+        return loaderFactory;
+    }
+
+    @Override
+    protected TileSource getTileSource(ImageryInfo info) {
+        try {
+            if (info.getImageryType() == ImageryType.WMTS && info.getUrl() != null) {
+                WMTSTileSource.checkUrl(info.getUrl());
+                WMTSTileSource tileSource = new WMTSTileSource(info);
+                info.setAttribution(tileSource);
+                return tileSource;
+            }
+        } catch (Exception e) {
+            Main.warn("Could not create imagery layer:");
+            Main.warn(e);
+        }
+        return null;
+    }
+
+    /**
+     * @param zoom level of the tile
+     * @return how many pixels of the screen occupies one pixel of the tile
+     */
+    private double getTileToScreenRatio(int zoom) {
+         ICoordinate north = tileSource.tileXYToLatLon(0, 0, zoom);
+         ICoordinate south = tileSource.tileXYToLatLon(0, 1, zoom);
+
+         MapView mv = Main.map.mapView;
+         LatLon topLeft = mv.getLatLon(0, 0);
+         LatLon botLeft = mv.getLatLon(0, tileSource.getTileSize());
+
+         return Math.abs((north.getLat() - south.getLat()) / ( topLeft.lat() - botLeft.lat()));
+    }
+
+    @Override
+    protected int getBestZoom() {
+        if (!Main.isDisplayingMapView()) return 1;
+
+        for(int i=getMinZoomLvl(); i <= getMaxZoomLvl(); i++) {
+            double ret = getTileToScreenRatio(i);
+            if (ret < 1) {
+                return i;
+            }
+        }
+        return getMaxZoomLvl();
+    }
+
+    @Override
+    public boolean isProjectionSupported(Projection proj) {
+        return ((WMTSTileSource)tileSource).getSupportedProjections().contains(proj.toCode());
+    }
+
+    @Override
+    public String nameSupportedProjections() {
+        StringBuilder ret = new StringBuilder();
+        for (String e: ((WMTSTileSource)tileSource).getSupportedProjections()) {
+            ret.append(e).append(", ");
+        }
+        return ret.substring(0, ret.length()-2);
+    }
+
+    @Override
+    public void projectionChanged(Projection oldValue, Projection newValue) {
+        super.projectionChanged(oldValue, newValue);
+        ((WMTSTileSource)tileSource).initProjection(newValue);
+    }
+
+}
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 8568)
@@ -16,4 +16,5 @@
 
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
+import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
 import org.openstreetmap.josm.gui.widgets.JosmTextArea;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
@@ -86,4 +87,14 @@
     }
 
+    protected static String sanitize(String s, ImageryType type) {
+        String ret = s;
+        String imageryType = type.getTypeString() + ":";
+        if (ret.startsWith(imageryType)) {
+            // remove ImageryType from URL
+            ret = ret.substring(imageryType.length());
+        }
+        return sanitize(ret);
+    }
+
     protected final String getImageryName() {
         return sanitize(name.getText());
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddTMSLayerPanel.java	(revision 8568)
@@ -11,4 +11,5 @@
 
 import org.openstreetmap.josm.data.imagery.ImageryInfo;
+import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
 import org.openstreetmap.josm.gui.widgets.JosmTextArea;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
@@ -71,5 +72,5 @@
             a.append('[').append(z).append(']');
         }
-        a.append(':').append(getImageryRawUrl());
+        a.append(':').append(sanitize(getImageryRawUrl(), ImageryType.TMS));
         return a.toString();
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanel.java	(revision 8568)
@@ -178,5 +178,5 @@
 
     protected final String getWmsUrl() {
-        return sanitize(wmsUrl.getText());
+        return sanitize(wmsUrl.getText(), ImageryInfo.ImageryType.WMS);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java	(revision 8568)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddWMTSLayerPanel.java	(revision 8568)
@@ -0,0 +1,41 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.preferences.imagery;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import javax.swing.JLabel;
+
+import org.openstreetmap.josm.data.imagery.ImageryInfo;
+import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
+import org.openstreetmap.josm.tools.GBC;
+
+/**
+ * Panel for adding WMTS imagery sources
+ * @author Wiktor Niesiobędzki
+ *
+ */
+public class AddWMTSLayerPanel extends AddImageryPanel {
+
+    /**
+     * default constructor
+     */
+    public AddWMTSLayerPanel() {
+        add(new JLabel(tr("1. Enter getCapabilities URL")), GBC.eol());
+        add(rawUrl, GBC.eop().fill());
+        rawUrl.setLineWrap(true);
+        rawUrl.setAlignmentY(TOP_ALIGNMENT);
+        add(new JLabel(tr("2. Enter name for this layer")), GBC.eol());
+        add(name, GBC.eol().fill(GBC.HORIZONTAL));
+        registerValidableComponent(rawUrl);
+    }
+    @Override
+    protected ImageryInfo getImageryInfo() {
+        return new ImageryInfo(getImageryName(), "wmts:" + sanitize(getImageryRawUrl(), ImageryType.WMTS));
+    }
+
+    @Override
+    protected boolean isImageryValid() {
+        return !getImageryName().isEmpty() && !getImageryRawUrl().isEmpty();
+    }
+
+}
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 8568)
@@ -389,4 +389,5 @@
             activeToolbar.add(new NewEntryAction(ImageryInfo.ImageryType.WMS));
             activeToolbar.add(new NewEntryAction(ImageryInfo.ImageryType.TMS));
+            activeToolbar.add(new NewEntryAction(ImageryInfo.ImageryType.WMTS));
             //activeToolbar.add(edit); TODO
             activeToolbar.add(remove);
@@ -482,8 +483,17 @@
                 putValue(SHORT_DESCRIPTION, tr("Add a new {0} entry by entering the URL", type.toString()));
                 String icon = /* ICON(dialogs/) */ "add";
-                if (ImageryInfo.ImageryType.WMS.equals(type))
+                switch (type) {
+                case WMS:
                     icon = /* ICON(dialogs/) */ "add_wms";
-                else if (ImageryInfo.ImageryType.TMS.equals(type))
+                    break;
+                case TMS:
                     icon = /* ICON(dialogs/) */ "add_tms";
+                    break;
+                case WMTS:
+                    icon = /* ICON(dialogs/) */ "add_wmts";
+                    break;
+                default:
+                    break;
+                }
                 putValue(SMALL_ICON, ImageProvider.get("dialogs", icon));
                 this.type = type;
@@ -493,9 +503,15 @@
             public void actionPerformed(ActionEvent evt) {
                 final AddImageryPanel p;
-                if (ImageryInfo.ImageryType.WMS.equals(type)) {
+                switch (type) {
+                case WMS:
                     p = new AddWMSLayerPanel();
-                } else if (ImageryInfo.ImageryType.TMS.equals(type)) {
+                    break;
+                case TMS:
                     p = new AddTMSLayerPanel();
-                } else {
+                    break;
+                case WMTS:
+                    p = new AddWMTSLayerPanel();
+                    break;
+                default:
                     throw new IllegalStateException("Type " + type + " not supported");
                 }
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8568)
@@ -20,4 +20,7 @@
 import java.util.Enumeration;
 import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
@@ -72,4 +75,6 @@
     public static final long DAYS = 24*60*60; // factor to get caching time in days
 
+    private Map<String, String> httpHeaders = new ConcurrentHashMap<>();
+
     /**
      * Constructs a CachedFile object from a given filename, URL or internal resource.
@@ -142,4 +147,14 @@
     public CachedFile setCachingStrategy(CachingStrategy cachingStrategy) {
         this.cachingStrategy = cachingStrategy;
+        return this;
+    }
+
+    /**
+     * Sets the http headers. Only applies to URL pointing to http or https resources
+     * @param headers that should be sent together with request
+     * @return this object
+     */
+    public CachedFile setHttpHeaders(Map<String, String> headers) {
+        this.httpHeaders.putAll(headers);
         return this;
     }
@@ -397,5 +412,5 @@
         destDirFile = new File(destDir, localPath + ".tmp");
         try {
-            HttpURLConnection con = connectFollowingRedirect(url, httpAccept, ifModifiedSince);
+            HttpURLConnection con = connectFollowingRedirect(url, httpAccept, ifModifiedSince, httpHeaders);
             if (ifModifiedSince != null && con.getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED) {
                 if (Main.isDebugEnabled()) {
@@ -464,4 +479,27 @@
     public static HttpURLConnection connectFollowingRedirect(URL downloadUrl, String httpAccept, Long ifModifiedSince)
             throws MalformedURLException, IOException {
+        return connectFollowingRedirect(downloadUrl, httpAccept, ifModifiedSince, null);
+    }
+    /**
+     * Opens a connection for downloading a resource.
+     * <p>
+     * Manually follows redirects because
+     * {@link HttpURLConnection#setFollowRedirects(boolean)} fails if the redirect
+     * is going from a http to a https URL, see <a href="https://bugs.openjdk.java.net/browse/JDK-4620571">bug report</a>.
+     * <p>
+     * This can cause problems when downloading from certain GitHub URLs.
+     *
+     * @param downloadUrl The resource URL to download
+     * @param httpAccept The accepted MIME types sent in the HTTP Accept header. Can be {@code null}
+     * @param ifModifiedSince The download time of the cache file, optional
+     * @param headers http headers to be sent together with http request
+     * @return The HTTP connection effectively linked to the resource, after all potential redirections
+     * @throws MalformedURLException If a redirected URL is wrong
+     * @throws IOException If any I/O operation goes wrong
+     * @throws OfflineAccessException if resource is accessed in offline mode, in any protocol
+     * @since TODO
+     */
+    public static HttpURLConnection connectFollowingRedirect(URL downloadUrl, String httpAccept, Long ifModifiedSince, Map<String, String> headers)
+            throws MalformedURLException, IOException {
         CheckParameterUtil.ensureParameterNotNull(downloadUrl, "downloadUrl");
         String downloadString = downloadUrl.toExternalForm();
@@ -474,4 +512,9 @@
             if (ifModifiedSince != null) {
                 con.setIfModifiedSince(ifModifiedSince);
+            }
+            if (headers != null) {
+                for (Entry<String, String> header: headers.entrySet()) {
+                    con.setRequestProperty(header.getKey(), header.getValue());
+                }
             }
             con.setInstanceFollowRedirects(false);
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8567)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8568)
@@ -14,4 +14,5 @@
 import java.awt.datatransfer.UnsupportedFlavorException;
 import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
 import java.io.Closeable;
 import java.io.File;
@@ -1337,3 +1338,31 @@
         return hasExtension(file.getName(), extensions);
     }
+
+    /**
+     * Reads the input stream and closes the stream at the end of processing (regardless if an exception was thrown)
+     *
+     * @param stream
+     * @return byte array of data in input stream
+     * @throws IOException
+     */
+    public static byte[] readBytesFromStream(InputStream stream) throws IOException {
+        try {
+            ByteArrayOutputStream bout = new ByteArrayOutputStream(stream.available());
+            byte[] buffer = new byte[2048];
+            boolean finished = false;
+            do {
+                int read = stream.read(buffer);
+                if (read >= 0) {
+                    bout.write(buffer, 0, read);
+                } else {
+                    finished = true;
+                }
+            } while (!finished);
+            if (bout.size() == 0)
+                return null;
+            return bout.toByteArray();
+        } finally {
+            stream.close();
+        }
+    }
 }
Index: trunk/test/data/wmts/getcapabilities-ORTO.xml
===================================================================
--- trunk/test/data/wmts/getcapabilities-ORTO.xml	(revision 8568)
+++ trunk/test/data/wmts/getcapabilities-ORTO.xml	(revision 8568)
@@ -0,0 +1,779 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0 http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0/inspire_vs_ows_11.xsd">
+	<ows:ServiceIdentification>
+		<ows:Title>Usługa przeglądania ortofotomap dla obszaru Polski. Profil kafelkowany (WMTS)</ows:Title>
+		<ows:Abstract>Usługa przeglądania ortofotomap dla obszaru Polski. Dane udostępniane za pomocą tej usługi stanowią ortofotomapę wykonaną ze zdjęć lotniczych. Usługa wykorzystuje interfejs WMTS OGC w wersji 1.0.0.</ows:Abstract>
+		<ows:Keywords>
+			<ows:Keyword>WMTS</ows:Keyword>
+			<ows:Keyword>Tiled</ows:Keyword>
+			<ows:Keyword>Web Map Tile Service</ows:Keyword>
+			<ows:Keyword>Usługa przeglądania</ows:Keyword>
+			<ows:Keyword>Aerial ortoimagery</ows:Keyword>
+			<ows:Keyword>Aerial photography</ows:Keyword>
+			<ows:Keyword>Dane referencyjne</ows:Keyword>
+			<ows:Keyword>Fotografia terenu</ows:Keyword>
+			<ows:Keyword>Land image</ows:Keyword>
+			<ows:Keyword>Land photography</ows:Keyword>
+			<ows:Keyword>Obraz terenu</ows:Keyword>
+			<ows:Keyword>Orthoimagery</ows:Keyword>
+			<ows:Keyword>Ortofotogram</ows:Keyword>
+			<ows:Keyword>Ortofotomapa lotnicza</ows:Keyword>
+			<ows:Keyword>Ortofotomapa</ows:Keyword>
+			<ows:Keyword>Raster</ows:Keyword>
+			<ows:Keyword>Rastry</ows:Keyword>
+			<ows:Keyword>Referential data</ows:Keyword>
+			<ows:Keyword>Zdjęcie lotnicze</ows:Keyword>
+			<ows:Keyword>Sporządzanie ortoobrazów</ows:Keyword>
+		</ows:Keywords>
+		
+		<ows:ServiceType>OGC WMTS</ows:ServiceType>
+		<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
+		<ows:Fees>Korzystanie z usługi danych przestrzennych oznacza akceptację bez ograniczeń i zastrzeżeń Regulaminu dostępnego na stronie internetowej Geoportalu http://www.geoportal.gov.pl/</ows:Fees>
+		<ows:AccessConstraints>brak ograniczeń</ows:AccessConstraints> 
+	</ows:ServiceIdentification>
+	<ows:ServiceProvider>
+		<ows:ProviderName>Centralny Ośrodek Dokumentacji Geodezyjnej i Kartograficznej </ows:ProviderName>
+		<ows:ProviderSite xlink:type="simple" xlink:href="www.geoportal.gov.pl"/>
+		<ows:ServiceContact>
+			<ows:IndividualName>Dział Geoportal</ows:IndividualName>
+			<ows:ContactInfo>
+				<ows:Phone>
+					<ows:Voice>+48225322501</ows:Voice>
+				</ows:Phone>
+				<ows:Address>
+					<ows:DeliveryPoint>ul. Jana Olbrachta 94B</ows:DeliveryPoint>
+					<ows:City>Warszawa</ows:City>
+					<ows:AdministrativeArea>mazowieckie</ows:AdministrativeArea>
+					<ows:PostalCode>01-102</ows:PostalCode>
+					<ows:Country>Polska</ows:Country>
+					<ows:ElectronicMailAddress>geoportal@geoportal.gov.pl</ows:ElectronicMailAddress>
+				</ows:Address>
+			</ows:ContactInfo>
+		</ows:ServiceContact>
+	</ows:ServiceProvider>
+	<ows:OperationsMetadata>
+		<ows:Operation name="GetCapabilities">
+			<ows:DCP>
+				<ows:HTTP>
+					<ows:Get xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/ORTO?">
+						<ows:Constraint name="GetEncoding">
+							<ows:AllowedValues>
+								<ows:Value>KVP</ows:Value>
+							</ows:AllowedValues>
+						</ows:Constraint>
+					</ows:Get>
+				</ows:HTTP>
+			</ows:DCP>
+		</ows:Operation>
+		<ows:Operation name="GetTile">
+			<ows:DCP>
+				<ows:HTTP>
+					<ows:Get xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/ORTO?">
+						<ows:Constraint name="GetEncoding">
+							<ows:AllowedValues>
+								<ows:Value>KVP</ows:Value>
+							</ows:AllowedValues>
+						</ows:Constraint>
+					</ows:Get>
+				</ows:HTTP>
+			</ows:DCP>
+		</ows:Operation>
+		<ows:Operation name="GetFeatureInfo">
+			<ows:DCP>
+				<ows:HTTP>
+					<ows:Get xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/ORTO?">
+						<ows:Constraint name="GetEncoding">
+							<ows:AllowedValues>
+								<ows:Value>KVP</ows:Value>
+							</ows:AllowedValues>
+						</ows:Constraint>
+					</ows:Get>
+				</ows:HTTP>
+			</ows:DCP>
+		</ows:Operation>
+		<inspire_vs:ExtendedCapabilities>
+			<inspire_common:ResourceLocator>
+				<inspire_common:URL>http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/ORTO?REQUEST=GetCapabilities&amp;SERVICE=WMTS</inspire_common:URL>
+				<inspire_common:MediaType>text/xml</inspire_common:MediaType>
+			</inspire_common:ResourceLocator>
+			<inspire_common:ResourceType>service</inspire_common:ResourceType>
+			<inspire_common:TemporalReference>
+				<inspire_common:DateOfPublication>2012-10-24</inspire_common:DateOfPublication>
+			</inspire_common:TemporalReference>
+			<inspire_common:Conformity>
+				<inspire_common:Specification xsi:type="inspire_common:citationInspireInteroperabilityRegulation_pol">
+					<inspire_common:Title>ROZPORZĄDZENIE KOMISJI (UE) NR 1089/2010 z dnia 23 listopada 2010 r. w sprawie wykonania dyrektywy 2007/2/WE Parlamentu Europejskiego i Rady w zakresie interoperacyjności zbiorów i usług danych przestrzennych</inspire_common:Title>
+					<inspire_common:DateOfPublication>2010-12-08</inspire_common:DateOfPublication>
+					<inspire_common:URI>OJ:L:2010:323:0011:0102:PL:PDF</inspire_common:URI>
+					<inspire_common:ResourceLocator>
+						<inspire_common:URL>http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2010:323:0011:0102:PL:PDF</inspire_common:URL>
+						<inspire_common:MediaType>application/pdf</inspire_common:MediaType>
+					</inspire_common:ResourceLocator>
+				</inspire_common:Specification>
+				<inspire_common:Degree>notConformant</inspire_common:Degree>
+			</inspire_common:Conformity>
+			<inspire_common:MetadataPointOfContact>
+				<inspire_common:OrganisationName>Centralny Ośrodek Dokumentacji Geodezyjnej i Kartograficznej</inspire_common:OrganisationName>
+				<inspire_common:EmailAddress>geoportal@geoportal.gov.pl</inspire_common:EmailAddress>
+			</inspire_common:MetadataPointOfContact>
+			<inspire_common:MetadataDate>2012-10-24</inspire_common:MetadataDate>
+			<inspire_common:SpatialDataServiceType>view</inspire_common:SpatialDataServiceType>
+			<inspire_common:MandatoryKeyword>
+				<inspire_common:KeywordValue>infoMapAccessService</inspire_common:KeywordValue>
+			</inspire_common:MandatoryKeyword>
+			<inspire_common:Keyword xsi:type="inspire_common:inspireTheme_pol">
+				<inspire_common:OriginatingControlledVocabulary>
+					<inspire_common:Title>GEMET - INSPIRE themes</inspire_common:Title>
+					<inspire_common:DateOfPublication>2008-06-01</inspire_common:DateOfPublication>
+				</inspire_common:OriginatingControlledVocabulary>
+				<inspire_common:KeywordValue>Użytkowanie terenu</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>WMTS</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Tiled</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>View service</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Web Map Tile Service</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Usługa przeglądania</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Aerial ortoimagery</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Aerial photography</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Dane referencyjne</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Fotografia terenu</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Land image</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Land photography</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Obraz terenu</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Orthoimagery</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Ortofotogram</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Ortofotomapa lotnicza</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Ortofotomapa</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Raster</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Rastry</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Referential data</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Zdjęcie lotnicze</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Sporządzanie ortoobrazów</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:SupportedLanguages xmlns="http://inspire.ec.europa.eu/schemas/common/1.0">
+				<inspire_common:DefaultLanguage>
+					<inspire_common:Language>pol</inspire_common:Language>
+				</inspire_common:DefaultLanguage>
+			</inspire_common:SupportedLanguages>
+			<inspire_common:ResponseLanguage xmlns="http://inspire.ec.europa.eu/schemas/common/1.0">
+				<inspire_common:Language>pol</inspire_common:Language>
+			</inspire_common:ResponseLanguage>
+			<inspire_common:MetadataUrl>
+				<inspire_common:URL>http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=8b61894c-5e89-4626-8353-9f00b302d2eb</inspire_common:URL>
+				<inspire_common:MediaType>text/xml</inspire_common:MediaType>
+			</inspire_common:MetadataUrl>
+		</inspire_vs:ExtendedCapabilities>
+	</ows:OperationsMetadata>
+	<Contents>
+		<Layer>
+			<ows:Title>ORTOFOTOMAPA</ows:Title>
+			<ows:Abstract>Warstwa prezentująca ortofotomapę utworzoną ze zdjęć lotniczych.</ows:Abstract>
+			<ows:Keywords>
+				<ows:Keyword>Ortofotomapa</ows:Keyword>
+			</ows:Keywords>
+			<ows:Identifier>ORTOFOTOMAPA</ows:Identifier>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=b0c395a9-b92c-408e-a37e-06fa772a4ac2"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=ac363dce-91cb-4518-a4a3-f7e088811b11"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=21162299-f3c9-4d96-9b64-542d5557c9f7"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=65757f80-0fe9-11df-8a39-0800200c9a66"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=36440873-342a-47ad-b167-f24cd60e2f7d"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=abf8dc2d-a36a-4e29-9a8c-54cd51bdb525"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=49062708-089e-4d8e-9376-a53220bda2f7"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=e8e65f25-2b6a-4dae-bd97-97b057cd484a"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=b3b4d1fa-e2da-4360-a5da-4e7c50240164"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=09bc4e9c-362f-486d-b283-13f0b1067eb4"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=5efe5701-6d56-42ec-a495-bcfde95ed762"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=0c799a9f-76e0-4c9a-863f-81a70733c9f5"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=e4c17d3b-dfdd-4686-a7c9-79d749a5ff0c"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=2fc68963-45dd-4061-8d8b-5ca1630bb672"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=8a338383-2bd7-44f5-b925-6ad4ce6eb858"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=b6d807be-8157-4c6e-90a2-587bea0a203c"/>
+			<Style isDefault="true">
+				<ows:Title>Styl domyślny dla ortofotomapy</ows:Title>
+				<ows:Identifier>default</ows:Identifier>		
+				<LegendURL format="image/png" xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/ORTO/legenda.png"/> 
+			</Style>
+			<Format>image/jpeg</Format>
+			<InfoFormat>text/html</InfoFormat>
+		    <InfoFormat>text/xml; subtype=gml/3.2</InfoFormat>
+		    <InfoFormat>application/gml+xml; version=3.2</InfoFormat>
+		    
+		    
+    
+   
+    <TileMatrixSetLink>
+	<TileMatrixSet>EPSG:2180</TileMatrixSet>
+      <TileMatrixSetLimits>
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:0</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>0</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>0</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:1</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>1</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>1</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:2</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>2</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>2</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:3</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>5</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>5</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:4</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>10</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>11</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:5</TileMatrix>
+          <MinTileRow>1</MinTileRow>
+          <MaxTileRow>21</MaxTileRow>
+          <MinTileCol>1</MinTileCol>
+          <MaxTileCol>22</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:6</TileMatrix>
+          <MinTileRow>3</MinTileRow>
+          <MaxTileRow>53</MaxTileRow>
+          <MinTileCol>4</MinTileCol>
+          <MaxTileCol>56</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:7</TileMatrix>
+          <MinTileRow>7</MinTileRow>
+          <MaxTileRow>107</MaxTileRow>
+          <MinTileCol>9</MinTileCol>
+          <MaxTileCol>113</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:8</TileMatrix>
+          <MinTileRow>14</MinTileRow>
+          <MaxTileRow>214</MaxTileRow>
+          <MinTileCol>19</MinTileCol>
+          <MaxTileCol>227</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:9</TileMatrix>
+          <MinTileRow>36</MinTileRow>
+          <MaxTileRow>535</MaxTileRow>
+          <MinTileCol>47</MinTileCol>
+          <MaxTileCol>568</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:10</TileMatrix>
+          <MinTileRow>73</MinTileRow>
+          <MaxTileRow>1070</MaxTileRow>
+          <MinTileCol>95</MinTileCol>
+          <MaxTileCol>1136</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:11</TileMatrix>
+          <MinTileRow>184</MinTileRow>
+          <MaxTileRow>2675</MaxTileRow>
+          <MinTileCol>239</MinTileCol>
+          <MaxTileCol>2842</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:12</TileMatrix>
+          <MinTileRow>369</MinTileRow>
+          <MaxTileRow>5351</MaxTileRow>
+          <MinTileCol>479</MinTileCol>
+          <MaxTileCol>5684</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:13</TileMatrix>
+          <MinTileRow>738</MinTileRow>
+          <MaxTileRow>10703</MaxTileRow>
+          <MinTileCol>959</MinTileCol>
+          <MaxTileCol>11368</MaxTileCol>
+        </TileMatrixLimits>
+    
+      </TileMatrixSetLimits>
+    </TileMatrixSetLink>
+  
+   
+    <TileMatrixSetLink>
+	<TileMatrixSet>EPSG:4326</TileMatrixSet>
+      <TileMatrixSetLimits>
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:0</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>0</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>1</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:1</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>1</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>2</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:2</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>2</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>5</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:3</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>5</MaxTileRow>
+          <MinTileCol>1</MinTileCol>
+          <MaxTileCol>10</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:4</TileMatrix>
+          <MinTileRow>1</MinTileRow>
+          <MaxTileRow>11</MaxTileRow>
+          <MinTileCol>2</MinTileCol>
+          <MaxTileCol>20</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:5</TileMatrix>
+          <MinTileRow>3</MinTileRow>
+          <MaxTileRow>23</MaxTileRow>
+          <MinTileCol>5</MinTileCol>
+          <MaxTileCol>41</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:6</TileMatrix>
+          <MinTileRow>8</MinTileRow>
+          <MaxTileRow>58</MaxTileRow>
+          <MinTileCol>14</MinTileCol>
+          <MaxTileCol>104</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:7</TileMatrix>
+          <MinTileRow>17</MinTileRow>
+          <MaxTileRow>116</MaxTileRow>
+          <MinTileCol>29</MinTileCol>
+          <MaxTileCol>209</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:8</TileMatrix>
+          <MinTileRow>35</MinTileRow>
+          <MaxTileRow>233</MaxTileRow>
+          <MinTileCol>58</MinTileCol>
+          <MaxTileCol>418</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:9</TileMatrix>
+          <MinTileRow>87</MinTileRow>
+          <MaxTileRow>584</MaxTileRow>
+          <MinTileCol>146</MinTileCol>
+          <MaxTileCol>1047</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:10</TileMatrix>
+          <MinTileRow>175</MinTileRow>
+          <MaxTileRow>1168</MaxTileRow>
+          <MinTileCol>292</MinTileCol>
+          <MaxTileCol>2094</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:11</TileMatrix>
+          <MinTileRow>439</MinTileRow>
+          <MaxTileRow>2921</MaxTileRow>
+          <MinTileCol>731</MinTileCol>
+          <MaxTileCol>5236</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:12</TileMatrix>
+          <MinTileRow>879</MinTileRow>
+          <MaxTileRow>5842</MaxTileRow>
+          <MinTileCol>1463</MinTileCol>
+          <MaxTileCol>10473</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:13</TileMatrix>
+          <MinTileRow>1759</MinTileRow>
+          <MaxTileRow>11685</MaxTileRow>
+          <MinTileCol>2926</MinTileCol>
+          <MaxTileCol>20946</MaxTileCol>
+        </TileMatrixLimits>
+    
+      </TileMatrixSetLimits>
+    </TileMatrixSetLink>
+  
+	</Layer>
+	
+  <TileMatrixSet>
+    <ows:Identifier>EPSG:2180</ows:Identifier>
+    <ows:SupportedCRS>urn:ogc:def:crs:EPSG::2180</ows:SupportedCRS>
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:0</ows:Identifier>
+      <ScaleDenominator>7559538.928571429</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>1</MatrixWidth>
+      <MatrixHeight>1</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:1</ows:Identifier>
+      <ScaleDenominator>3779769.4642857146</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>2</MatrixWidth>
+      <MatrixHeight>2</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:2</ows:Identifier>
+      <ScaleDenominator>1889884.7321428573</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>3</MatrixWidth>
+      <MatrixHeight>3</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:3</ows:Identifier>
+      <ScaleDenominator>944942.3660714286</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>6</MatrixWidth>
+      <MatrixHeight>6</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:4</ows:Identifier>
+      <ScaleDenominator>472471.1830357143</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>12</MatrixWidth>
+      <MatrixHeight>11</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:5</ows:Identifier>
+      <ScaleDenominator>236235.59151785716</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>23</MatrixWidth>
+      <MatrixHeight>22</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:6</ows:Identifier>
+      <ScaleDenominator>94494.23660714286</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>57</MatrixWidth>
+      <MatrixHeight>54</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:7</ows:Identifier>
+      <ScaleDenominator>47247.11830357143</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>114</MatrixWidth>
+      <MatrixHeight>108</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:8</ows:Identifier>
+      <ScaleDenominator>23623.559151785714</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>228</MatrixWidth>
+      <MatrixHeight>215</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:9</ows:Identifier>
+      <ScaleDenominator>9449.423660714287</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>569</MatrixWidth>
+      <MatrixHeight>536</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:10</ows:Identifier>
+      <ScaleDenominator>4724.711830357143</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>1137</MatrixWidth>
+      <MatrixHeight>1071</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:11</ows:Identifier>
+      <ScaleDenominator>1889.8847321428573</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>2843</MatrixWidth>
+      <MatrixHeight>2676</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:12</ows:Identifier>
+      <ScaleDenominator>944.9423660714286</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>5685</MatrixWidth>
+      <MatrixHeight>5352</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:13</ows:Identifier>
+      <ScaleDenominator>472.4711830357143</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>11369</MatrixWidth>
+      <MatrixHeight>10704</MatrixHeight>
+    </TileMatrix>
+    
+    
+</TileMatrixSet>
+
+ 
+  <TileMatrixSet>
+    <ows:Identifier>EPSG:4326</ows:Identifier>
+    <ows:SupportedCRS>urn:ogc:def:crs:EPSG::4326</ows:SupportedCRS>
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:0</ows:Identifier>
+      <ScaleDenominator>7559538.928571429</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>2</MatrixWidth>
+      <MatrixHeight>1</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:1</ows:Identifier>
+      <ScaleDenominator>3779769.4642857146</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>3</MatrixWidth>
+      <MatrixHeight>2</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:2</ows:Identifier>
+      <ScaleDenominator>1889884.7321428573</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>6</MatrixWidth>
+      <MatrixHeight>3</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:3</ows:Identifier>
+      <ScaleDenominator>944942.3660714286</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>11</MatrixWidth>
+      <MatrixHeight>6</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:4</ows:Identifier>
+      <ScaleDenominator>472471.1830357143</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>21</MatrixWidth>
+      <MatrixHeight>12</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:5</ows:Identifier>
+      <ScaleDenominator>236235.59151785716</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>42</MatrixWidth>
+      <MatrixHeight>24</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:6</ows:Identifier>
+      <ScaleDenominator>94494.23660714286</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>105</MatrixWidth>
+      <MatrixHeight>59</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:7</ows:Identifier>
+      <ScaleDenominator>47247.11830357143</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>210</MatrixWidth>
+      <MatrixHeight>117</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:8</ows:Identifier>
+      <ScaleDenominator>23623.559151785714</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>419</MatrixWidth>
+      <MatrixHeight>234</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:9</ows:Identifier>
+      <ScaleDenominator>9449.423660714287</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>1048</MatrixWidth>
+      <MatrixHeight>585</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:10</ows:Identifier>
+      <ScaleDenominator>4724.711830357143</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>2095</MatrixWidth>
+      <MatrixHeight>1169</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:11</ows:Identifier>
+      <ScaleDenominator>1889.8847321428573</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>5237</MatrixWidth>
+      <MatrixHeight>2922</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:12</ows:Identifier>
+      <ScaleDenominator>944.9423660714286</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>10474</MatrixWidth>
+      <MatrixHeight>5843</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:13</ows:Identifier>
+      <ScaleDenominator>472.4711830357143</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>20947</MatrixWidth>
+      <MatrixHeight>11686</MatrixHeight>
+    </TileMatrix>
+    
+    
+</TileMatrixSet>
+
+ 
+	</Contents>
+</Capabilities>
Index: trunk/test/data/wmts/getcapabilities-TOPO.xml
===================================================================
--- trunk/test/data/wmts/getcapabilities-TOPO.xml	(revision 8568)
+++ trunk/test/data/wmts/getcapabilities-TOPO.xml	(revision 8568)
@@ -0,0 +1,890 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0 http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0/inspire_vs_ows_11.xsd">
+	<ows:ServiceIdentification>
+		<ows:Title>Usługa przeglądania rastrowych map topograficznych dla Polski. Profil kafelkowany (WMTS)</ows:Title>
+		<ows:Abstract>Usługa przeglądania rastrowych map topograficznych dla obszaru Polski. Mapa topograficzna Polski jest wielkoskalowym urzędowym opracowaniem kartograficznym, sporządzanym i aktualizowanym w sposób jednolity dla całego kraju. Jej treść stanowią elementy środowiska geograficznego powierzchni Ziemi i ich przestrzenne związki. Usługa wykorzystuje interfejs WMTS OGC w wersji 1.0.0. </ows:Abstract>
+		<ows:Keywords>
+			<ows:Keyword>WMTS</ows:Keyword>
+			<ows:Keyword>Tiled</ows:Keyword>
+			<ows:Keyword>Web Map Tile Service</ows:Keyword>
+			<ows:Keyword>Zagospodarowanie przestrzenne</ows:Keyword>
+			<ows:Keyword>Wody i obiekty z nimi związane</ows:Keyword>
+			<ows:Keyword>Transport networks</ows:Keyword>
+			<ows:Keyword>Sieci transportowe</ows:Keyword>
+			<ows:Keyword>Sea regions</ows:Keyword>
+			<ows:Keyword>Rzeźba terenu</ows:Keyword>
+			<ows:Keyword>Roślinność, uprawy i grunty</ows:Keyword>
+			<ows:Keyword>Regiony morskie</ows:Keyword>
+			<ows:Keyword>Railways</ows:Keyword>
+			<ows:Keyword>Railway stations</ows:Keyword>
+			<ows:Keyword>Obiekty gospodarcze</ows:Keyword>
+			<ows:Keyword>Nazwy geograficzne</ows:Keyword>
+			<ows:Keyword>Land use</ows:Keyword>
+			<ows:Keyword>Land relief</ows:Keyword>
+			<ows:Keyword>Koleje i obiekty z nimi związane</ows:Keyword>
+			<ows:Keyword>Granice</ows:Keyword>
+			<ows:Keyword>Geographical names</ows:Keyword>
+			<ows:Keyword>Geodetic control network points</ows:Keyword>
+			<ows:Keyword>Drogi i obiekty z nimi związane</ows:Keyword>
+			<ows:Keyword>Buildings</ows:Keyword>
+			<ows:Keyword>Budynki</ows:Keyword>
+			<ows:Keyword>Budynki i budowle</ows:Keyword>
+			<ows:Keyword>Boundary</ows:Keyword>
+			<ows:Keyword>Boundaries</ows:Keyword>
+		</ows:Keywords>
+		<ows:ServiceType>OGC WMTS</ows:ServiceType>
+		<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
+		<ows:Fees>Korzystanie z usługi danych przestrzennych oznacza akceptację bez ograniczeń i zastrzeżeń Regulaminu dostępnego na stronie internetowej Geoportalu http://www.geoportal.gov.pl/</ows:Fees>
+		<ows:AccessConstraints>brak ograniczeń</ows:AccessConstraints> 
+	</ows:ServiceIdentification>
+	<ows:ServiceProvider>
+		<ows:ProviderName>Centralny Ośrodek Dokumentacji Geodezyjnej i Kartograficznej </ows:ProviderName>
+		<ows:ProviderSite xlink:type="simple" xlink:href="www.geoportal.gov.pl"/>
+		<ows:ServiceContact>
+			<ows:IndividualName>Dział Geoportal</ows:IndividualName>
+			<ows:ContactInfo>
+				<ows:Phone>
+					<ows:Voice>+48225322501</ows:Voice>
+				</ows:Phone>
+				<ows:Address>
+					<ows:DeliveryPoint>ul. Jana Olbrachta 94B</ows:DeliveryPoint>
+					<ows:City>Warszawa</ows:City>
+					<ows:AdministrativeArea>mazowieckie</ows:AdministrativeArea>
+					<ows:PostalCode>01-102</ows:PostalCode>
+					<ows:Country>Polska</ows:Country>
+					<ows:ElectronicMailAddress>geoportal@geoportal.gov.pl</ows:ElectronicMailAddress>
+				</ows:Address>
+			</ows:ContactInfo>
+		</ows:ServiceContact>
+	</ows:ServiceProvider>
+	<ows:OperationsMetadata>
+		<ows:Operation name="GetCapabilities">
+			<ows:DCP>
+				<ows:HTTP>
+					<ows:Get xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/TOPO?">
+						<ows:Constraint name="GetEncoding">
+							<ows:AllowedValues>
+								<ows:Value>KVP</ows:Value>
+							</ows:AllowedValues>
+						</ows:Constraint>
+					</ows:Get>
+				</ows:HTTP>
+			</ows:DCP>
+		</ows:Operation>
+		<ows:Operation name="GetTile">
+			<ows:DCP>
+				<ows:HTTP>
+					<ows:Get xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/TOPO?">
+						<ows:Constraint name="GetEncoding">
+							<ows:AllowedValues>
+								<ows:Value>KVP</ows:Value>
+							</ows:AllowedValues>
+						</ows:Constraint>
+					</ows:Get>
+				</ows:HTTP>
+			</ows:DCP>
+		</ows:Operation>
+		<ows:Operation name="GetFeatureInfo">
+			<ows:DCP>
+				<ows:HTTP>
+					<ows:Get xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/TOPO?">
+						<ows:Constraint name="GetEncoding">
+							<ows:AllowedValues>
+								<ows:Value>KVP</ows:Value>
+							</ows:AllowedValues>
+						</ows:Constraint>
+					</ows:Get>
+				</ows:HTTP>
+			</ows:DCP>
+		</ows:Operation>
+		<inspire_vs:ExtendedCapabilities>
+			<inspire_common:ResourceLocator>
+				<inspire_common:URL>http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/TOPO?REQUEST=GetCapabilities&amp;SERVICE=WMTS</inspire_common:URL>
+				<inspire_common:MediaType>text/xml</inspire_common:MediaType>
+			</inspire_common:ResourceLocator>
+			<inspire_common:ResourceType>service</inspire_common:ResourceType>
+			<inspire_common:TemporalReference>
+				<inspire_common:DateOfPublication>2012-10-24</inspire_common:DateOfPublication>
+			</inspire_common:TemporalReference>
+			<inspire_common:Conformity>
+				<inspire_common:Specification xsi:type="inspire_common:citationInspireInteroperabilityRegulation_pol">
+					<inspire_common:Title>ROZPORZĄDZENIE KOMISJI (UE) NR 1089/2010 z dnia 23 listopada 2010 r. w sprawie wykonania dyrektywy 2007/2/WE Parlamentu Europejskiego i Rady w zakresie interoperacyjności zbiorów i usług danych przestrzennych</inspire_common:Title>
+					<inspire_common:DateOfPublication>2010-12-08</inspire_common:DateOfPublication>
+					<inspire_common:URI>OJ:L:2010:323:0011:0102:PL:PDF</inspire_common:URI>
+					<inspire_common:ResourceLocator>
+						<inspire_common:URL>http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2010:323:0011:0102:PL:PDF</inspire_common:URL>
+						<inspire_common:MediaType>application/pdf</inspire_common:MediaType>
+					</inspire_common:ResourceLocator>
+				</inspire_common:Specification>
+				<inspire_common:Degree>notConformant</inspire_common:Degree>
+			</inspire_common:Conformity>
+			<inspire_common:MetadataPointOfContact>
+				<inspire_common:OrganisationName>Centralny Ośrodek Dokumentacji Geodezyjnej i Kartograficznej</inspire_common:OrganisationName>
+				<inspire_common:EmailAddress>geoportal@geoportal.gov.pl</inspire_common:EmailAddress>
+			</inspire_common:MetadataPointOfContact>
+			<inspire_common:MetadataDate>2012-10-24</inspire_common:MetadataDate>
+			<inspire_common:SpatialDataServiceType>view</inspire_common:SpatialDataServiceType>
+			<inspire_common:MandatoryKeyword>
+				<inspire_common:KeywordValue>infoMapAccessService</inspire_common:KeywordValue>
+			</inspire_common:MandatoryKeyword>
+			<inspire_common:Keyword xsi:type="inspire_common:inspireTheme_pol">
+				<inspire_common:OriginatingControlledVocabulary>
+					<inspire_common:Title>GEMET - INSPIRE themes</inspire_common:Title>
+					<inspire_common:DateOfPublication>2008-06-01</inspire_common:DateOfPublication>
+				</inspire_common:OriginatingControlledVocabulary>
+				<inspire_common:KeywordValue>Użytkowanie terenu</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>WMTS</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Tiled</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Web Map Tile Service</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Boundaries</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Boundary</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Budynki i budowle</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Budynki</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Buildings</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Drogi i obiekty z nimi związane</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Geodetic control network points</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Geographical names</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Granice</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Koleje i obiekty z nimi związane</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Land relief</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Land use</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Nazwy geograficzne</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Obiekty gospodarcze</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Railway stations</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Railways</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Regiony morskie</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Roślinność, uprawy i grunty</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Rzeźba terenu</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Sea regions</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Sieci transportowe</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Transport networks</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Wody i obiekty z nimi związane</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:Keyword>
+				<inspire_common:KeywordValue>Zagospodarowanie przestrzenne</inspire_common:KeywordValue>
+			</inspire_common:Keyword>
+			<inspire_common:SupportedLanguages xmlns="http://inspire.ec.europa.eu/schemas/common/1.0">
+				<inspire_common:DefaultLanguage>
+					<inspire_common:Language>pol</inspire_common:Language>
+				</inspire_common:DefaultLanguage>
+			</inspire_common:SupportedLanguages>
+			<inspire_common:ResponseLanguage xmlns="http://inspire.ec.europa.eu/schemas/common/1.0">
+				<inspire_common:Language>pol</inspire_common:Language>
+			</inspire_common:ResponseLanguage>
+			<inspire_common:MetadataUrl>
+				<inspire_common:URL>http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&amp;ID=a658ac75-e2c6-4405-8bae-8d0f98f1babf</inspire_common:URL>
+				<inspire_common:MediaType>text/xml</inspire_common:MediaType>
+			</inspire_common:MetadataUrl>
+		</inspire_vs:ExtendedCapabilities>
+	</ows:OperationsMetadata>
+	<Contents>
+		<Layer>
+			<ows:Title>MAPA TOPOGRAFICZNA</ows:Title>
+			<ows:Abstract>Warstwa prezentująca rastrową mapę topograficzną</ows:Abstract>
+			<ows:Keywords>
+				<ows:Keyword>Mapa topograficzna</ows:Keyword>
+			</ows:Keywords>
+			<ows:Identifier>MAPA TOPOGRAFICZNA</ows:Identifier>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=2394082c-56b0-4d6c-b877-40fe5192f489&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=7c66424b-5cb7-46e2-a093-eb2536bd7ee3&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=e44c7e17-54fa-4857-8bf0-dea6f3995a25&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=28795640-bb42-48d5-bb0a-76837729cb0f&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=5a44a4c3-1bd6-4221-9a5d-9b1ef0a580c3&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=a81f32f3-1826-4356-93fd-c87f468bbf38&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=b5a4ea76-4348-473e-bf82-49bb1d959d4a&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=ea41623c-4e74-4d9f-ad4a-d977b86e323d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=85c58c16-0d7c-464e-b06a-539cc00d443f&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=ef54f773-8e0c-4916-bf17-76aa03394735&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=8a1ad8bb-2319-460f-b8d9-2ff7f188557d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=17b603d8-b5c7-4b61-ad92-55f396f93f5d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=3da84f4a-3b0c-4ded-a727-a83f14f562c5&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=1254ad45-d875-497f-b238-8c8f025f7f28&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=26bddb02-cd91-4563-bd9c-2acc42caec77&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=9936d901-6289-4067-96af-b5671bcbb366&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=b4abe60a-4fb3-4e5e-ad84-c7b2bfe62173&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=d743643b-ee18-417c-ae39-2b8205c0a0ac&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=8d32b509-068a-4c0b-bc54-758a1c8d04d6&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=165177bb-a595-4532-9b12-4d5920f09b2e&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=cdb7538b-f8f8-41b9-bb60-41d431785d15&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=1e271af9-4ada-4c52-a464-cede4af6336e&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=ce2745a2-8186-4049-9c87-b672465e1dd3&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=0e4a48d7-edb1-487b-9389-8ea6a5d51f48&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=a60cdac8-c2a6-4f2d-855e-6fa95df0c490&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=e4e3c5f1-8c44-424b-9198-a6bd08534651&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=166a1466-ca16-4454-b09d-525c9dd4eafc&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=76d200f7-4f80-4ccf-9fff-625b97ed20f0&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=f7c1f40a-4402-4e68-a4bf-31f2ab23afe1&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=45d7c316-3df8-47cf-befc-834746f10fe0&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=9cdd82e4-7164-41f9-a987-66a7b5792420&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=3082b644-f710-48d9-8f37-c8516a2583af&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=78009945-ac8a-4eda-97ef-76ffc2155c34&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=ed1447c5-f47f-4b8e-b84b-8ada731cd34d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=aa101eeb-0bde-492d-ab13-950571f45712&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=2149db7f-5d67-43d3-8d0d-851f7e7c5690&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=198cc302-5fa9-4808-aada-e1cb9086b0d4&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=99f7c5bc-de8e-4dc5-9630-851a5872425d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=f31dc834-fc33-474b-a033-1e26b8f2c82b&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=9c1d1a77-41a9-4f2d-aa4a-60d2fef4aa6f&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=a80b842b-e9d1-4d56-beae-02541aad9b16&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=6f876f3a-70fc-4429-ab08-ec109990bd0e&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=a96fc82b-bb87-4b31-9b5a-486940c75c09&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=5aa2b24b-a048-409d-857b-3673f8b8d11a&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=b6ce2a0c-f1fc-4ec3-b8e4-158356eb6dc7&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=21becd36-2a71-49d4-8c84-1173f193b522&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=7814ee5a-a1f2-43ca-83b6-2ece8f15eb2a&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=74b8c281-938c-4055-b579-1861c2b9cf8d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=ff669880-8e76-4470-9847-0ff79195894a&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=9e463571-8e6e-427e-a868-8db8471edb43&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=4ae04e43-0234-4022-a28d-887f5d494799&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=f1f0868a-0e0a-4181-bbdf-1a262e6cf40d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=9c502ba0-2e04-4f0d-9653-4e2027a856b9&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=e1084309-84ef-4c9c-9cf5-e77e817ebf66&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=2ffd5d4f-9a48-44fe-991f-767df1ac8829&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=8c16c478-6fce-4a85-8fdd-07dcb86dbc6d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=d781ea1e-3d3a-4f52-82c4-be2f84bd5b58&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=fa77d76c-ada7-47fe-8e59-9cbb22782b15&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=dbc0739e-e8f6-48cf-a054-c0e1fe93b3b9&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=15f4b0ba-c4dd-4807-a5eb-5a182aed5bfe&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=5cf620ea-874d-4cc3-9f47-18ddcae64555&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=8add5a9a-9a06-4562-b09b-0314ab60a681&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=ef0a91c7-b040-4f7b-b792-173bdbf02509&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=46786374-dfd4-4f8a-ae89-312ff1523290&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=e98e05b4-7d72-4f02-b6ad-ea205455c7af&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=7518e1d0-e91e-4485-90c0-51de2801faee&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=e885a9be-6145-4e46-a6f3-74fb3594b741&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=337c2f6f-0b04-4517-b2d0-e2c4bfa75cc0&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=2eca49be-2e99-43f5-b957-218cf1e672f9&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=05b5ac2e-cb0e-4218-a3a7-c466e7de9018&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=31cfd901-5463-4157-84dd-c771a79c5516&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=d940d836-1c80-46db-b0f9-b28361ce8b05&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=77ee9941-1c10-42aa-9276-5daaad01db52&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=8e024bec-33e9-4d4f-b3ea-f1f45aa87d68&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=29fdc2c1-f9ec-4e3b-8b99-bd51dcbf1ddc&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=df7cbf8a-feb4-4ce5-9da1-7e0e97379aa1&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=cf1f8637-54c1-464d-a451-a465871325ed&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=70cd76d2-08e2-4bef-b33f-60c571b2f461&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=609d7a26-e030-43a3-bfd1-8fd93897448d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=d3f574dd-f2c4-4292-9f01-e38dbcbb552f&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=b3de61ab-3e0a-40fd-ac13-7226da40dcc9&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=51da7c13-30d4-4096-a19b-0533040a3c49&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=40e391fd-f433-49a6-8550-7d6db6ad1071&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=615d2830-7a98-49b0-a34c-0e7b964caf5a&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=839a3ae5-eb87-4258-b8a0-9126f52ed5ab&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=e4cf00e0-0dde-4df4-8678-7f8289efde9d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=a35ed65c-79bd-446a-9328-2893d1593ba2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=bf3695e0-8a34-437d-8e18-e8e40752484b&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=3b064e38-78b3-4514-8594-bd96beabc37f&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=035d324a-c5bd-4b08-8683-f10465b3371e&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=bf81fea4-aece-4590-a69a-0f81cb1211a4&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=b0a1d3db-4fae-4ddb-9274-8257697311db&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=50e2ec68-65cd-49fe-b50d-18660829b7ed&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=512b3aa6-4f23-48eb-b7b7-1d0b8df63f0d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=46185c64-09b5-44e8-abfb-c9b324d11b45&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=9292c599-2387-4da6-8415-fa5e6cd9c68e&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=65955f07-d2ad-4e1a-9821-5b98245d14a4&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=b208bac3-2ae1-475f-a086-5b8e7edd5459&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=1f37e4cb-a0bb-4897-a4f5-cfb61f835f04&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=2b5b8ec0-c610-4f5f-9ad2-de223dba9e01&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=7b81454c-0b25-4c91-a118-4a515c648063&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=6a771193-4540-40f2-b346-008382b47748&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=c0fc7faf-2772-4791-b82a-4a77439913f1&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=dde745fd-e27d-47d7-a705-747f7590051e&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=a0c61f97-b03d-4b6e-b880-3b3adebf2fd7&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=5c3774a0-a4be-4ba1-ad26-7b83a7fa87ed&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=faf7b8fd-482d-4521-b6fe-ba11eabccde8&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=f6f3828f-9f52-4cb8-bfef-ccc4b8efd556&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=c5d71afa-c9af-47c0-ad13-7dd07df7b6dc&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=8aa23dbc-994b-47d5-9734-224a725208ab&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=d75e0fe6-b22d-480b-9d45-4f916771caf9&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=ceea656e-6f51-4c6a-861b-a94228105b4d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=8a2ee61b-4b4c-401d-89e8-51a422c0fc6a&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=b4e4189b-e1ea-424d-8f99-ce8479320879&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=5b1520f4-2778-47de-ba4e-26d8b8e775b1&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=553f1dc2-2bc5-4d8f-b365-120c7f47ec67&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=1e3fa885-e296-406a-9d33-12ef1b490c94&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=e0cb643d-aca5-47f1-bee0-7524ed0cdd77&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=d224d937-3c37-4b86-b351-370f3e4414c7&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=627721d4-b72d-4051-90b8-3d117692217d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=0eea456c-65ef-4e79-93af-d1d5844bf2a9&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=50a0f02d-8180-425e-a6e6-a896f22b55fb&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=57c9db00-4358-49f2-9f0a-24d3fd99c96b&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=52152f60-1c64-490f-94ab-674a8fca9184&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=cc78be09-98ab-4bf7-872c-e6d017997679&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=e68baffd-af42-46c3-8261-e603e2421d27&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=ba9270b9-89e3-44d6-8a1c-a4be04135eea&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=43df6dc9-8f19-4865-a4ba-5e595e262a1b&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=63689c14-00e0-4f2c-8559-ac0a8c7f66cc&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=08a4cbc7-4870-449c-9aa2-6183e994a680&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=be32b35e-f81d-4d7a-a093-0da17d26de52&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=49bb53b4-1d77-45b8-baaf-e253fd8b543d&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=8d7ace66-24fc-452b-8014-7b35c8aa9595&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=409b63bb-aee8-40ed-8b72-21444197a007&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=cf189ca8-bf44-4a08-ae0b-410642c65af2&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=2ccc02d1-3c6b-4497-9c05-4dbe64d8f501&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=50f3f539-36c3-4e44-96fd-1bc8478e2f99&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=aec21e4d-6e59-4c76-9ab9-458ad7ae557c&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+						<ows:Metadata xlink:href="http://mapy.geoportal.gov.pl/wss/service/CSW/guest/CSWStartup?SERVICE=CSW&amp;REQUEST=GetRecordById&amp;VERSION=2.0.2&amp;ID=d26ae241-c701-408a-a8bf-72f7708616bf&amp;OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd"/>
+			<Style isDefault="true">
+				<ows:Title>Styl domyślny dla mapy topograficznej</ows:Title>
+				<ows:Identifier>default</ows:Identifier>		
+				<LegendURL format="image/png" xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/TOPO/legenda.png"/> 
+			</Style>
+			<Format>image/jpeg</Format>
+			<InfoFormat>text/html</InfoFormat>
+		    <InfoFormat>text/xml; subtype=gml/3.2</InfoFormat>
+		    <InfoFormat>application/gml+xml; version=3.2</InfoFormat>
+		    
+		    
+    
+   
+    <TileMatrixSetLink>
+	<TileMatrixSet>EPSG:2180</TileMatrixSet>
+      <TileMatrixSetLimits>
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:0</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>0</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>0</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:1</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>1</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>1</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:2</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>2</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>2</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:3</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>5</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>5</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:4</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>11</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>11</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:5</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>22</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>23</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:6</TileMatrix>
+          <MinTileRow>1</MinTileRow>
+          <MaxTileRow>56</MaxTileRow>
+          <MinTileCol>1</MinTileCol>
+          <MaxTileCol>59</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:7</TileMatrix>
+          <MinTileRow>2</MinTileRow>
+          <MaxTileRow>112</MaxTileRow>
+          <MinTileCol>3</MinTileCol>
+          <MaxTileCol>119</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:8</TileMatrix>
+          <MinTileRow>5</MinTileRow>
+          <MaxTileRow>224</MaxTileRow>
+          <MinTileCol>7</MinTileCol>
+          <MaxTileCol>239</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:9</TileMatrix>
+          <MinTileRow>14</MinTileRow>
+          <MaxTileRow>561</MaxTileRow>
+          <MinTileCol>18</MinTileCol>
+          <MaxTileCol>597</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:10</TileMatrix>
+          <MinTileRow>29</MinTileRow>
+          <MaxTileRow>1122</MaxTileRow>
+          <MinTileCol>36</MinTileCol>
+          <MaxTileCol>1195</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:11</TileMatrix>
+          <MinTileRow>73</MinTileRow>
+          <MaxTileRow>2805</MaxTileRow>
+          <MinTileCol>92</MinTileCol>
+          <MaxTileCol>2989</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:2180:12</TileMatrix>
+          <MinTileRow>147</MinTileRow>
+          <MaxTileRow>5610</MaxTileRow>
+          <MinTileCol>184</MinTileCol>
+          <MaxTileCol>5979</MaxTileCol>
+        </TileMatrixLimits>
+    
+      </TileMatrixSetLimits>
+    </TileMatrixSetLink>
+  
+   
+    <TileMatrixSetLink>
+	<TileMatrixSet>EPSG:4326</TileMatrixSet>
+      <TileMatrixSetLimits>
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:0</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>0</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>1</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:1</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>1</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>2</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:2</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>3</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>5</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:3</TileMatrix>
+          <MinTileRow>0</MinTileRow>
+          <MaxTileRow>6</MaxTileRow>
+          <MinTileCol>0</MinTileCol>
+          <MaxTileCol>11</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:4</TileMatrix>
+          <MinTileRow>1</MinTileRow>
+          <MaxTileRow>12</MaxTileRow>
+          <MinTileCol>1</MinTileCol>
+          <MaxTileCol>22</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:5</TileMatrix>
+          <MinTileRow>2</MinTileRow>
+          <MaxTileRow>24</MaxTileRow>
+          <MinTileCol>3</MinTileCol>
+          <MaxTileCol>44</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:6</TileMatrix>
+          <MinTileRow>5</MinTileRow>
+          <MaxTileRow>61</MaxTileRow>
+          <MinTileCol>9</MinTileCol>
+          <MaxTileCol>110</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:7</TileMatrix>
+          <MinTileRow>10</MinTileRow>
+          <MaxTileRow>122</MaxTileRow>
+          <MinTileCol>18</MinTileCol>
+          <MaxTileCol>220</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:8</TileMatrix>
+          <MinTileRow>21</MinTileRow>
+          <MaxTileRow>244</MaxTileRow>
+          <MinTileCol>36</MinTileCol>
+          <MaxTileCol>441</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:9</TileMatrix>
+          <MinTileRow>54</MinTileRow>
+          <MaxTileRow>612</MaxTileRow>
+          <MinTileCol>90</MinTileCol>
+          <MaxTileCol>1103</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:10</TileMatrix>
+          <MinTileRow>109</MinTileRow>
+          <MaxTileRow>1224</MaxTileRow>
+          <MinTileCol>181</MinTileCol>
+          <MaxTileCol>2206</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:11</TileMatrix>
+          <MinTileRow>273</MinTileRow>
+          <MaxTileRow>3060</MaxTileRow>
+          <MinTileCol>453</MinTileCol>
+          <MaxTileCol>5516</MaxTileCol>
+        </TileMatrixLimits>
+    
+    	<TileMatrixLimits>
+          <TileMatrix>EPSG:4326:12</TileMatrix>
+          <MinTileRow>547</MinTileRow>
+          <MaxTileRow>6120</MaxTileRow>
+          <MinTileCol>906</MinTileCol>
+          <MaxTileCol>11033</MaxTileCol>
+        </TileMatrixLimits>
+    
+      </TileMatrixSetLimits>
+    </TileMatrixSetLink>
+  
+	</Layer>
+	
+  <TileMatrixSet>
+    <ows:Identifier>EPSG:2180</ows:Identifier>
+    <ows:SupportedCRS>urn:ogc:def:crs:EPSG::2180</ows:SupportedCRS>
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:0</ows:Identifier>
+      <ScaleDenominator>7559538.928571429</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>1</MatrixWidth>
+      <MatrixHeight>1</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:1</ows:Identifier>
+      <ScaleDenominator>3779769.4642857146</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>2</MatrixWidth>
+      <MatrixHeight>2</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:2</ows:Identifier>
+      <ScaleDenominator>1889884.7321428573</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>3</MatrixWidth>
+      <MatrixHeight>3</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:3</ows:Identifier>
+      <ScaleDenominator>944942.3660714286</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>6</MatrixWidth>
+      <MatrixHeight>6</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:4</ows:Identifier>
+      <ScaleDenominator>472471.1830357143</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>12</MatrixWidth>
+      <MatrixHeight>12</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:5</ows:Identifier>
+      <ScaleDenominator>236235.59151785716</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>24</MatrixWidth>
+      <MatrixHeight>23</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:6</ows:Identifier>
+      <ScaleDenominator>94494.23660714286</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>60</MatrixWidth>
+      <MatrixHeight>57</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:7</ows:Identifier>
+      <ScaleDenominator>47247.11830357143</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>120</MatrixWidth>
+      <MatrixHeight>113</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:8</ows:Identifier>
+      <ScaleDenominator>23623.559151785714</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>240</MatrixWidth>
+      <MatrixHeight>225</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:9</ows:Identifier>
+      <ScaleDenominator>9449.423660714287</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>598</MatrixWidth>
+      <MatrixHeight>562</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:10</ows:Identifier>
+      <ScaleDenominator>4724.711830357143</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>1196</MatrixWidth>
+      <MatrixHeight>1123</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:11</ows:Identifier>
+      <ScaleDenominator>1889.8847321428573</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>2990</MatrixWidth>
+      <MatrixHeight>2806</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:2180:12</ows:Identifier>
+      <ScaleDenominator>944.9423660714286</ScaleDenominator>
+      <TopLeftCorner>850000.0 100000.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>5980</MatrixWidth>
+      <MatrixHeight>5611</MatrixHeight>
+    </TileMatrix>
+    
+    
+</TileMatrixSet>
+
+ 
+  <TileMatrixSet>
+    <ows:Identifier>EPSG:4326</ows:Identifier>
+    <ows:SupportedCRS>urn:ogc:def:crs:EPSG::4326</ows:SupportedCRS>
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:0</ows:Identifier>
+      <ScaleDenominator>7559538.928571429</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>2</MatrixWidth>
+      <MatrixHeight>1</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:1</ows:Identifier>
+      <ScaleDenominator>3779769.4642857146</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>3</MatrixWidth>
+      <MatrixHeight>2</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:2</ows:Identifier>
+      <ScaleDenominator>1889884.7321428573</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>6</MatrixWidth>
+      <MatrixHeight>4</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:3</ows:Identifier>
+      <ScaleDenominator>944942.3660714286</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>12</MatrixWidth>
+      <MatrixHeight>7</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:4</ows:Identifier>
+      <ScaleDenominator>472471.1830357143</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>23</MatrixWidth>
+      <MatrixHeight>13</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:5</ows:Identifier>
+      <ScaleDenominator>236235.59151785716</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>45</MatrixWidth>
+      <MatrixHeight>25</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:6</ows:Identifier>
+      <ScaleDenominator>94494.23660714286</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>111</MatrixWidth>
+      <MatrixHeight>62</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:7</ows:Identifier>
+      <ScaleDenominator>47247.11830357143</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>221</MatrixWidth>
+      <MatrixHeight>123</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:8</ows:Identifier>
+      <ScaleDenominator>23623.559151785714</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>442</MatrixWidth>
+      <MatrixHeight>245</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:9</ows:Identifier>
+      <ScaleDenominator>9449.423660714287</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>1104</MatrixWidth>
+      <MatrixHeight>613</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:10</ows:Identifier>
+      <ScaleDenominator>4724.711830357143</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>2207</MatrixWidth>
+      <MatrixHeight>1225</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:11</ows:Identifier>
+      <ScaleDenominator>1889.8847321428573</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>5517</MatrixWidth>
+      <MatrixHeight>3061</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:4326:12</ows:Identifier>
+      <ScaleDenominator>944.9423660714286</ScaleDenominator>
+      <TopLeftCorner>56.0 12.0</TopLeftCorner>
+      <TileWidth>512</TileWidth>
+      <TileHeight>512</TileHeight>
+      <MatrixWidth>11034</MatrixWidth>
+      <MatrixHeight>6121</MatrixHeight>
+    </TileMatrix>
+    
+    
+</TileMatrixSet>
+
+ 
+	</Contents>
+</Capabilities>
Index: trunk/test/data/wmts/getcapabilities-pseudo-mercator.xml
===================================================================
--- trunk/test/data/wmts/getcapabilities-pseudo-mercator.xml	(revision 8568)
+++ trunk/test/data/wmts/getcapabilities-pseudo-mercator.xml	(revision 8568)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:inspire_common="http://inspire.ec.europa.eu/schemas/common/1.0" xmlns:inspire_vs="http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0 http://inspire.ec.europa.eu/schemas/inspire_vs_ows11/1.0/inspire_vs_ows_11.xsd">
+	<ows:ServiceIdentification>
+		<ows:Title>Test (WMTS)</ows:Title>
+		<ows:Abstract>Abstract.</ows:Abstract>
+		<ows:Keywords>
+			<ows:Keyword>WMTS</ows:Keyword>
+		</ows:Keywords>
+		
+		<ows:ServiceType>OGC WMTS</ows:ServiceType>
+		<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
+		<ows:Fees>Test Fees</ows:Fees>
+		<ows:AccessConstraints>Access</ows:AccessConstraints> 
+	</ows:ServiceIdentification>
+	<ows:ServiceProvider>
+		<ows:ProviderName>Provider</ows:ProviderName>
+	</ows:ServiceProvider>
+	<ows:OperationsMetadata>
+		<ows:Operation name="GetTile">
+			<ows:DCP>
+				<ows:HTTP>
+					<ows:Get xlink:href="http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/ORTO?">
+						<ows:Constraint name="GetEncoding">
+							<ows:AllowedValues>
+								<ows:Value>KVP</ows:Value>
+							</ows:AllowedValues>
+						</ows:Constraint>
+					</ows:Get>
+				</ows:HTTP>
+			</ows:DCP>
+		</ows:Operation>
+	</ows:OperationsMetadata>
+	<Contents>
+		<Layer>
+			<ows:Title>Layer title</ows:Title>
+			<ows:Identifier>Layer identifier</ows:Identifier>
+			<Style isDefault="true">
+				<ows:Title>Default style</ows:Title>
+				<ows:Identifier>default</ows:Identifier>		
+			</Style>
+			<Format>image/jpeg</Format>
+			<InfoFormat>text/html</InfoFormat>
+    <TileMatrixSetLink>
+	<TileMatrixSet>EPSG:3857</TileMatrixSet>
+    </TileMatrixSetLink>
+  
+	</Layer>
+	
+  <TileMatrixSet>
+    <ows:Identifier>EPSG:3857</ows:Identifier>
+    <ows:SupportedCRS>urn:ogc:def:crs:EPSG::3857</ows:SupportedCRS>
+    <TileMatrix>
+      <ows:Identifier>EPSG:3857:0</ows:Identifier>
+      <ScaleDenominator>559082264.0287178</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>1</MatrixWidth>
+      <MatrixHeight>1</MatrixHeight>
+    </TileMatrix>
+
+    <TileMatrix>
+      <ows:Identifier>EPSG:3857:1</ows:Identifier>
+      <ScaleDenominator>279541132.0143589</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>2</MatrixWidth>
+      <MatrixHeight>2</MatrixHeight>
+    </TileMatrix>
+
+    <TileMatrix>
+      <ows:Identifier>EPSG:3857:2</ows:Identifier>
+      <ScaleDenominator>139770566.0071794</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>4</MatrixWidth>
+      <MatrixHeight>4</MatrixHeight>
+    </TileMatrix>
+    
+    <TileMatrix>
+      <ows:Identifier>EPSG:3857:3</ows:Identifier>
+      <ScaleDenominator>69885283.00358972</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>8</MatrixWidth>
+      <MatrixHeight>8</MatrixHeight>
+    </TileMatrix>
+
+    <TileMatrix>
+      <ows:Identifier>EPSG:3857:4</ows:Identifier>
+      <ScaleDenominator>34942641.50179486</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>16</MatrixWidth>
+      <MatrixHeight>16</MatrixHeight>
+    </TileMatrix>
+
+    <TileMatrix>
+      <ows:Identifier>EPSG:3857:5</ows:Identifier>
+      <ScaleDenominator>17471320.75089743</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>32</MatrixWidth>
+      <MatrixHeight>32</MatrixHeight>
+    </TileMatrix>
+	
+	<TileMatrix>
+      <ows:Identifier>EPSG:3857:6</ows:Identifier>
+      <ScaleDenominator>8735660.375448715</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>64</MatrixWidth>
+      <MatrixHeight>64</MatrixHeight>
+    </TileMatrix>    
+
+	<TileMatrix>
+      <ows:Identifier>EPSG:3857:7</ows:Identifier>
+      <ScaleDenominator>4367830.187724357</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>128</MatrixWidth>
+      <MatrixHeight>128</MatrixHeight>
+    </TileMatrix>  
+
+	<TileMatrix>
+      <ows:Identifier>EPSG:3857:8</ows:Identifier>
+      <ScaleDenominator>2183915.093862179</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>256</MatrixWidth>
+      <MatrixHeight>256</MatrixHeight>
+    </TileMatrix>  
+
+	<TileMatrix>
+      <ows:Identifier>EPSG:3857:9</ows:Identifier>
+      <ScaleDenominator>1091957.546931089</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>512</MatrixWidth>
+      <MatrixHeight>512</MatrixHeight>
+    </TileMatrix>  
+
+	<TileMatrix>
+      <ows:Identifier>EPSG:3857:10</ows:Identifier>
+      <ScaleDenominator>545978.7734655447</ScaleDenominator>
+      <TopLeftCorner>20037509.917339604 -20037508.342789244</TopLeftCorner>
+      <TileWidth>256</TileWidth>
+      <TileHeight>256</TileHeight>
+      <MatrixWidth>1024</MatrixWidth>
+      <MatrixHeight>1024</MatrixHeight>
+    </TileMatrix>  
+</TileMatrixSet>
+
+ 
+	</Contents>
+</Capabilities>
Index: trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java	(revision 8567)
+++ trunk/test/unit/org/openstreetmap/josm/data/imagery/TemplatedWMSTileSourceTest.java	(revision 8568)
@@ -7,5 +7,4 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.openstreetmap.gui.jmapviewer.Tile;
 import org.openstreetmap.gui.jmapviewer.TileXY;
 import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;
@@ -48,4 +47,5 @@
             }
         }
+        verifyTileSquarness(source, 150, 20, 18);
         verifyTileSquarness(source, 2270, 1323, 12);
         verifyLocation(source, new LatLon(53.5937132, 19.5652017));
@@ -109,5 +109,5 @@
 
     private LatLon getTileLatLon(TemplatedWMSTileSource source, int x, int y, int z) {
-        return new LatLon(source.tileXYToLatLon(new Tile(source, x, y, z)));
+        return new LatLon(source.tileXYToLatLon(x, y, z));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 8568)
+++ trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 8568)
@@ -0,0 +1,131 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.imagery;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.projection.Projections;
+
+public class WMTSTileSourceTest {
+
+    private ImageryInfo testImageryTMS =  new ImageryInfo("test imagery", "http://localhost", "tms", null, null);
+    private ImageryInfo testImageryPSEUDO_MERCATOR = getImagery("test/data/wmts/getcapabilities-pseudo-mercator.xml");
+    private ImageryInfo testImageryTOPO_PL = getImagery("test/data/wmts/getcapabilities-TOPO.xml");
+    private ImageryInfo testImageryORTO_PL = getImagery("test/data/wmts/getcapabilities-ORTO.xml");
+
+
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    private static ImageryInfo getImagery(String path) {
+        try {
+            return new ImageryInfo(
+                    "test",
+                    new File(path).toURI().toURL().toString()
+                    );
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    @Test
+    public void testPseudoMercator() throws MalformedURLException, IOException {
+        Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
+        WMTSTileSource testSource = new WMTSTileSource(testImageryPSEUDO_MERCATOR);
+
+        verifyMercatorTile(testSource, 0, 0, 1);
+        verifyMercatorTile(testSource, 0, 0, 2);
+        verifyMercatorTile(testSource, 1, 1, 2);
+        for(int x = 0; x < 4; x++) {
+            for(int y = 0; y < 4; y++) {
+                verifyMercatorTile(testSource, x, y, 3);
+            }
+        }
+        for(int x = 0; x < 8; x++) {
+            for(int y = 0; y < 4; y++) {
+                verifyMercatorTile(testSource, x, y, 4);
+            }
+        }
+
+        verifyMercatorTile(testSource, 2<<9 - 1, 2<<8 - 1, 10);
+
+        assertEquals("TileXMax", 1, testSource.getTileXMax(1));
+        assertEquals("TileYMax", 1, testSource.getTileYMax(1));
+        assertEquals("TileXMax", 2, testSource.getTileXMax(2));
+        assertEquals("TileYMax", 2, testSource.getTileYMax(2));
+        assertEquals("TileXMax", 4, testSource.getTileXMax(3));
+        assertEquals("TileYMax", 4, testSource.getTileYMax(3));
+
+    }
+
+    @Test
+    public void testGeoportalTOPOPL() throws IOException {
+        Main.setProjection(Projections.getProjectionByCode("EPSG:4326"));
+        WMTSTileSource testSource = new WMTSTileSource(testImageryTOPO_PL);
+        verifyTile(new LatLon(56,12), testSource, 0, 0, 1);
+        verifyTile(new LatLon(56,12), testSource, 0, 0, 2);
+        verifyTile(new LatLon(51.1323176, 16.8676823), testSource, 1, 1, 2);
+
+        assertEquals("TileXMax", 37, testSource.getTileXMax(1));
+        assertEquals("TileYMax", 19, testSource.getTileYMax(1));
+        assertEquals("TileXMax", 74, testSource.getTileXMax(2));
+        assertEquals("TileYMax", 37, testSource.getTileYMax(2));
+        assertEquals("TileXMax", 148, testSource.getTileXMax(3));
+        assertEquals("TileYMax", 74, testSource.getTileYMax(3));
+        assertEquals(
+                "http://mapy.geoportal.gov.pl/wss/service/WMTS/guest/wmts/TOPO?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=MAPA "
+                + "TOPOGRAFICZNA&STYLE=&FORMAT=image/jpeg&TileMatrixSet=EPSG:4326&TileMatrix=EPSG:4326:0&TileRow=1&TileCol=1",
+                testSource.getTileUrl(1,  1,  1));
+    }
+
+    @Test
+    public void testGeoportalORTOPL4326() throws IOException {
+        Main.setProjection(Projections.getProjectionByCode("EPSG:4326"));
+        WMTSTileSource testSource = new WMTSTileSource(testImageryORTO_PL);
+        verifyTile(new LatLon(53.5993712684958, 19.560669777688176), testSource, 12412, 3941, 14);
+
+        verifyTile(new LatLon(49.783096954497786, 22.79034127751704), testSource, 17714, 10206, 14);
+    }
+
+    @Test
+    public void testGeoportalORTOPL2180() throws IOException {
+        Main.setProjection(Projections.getProjectionByCode("EPSG:2180"));
+        WMTSTileSource testSource = new WMTSTileSource(testImageryORTO_PL);
+
+        verifyTile(new LatLon(53.59940948387726, 19.560544913270064), testSource, 6453, 3140, 14);
+        verifyTile(new LatLon(49.782984840526055, 22.790064966993445), testSource, 9932, 9305, 14);
+    }
+
+    private void verifyTile(LatLon expected, WMTSTileSource source, int x, int y, int z) {
+        LatLon ll = new LatLon(source.tileXYToLatLon(x, y, z));
+        assertEquals("Latitude", expected.lat(), ll.lat(), 1e-05);
+        assertEquals("Longitude", expected.lon(), ll.lon(), 1e-05);
+
+    }
+
+    private void verifyMercatorTile(WMTSTileSource testSource, int x, int y, int z) {
+        TemplatedTMSTileSource verifier = new TemplatedTMSTileSource(testImageryTMS);
+        LatLon result = new LatLon(testSource.tileXYToLatLon(x, y, z));
+        LatLon expected = new LatLon(verifier.tileXYToLatLon(x, y, z-1));
+        System.out.println(z + "/" + x + "/" + y + " - result: " + result.toDisplayString() + " osmMercator: " +  expected.toDisplayString());
+        assertEquals("Longitude" , expected.lon(), result.lon(), 1e-04);
+        assertEquals("Latitude", expected.lat(), result.lat(), 1e-04);
+        //assertTrue("result: " + result.toDisplayString() + " osmMercator: " +  expected.toDisplayString(), result.equalsEpsilon(expected));
+//        LatLon tileCenter = new Bounds(result, new LatLon(testSource.tileXYToLatLon(x+1, y+1, z))).getCenter();
+//        TileXY backwardsResult = testSource.latLonToTileXY(tileCenter.toCoordinate(), z);
+        //assertEquals(x, backwardsResult.getXIndex());
+        //assertEquals(y, backwardsResult.getYIndex());
+    }
+}
