mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-12-06 10:34:13 +00:00
regional sources for germany
This commit is contained in:
1 parent
12c4d3c594
commit
cc97f03e29
5 files changed
+152
-8
No files matched your search
@@ -61,12 +61,12 @@ describe('planTile', () => {
|
||||
|
||||
it('puts the countries of a border tile together, over the fallback where none is', async () => {
|
||||
const { tiles } = savedTiles();
|
||||
// Basel: France, Switzerland and Germany, which is not in the patchwork
|
||||
// Basel: France, Switzerland and Baden-Württemberg, which is not in the patchwork
|
||||
assert.deepEqual(await plan([13, 4268, 2861], tiles), {
|
||||
parts: ['CH:partial', 'FR:partial'],
|
||||
fallback: true,
|
||||
});
|
||||
// only Germany
|
||||
// only Baden-Württemberg
|
||||
assert.deepEqual(await plan([13, 4269, 2860], tiles), { parts: [], fallback: true });
|
||||
});
|
||||
|
||||
@@ -91,13 +91,27 @@ describe('planTile', () => {
|
||||
|
||||
it('takes a country from its agency next to one without open imagery', async () => {
|
||||
const { tiles } = savedTiles();
|
||||
// Padborg, with Germany to the south
|
||||
assert.deepEqual(await plan([13, 4309, 2597], tiles), {
|
||||
parts: ['DK:partial'],
|
||||
// Ulm, in Baden-Württemberg, and Neu-Ulm, in Bavaria
|
||||
assert.deepEqual(await plan(tile(9.99, 48.39, 13), tiles), {
|
||||
parts: ['DE-BY:partial'],
|
||||
fallback: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('takes the states of Germany from their own agencies', async () => {
|
||||
const { tiles } = savedTiles();
|
||||
// Neu-Ulm
|
||||
assert.deepEqual(await plan(tile(10.01, 48.38, 16), tiles), {
|
||||
parts: ['DE-BY:full'],
|
||||
fallback: false,
|
||||
});
|
||||
// Padborg, with Schleswig-Holstein to the south
|
||||
assert.deepEqual(await plan([13, 4309, 2597], tiles), {
|
||||
parts: ['DE-SH:partial', 'DK:partial'],
|
||||
fallback: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('leaves the islands of Portugal to the fallback', async () => {
|
||||
const { asked, tiles } = savedTiles();
|
||||
// Funchal, on Madeira
|
||||
|
||||
@@ -17,11 +17,16 @@ export const OPEN_SATELLITE_PROTOCOL = 'opensat';
|
||||
type TileUrl = (z: number, x: number, y: number) => string;
|
||||
|
||||
type ImagerySource = {
|
||||
/** ISO code of the country, in the tileset of the countries */
|
||||
/** ISO code of the country, or of its state, in the tileset of the countries */
|
||||
id: string;
|
||||
url: TileUrl;
|
||||
/** Above it, the tile of this zoom level is scaled up. */
|
||||
maxzoom: number;
|
||||
/**
|
||||
* Its server only answers pages on https: elsewhere, such as in the desktop app, the country
|
||||
* is left to the fallback.
|
||||
*/
|
||||
httpsOnly?: boolean;
|
||||
};
|
||||
|
||||
const xyz =
|
||||
@@ -145,6 +150,113 @@ const sources: ImagerySource[] = [
|
||||
),
|
||||
maxzoom: 20,
|
||||
},
|
||||
// Germany, by state: Baden-Württemberg is left to the fallback, its services often give blank
|
||||
// tiles
|
||||
{
|
||||
id: 'DE-BY',
|
||||
url: xyz('https://wmtsod1.bayernwolke.de/wmts/by_dop/smerc/{z}/{x}/{y}'),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-MV',
|
||||
// its tile matrices are numbered from zoom 5
|
||||
url: (z, x, y) =>
|
||||
`https://www.geodaten-mv.de/dienste/dop_wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=mv_dop&STYLE=default&FORMAT=image/png&TILEMATRIXSET=GoogleMapsCompatible&TILEMATRIX=${String(z - 5).padStart(2, '0')}&TILEROW=${y}&TILECOL=${x}`,
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-BB',
|
||||
url: wms(
|
||||
'https://isk.geobasis-bb.de/mapproxy/dop20c/service/wms?LAYERS=bebb_dop20c&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
// the service of Brandenburg, which has Berlin too
|
||||
id: 'DE-BE',
|
||||
url: wms(
|
||||
'https://isk.geobasis-bb.de/mapproxy/dop20c/service/wms?LAYERS=bebb_dop20c&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
// Bremen and Bremerhaven
|
||||
id: 'DE-HB',
|
||||
url: wms(
|
||||
'https://geodienste.bremen.de/wms_dop_lb?LAYERS=dop10_2025_HB,dop10_2025_BHV&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
// without its islands in the North Sea, as in the tileset of the countries
|
||||
id: 'DE-HH',
|
||||
url: wms(
|
||||
'https://geodienste.hamburg.de/wms_dop_zeitreihe_unbelaubt?LAYERS=dop_zeitreihe_unbelaubt&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-HE',
|
||||
url: wms(
|
||||
'https://www.gds-srv.hessen.de/cgi-bin/lika-services/ogc-free-images.ows?LAYERS=he_dop_rgb&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-NI',
|
||||
url: wms(
|
||||
'https://opendata.lgln.niedersachsen.de/doorman/noauth/dop_wms?LAYERS=ni_dop20&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-NW',
|
||||
url: wms('https://www.wms.nrw.de/geobasis/wms_nw_dop?LAYERS=nw_dop_rgb&FORMAT=image/jpeg'),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-RP',
|
||||
url: wms(
|
||||
'https://geo4.service24.rlp.de/wms/rp_dop20.fcgi?LAYERS=rp_dop20&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-SL',
|
||||
url: wms(
|
||||
'https://geoportal.saarland.de/freewms/truedop?LAYERS=sl_dop20_rgb&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-SN',
|
||||
url: wms(
|
||||
'https://geodienste.sachsen.de/wms_geosn_dop-rgb/guest?LAYERS=sn_dop_020&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-ST',
|
||||
url: wms(
|
||||
'https://www.geodatenportal.sachsen-anhalt.de/wss/service/ST_LVermGeo_DOP_WMS_OpenData/guest?LAYERS=lsa_lvermgeo_dop20_2&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
{
|
||||
id: 'DE-SH',
|
||||
url: wms(
|
||||
'https://dienste.gdi-sh.de/WMS_SH_DOP20col_OpenGBD?LAYERS=sh_dop20_rgb&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
httpsOnly: true,
|
||||
},
|
||||
{
|
||||
id: 'DE-TH',
|
||||
url: wms(
|
||||
'https://www.geoproxy.geoportal-th.de/geoproxy/services/DOP?LAYERS=th_dop&FORMAT=image/jpeg'
|
||||
),
|
||||
maxzoom: 19,
|
||||
},
|
||||
];
|
||||
|
||||
export const openSatelliteAttribution = [
|
||||
@@ -160,6 +272,21 @@ export const openSatelliteAttribution = [
|
||||
'<a href="https://www.dgterritorio.gov.pt/" target="_blank">DGT</a>',
|
||||
'GeoDanmark © <a href="https://klimadatastyrelsen.dk/" target="_blank">Klimadatastyrelsen</a>',
|
||||
'© <a href="https://www.linz.govt.nz/linz-copyright" target="_blank">LINZ CC BY 4.0</a> © <a href="https://www.linz.govt.nz/data/linz-data/linz-basemaps/data-attribution" target="_blank">Imagery Basemap contributors</a>',
|
||||
'© <a href="https://geodaten.bayern.de/" target="_blank">Bayerische Vermessungsverwaltung</a>',
|
||||
'© <a href="https://geobasis-bb.de/" target="_blank">GeoBasis-DE/LGB</a>',
|
||||
'© <a href="https://www.berlin.de/sen/sbw/stadtdaten/geoportal/" target="_blank">Geoportal Berlin</a>',
|
||||
'© <a href="https://www.geo.bremen.de/" target="_blank">Landesamt GeoInformation Bremen</a>',
|
||||
'© <a href="https://www.hamburg.de/" target="_blank">LGV Hamburg</a>',
|
||||
'© <a href="https://hvbg.hessen.de/" target="_blank">HVBG</a>',
|
||||
'© <a href="https://www.laiv-mv.de/" target="_blank">GeoBasis-DE/M-V</a>',
|
||||
'© <a href="https://www.lgln.niedersachsen.de/" target="_blank">LGLN</a>',
|
||||
'© <a href="https://www.bezreg-koeln.nrw.de/" target="_blank">Geobasis NRW</a>',
|
||||
'© <a href="https://lvermgeo.rlp.de/" target="_blank">GeoBasis-DE/LVermGeoRP</a>',
|
||||
'© <a href="https://geoportal.saarland.de/" target="_blank">LVGL Saarland</a>',
|
||||
'© <a href="https://www.geosn.sachsen.de/" target="_blank">GeoSN</a>',
|
||||
'© <a href="https://www.lvermgeo.sachsen-anhalt.de/" target="_blank">GeoBasis-DE/LVermGeo LSA</a>',
|
||||
'© <a href="https://www.schleswig-holstein.de/" target="_blank">GeoBasis-DE/LVermGeo SH</a>',
|
||||
'© <a href="https://geoportal.thueringen.de/" target="_blank">GDI-Th</a>',
|
||||
].join(', ');
|
||||
|
||||
// Countries, from the tileset of their polygons, built from the borders of OpenStreetMap
|
||||
@@ -168,7 +295,10 @@ const COUNTRIES_URL = xyz('https://tiles.gpx.studio/satellite-countries/{z}/{x}/
|
||||
/** The only zoom level of the tileset. */
|
||||
const COUNTRIES_ZOOM = 12;
|
||||
|
||||
const sourceByCountry = new Map(sources.map((source) => [source.id, source]));
|
||||
const onHttps = typeof location === 'undefined' || location.protocol === 'https:';
|
||||
const sourceByCountry = new Map(
|
||||
sources.filter((source) => onHttps || !source.httpsOnly).map((source) => [source.id, source])
|
||||
);
|
||||
|
||||
/** The tiles of the countries, from their tileset: null where there is none. */
|
||||
export type CountryTiles = (z: number, x: number, y: number) => Promise<ArrayBuffer | null>;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"zoom":10,"tiles":[316951,316952,316953,316954,316955,316956,316957,316958,317975,317976,317977,317978,317979,317980,317981,317982,318999,319000,319001,319002,319003,319004,319005,319006,319007,320023,320024,320025,320026,320027,320028,320029,320030,320031,321046,321047,321048,321049,321050,321051,321052,321053,321054,321055,322070,322071,322072,322073,322074,322075,322076,322077,322078,322079,323094,323095,323096,323097,323098,323099,323100,323101,323102,323103,323104,323105,324118,324119,324120,324121,324122,324123,324124,324125,324126,324127,325142,325143,325144,325145,325146,325147,325148,325149,325150,325151,325153,326166,326167,326168,326169,326170,326171,326172,326173,326174,326175,326176,326177,326178,326179,327190,327191,327192,327193,327194,327195,327196,327197,327198,327199,327200,327201,327202,327203,328214,328215,328216,328217,328218,328219,328220,328221,328222,328223,328224,328225,328226,328227,328228,329238,329239,329240,329241,329242,329243,329244,329245,329246,329247,329248,329249,329250,329251,329252,330262,330263,330264,330265,330266,330267,330268,330269,330270,330271,330272,330273,330274,330275,330281,330282,330283,331286,331287,331288,331289,331290,331291,331292,331293,331294,331295,331296,331297,331298,331299,331305,331306,331307,332310,332311,332312,332313,332314,332315,332316,332317,332318,332319,332320,332321,332322,332323,332328,332329,332330,332331,332332,332333,332334,332335,332336,332337,332338,332339,332340,332341,332342,332343,332344,332345,332346,332347,332348,332349,332350,332351,332352,332353,332354,332355,332356,333342,333343,333344,333345,333346,333352,333353,333354,333355,333356,333357,333358,333359,333360,333361,333362,333363,333364,333365,333366,333367,333368,333369,333370,333371,333372,333373,333374,333375,333376,333377,333378,333379,333380,334369,334370,334376,334377,334378,334379,334380,334381,334382,334383,334384,334385,334386,334387,334388,334389,334390,334391,334392,334393,334394,334395,334396,334397,334398,334399,334400,334401,334402,334403,334404,335400,335401,335402,335403,335404,335405,335406,335407,335408,335409,335410,335411,335412,335413,335414,335415,335416,335417,335418,335419,335420,335421,335422,335423,335424,335425,335426,335427,335428,336424,336425,336426,336427,336428,336429,336430,336431,336432,336433,336434,336435,336436,336437,336438,336439,336440,336441,336442,336443,336444,336445,336446,336447,336448,336449,336450,336451,336452,337448,337449,337450,337451,337452,337453,337454,337455,337456,337457,337458,337459,337460,337461,337462,337463,337464,337465,337466,337467,337468,337469,337470,337471,337472,337473,337474,337475,337476,338450,338472,338473,338474,338475,338476,338477,338478,338479,338480,338481,338482,338483,338484,338485,338486,338487,338488,338489,338490,338491,338492,338493,338494,338495,338496,338497,338498,338499,338500,339465,339466,339467,339468,339469,339470,339471,339472,339473,339474,339475,339476,339496,339497,339498,339499,339500,339501,339502,339503,339504,339505,339506,339507,339508,339509,339510,339511,339512,339513,339514,339515,339516,339517,339518,339519,339520,339521,339522,339523,339524,340489,340490,340491,340492,340493,340494,340495,340496,340497,340498,340499,340500,340520,340521,340522,340523,340524,340525,340526,340527,340528,340529,340530,340531,340532,340533,340534,340535,340536,340537,340538,340539,340540,340541,340542,340543,340544,340545,340546,340547,340548,341513,341514,341515,341516,341517,341518,341519,341520,341521,341522,341523,341524,341544,341545,341546,341547,341548,341549,341550,341551,341552,341553,341554,341555,341556,341557,341558,341559,341560,341561,341562,341563,341564,341565,341566,341567,341568,341569,341570,341571,341572,342537,342538,342539,342540,342541,342542,342543,342544,342545,342546,342547,342548,342568,342569,342570,342571,342572,342573,342574,342575,342576,342577,342578,342579,342580,342581,342582,342583,342584,342585,342586,342587,342588,342589,342590,342591,342592,342593,342594,342595,342596,343561,343562,343563,343564,343565,343566,343567,343568,343569,343570,343571,343572,343592,343593,343594,343595,343596,343597,343598,343599,343600,343601,343602,343603,343604,343605,343606,343607,343608,343609,343610,343611,343612,343613,343614,343615,343616,343617,343618,343619,343620,344585,344586,344587,344588,344589,344590,344591,344592,344593,344594,344595,344596,344616,344617,344618,344619,344620,344621,344622,344623,344624,344625,344626,344627,344628,344629,344630,344631,344632,344633,344634,344635,344636,344637,344638,344639,344640,344641,344642,344643,344644,345609,345610,345611,345612,345613,345614,345615,345616,345617,345618,345619,345620,345640,345641,345642,345643,345644,345645,345646,345647,345648,345649,345650,345651,345652,345653,345654,345655,345656,345657,345658,345659,345660,345661,345662,345663,345664,345665,345666,345667,345668,346633,346634,346635,346636,346637,346638,346639,346640,346641,346642,346643,346644,346664,346665,346666,346667,346668,346669,346670,346671,34Line truncated
|
||||
{"zoom":10,"tiles":[316951,316952,316953,316954,316955,316956,316957,316958,317975,317976,317977,317978,317979,317980,317981,317982,318999,319000,319001,319002,319003,319004,319005,319006,319007,320023,320024,320025,320026,320027,320028,320029,320030,320031,321046,321047,321048,321049,321050,321051,321052,321053,321054,321055,322070,322071,322072,322073,322074,322075,322076,322077,322078,322079,323094,323095,323096,323097,323098,323099,323100,323101,323102,323103,323104,323105,324118,324119,324120,324121,324122,324123,324124,324125,324126,324127,325142,325143,325144,325145,325146,325147,325148,325149,325150,325151,325153,326166,326167,326168,326169,326170,326171,326172,326173,326174,326175,326176,326177,326178,326179,327190,327191,327192,327193,327194,327195,327196,327197,327198,327199,327200,327201,327202,327203,328214,328215,328216,328217,328218,328219,328220,328221,328222,328223,328224,328225,328226,328227,328228,329238,329239,329240,329241,329242,329243,329244,329245,329246,329247,329248,329249,329250,329251,329252,330262,330263,330264,330265,330266,330267,330268,330269,330270,330271,330272,330273,330274,330275,330281,330282,330283,331286,331287,331288,331289,331290,331291,331292,331293,331294,331295,331296,331297,331298,331299,331305,331306,331307,332310,332311,332312,332313,332314,332315,332316,332317,332318,332319,332320,332321,332322,332323,332328,332329,332330,332331,332332,332333,332334,332335,332336,332337,332338,332339,332340,332341,332342,332343,332344,332345,332346,332347,332348,332349,332350,332351,332352,332353,332354,332355,332356,333335,333336,333337,333338,333339,333340,333341,333342,333343,333344,333345,333346,333349,333350,333351,333352,333353,333354,333355,333356,333357,333358,333359,333360,333361,333362,333363,333364,333365,333366,333367,333368,333369,333370,333371,333372,333373,333374,333375,333376,333377,333378,333379,333380,334359,334360,334361,334362,334363,334364,334365,334366,334367,334368,334369,334370,334371,334372,334373,334374,334375,334376,334377,334378,334379,334380,334381,334382,334383,334384,334385,334386,334387,334388,334389,334390,334391,334392,334393,334394,334395,334396,334397,334398,334399,334400,334401,334402,334403,334404,335382,335383,335384,335385,335386,335387,335388,335389,335390,335391,335392,335393,335394,335395,335396,335397,335398,335399,335400,335401,335402,335403,335404,335405,335406,335407,335408,335409,335410,335411,335412,335413,335414,335415,335416,335417,335418,335419,335420,335421,335422,335423,335424,335425,335426,335427,335428,336407,336408,336409,336410,336411,336412,336413,336414,336415,336416,336417,336418,336419,336420,336421,336422,336423,336424,336425,336426,336427,336428,336429,336430,336431,336432,336433,336434,336435,336436,336437,336438,336439,336440,336441,336442,336443,336444,336445,336446,336447,336448,336449,336450,336451,336452,337427,337428,337429,337430,337431,337432,337433,337434,337435,337436,337437,337438,337439,337440,337441,337442,337443,337444,337445,337446,337447,337448,337449,337450,337451,337452,337453,337454,337455,337456,337457,337458,337459,337460,337461,337462,337463,337464,337465,337466,337467,337468,337469,337470,337471,337472,337473,337474,337475,337476,338450,338451,338452,338453,338454,338455,338456,338457,338458,338459,338460,338461,338462,338463,338464,338465,338466,338467,338468,338469,338470,338471,338472,338473,338474,338475,338476,338477,338478,338479,338480,338481,338482,338483,338484,338485,338486,338487,338488,338489,338490,338491,338492,338493,338494,338495,338496,338497,338498,338499,338500,339465,339466,339467,339468,339469,339470,339471,339472,339473,339474,339475,339476,339477,339478,339479,339480,339481,339482,339483,339484,339485,339486,339487,339488,339489,339490,339491,339492,339493,339494,339495,339496,339497,339498,339499,339500,339501,339502,339503,339504,339505,339506,339507,339508,339509,339510,339511,339512,339513,339514,339515,339516,339517,339518,339519,339520,339521,339522,339523,339524,340489,340490,340491,340492,340493,340494,340495,340496,340497,340498,340499,340500,340501,340502,340503,340504,340505,340506,340507,340508,340509,340510,340511,340512,340513,340514,340515,340516,340517,340518,340519,340520,340521,340522,340523,340524,340525,340526,340527,340528,340529,340530,340531,340532,340533,340534,340535,340536,340537,340538,340539,340540,340541,340542,340543,340544,340545,340546,340547,340548,341513,341514,341515,341516,341517,341518,341519,341520,341521,341522,341523,341524,341525,341526,341527,341528,341529,341530,341531,341532,341533,341534,341535,341536,341537,341538,341539,341540,341541,341542,341543,341544,341545,341546,341547,341548,341549,341550,341551,341552,341553,341554,341555,341556,341557,341558,341559,341560,341561,341562,341563,341564,341565,341566,341567,341568,341569,341570,341571,341572,342537,342538,342539,342540,342541,342542,342543,342544,342545,342546,342547,342548,342549,342550,342551,342552,342553,342554,342555,342556,342557,342558,342559,342560,342561,34Line truncated
|
||||
Reference in new issue
Block a user