<commit_before>import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import WMTS from '../src/ol/source/WMTS.js';
import WMTSTileGrid from '../src/ol/tilegrid/WMTS.js';
import {get as getProjection} from '../src/ol/proj.js';
import {getTopLeft, getWidth} from '../src/ol/extent.js';

// create the WMTS tile grid in the google projection
const projection = getProjection('EPSG:3857');
const tileSizePixels = 256;
const tileSizeMtrs = getWidth(projection.getExtent()) / tileSizePixels;
const matrixIds = [];
const resolutions = [];
for (let i = 0; i <= 14; i++) {
  matrixIds[i] = i;
  resolutions[i] = tileSizeMtrs / Math.pow(2, i);
}
const tileGrid = new WMTSTileGrid({
  origin: getTopLeft(projection.getExtent()),
  resolutions: resolutions,
  matrixIds: matrixIds,
});

const scalgoToken = '<KEY>';

const wmtsSource = new WMTS({
  url: 'http://ts2.scalgo.com/olpatch/wmts?token=' + scalgoToken,
  layer: 'SRTM_4_1:SRTM_4_1_flooded_sealevels',
  format: 'image/png',
  matrixSet: 'EPSG:3857',
  attributions: [
    '<a href="http://scalgo.com">SCALGO</a>',
    '<a href="https://cgiarcsi.community/data/' +
      'srtm-90m-digital-elevation-database-v4-1">CGIAR-CSI SRTM</a>',
  ],
  tileGrid: tileGrid,
  style: 'default',
  dimensions: {
    'threshold': 100,
  },
});
<commit_msg>use https to avoid security warnings<commit_after>import Map from '../src/ol/Map.js';
import OSM from '../src/ol/source/OSM.js';
import TileLayer from '../src/ol/layer/Tile.js';
import View from '../src/ol/View.js';
import WMTS from '../src/ol/source/WMTS.js';
import WMTSTileGrid from '../src/ol/tilegrid/WMTS.js';
import {get as getProjection} from '../src/ol/proj.js';
import {getTopLeft, getWidth} from '../src/ol/extent.js';

// create the WMTS tile grid in the google projection
const projection = getProjection('EPSG:3857');
const tileSizePixels = 256;
const tileSizeMtrs = getWidth(projection.getExtent()) / tileSizePixels;
const matrixIds = [];
const resolutions = [];
for (let i = 0; i <= 14; i++) {
  matrixIds[i] = i;
  resolutions[i] = tileSizeMtrs / Math.pow(2, i);
}
const tileGrid = new WMTSTileGrid({
  origin: getTopLeft(projection.getExtent()),
  resolutions: resolutions,
  matrixIds: matrixIds,
});

const scalgoToken = '<KEY>';

const wmtsSource = new WMTS({
  url: 'https://ts2.scalgo.com/olpatch/wmts?token=' + scalgoToken,
  layer: 'SRTM_4_1:SRTM_4_1_flooded_sealevels',
  format: 'image/png',
  matrixSet: 'EPSG:3857',
  attributions: [
    '<a href="https://scalgo.com" target="_blank">SCALGO</a>',
    '<a href="https://cgiarcsi.community/data/' +
      'srtm-90m-digital-elevation-database-v4-1"' +
      ' target="_blank">CGIAR-CSI SRTM</a>',
  ],
  tileGrid: tileGrid,
  style: 'default',
  dimensions: {
    'threshold': 100,
  },
});

{'fraction_non_alphanumeric': 0.17969295184926729, 'fraction_numerical': 0.01884159106769016, 'mean_word_length': 4.119642857142857, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3682819', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1083, 'n_words': 229}