mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Merge branch 'release-candidate' into v2
This commit is contained in:
commit
fb96926d1e
14
backend/vcpkg-configuration.json
Normal file
14
backend/vcpkg-configuration.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"default-registry": {
|
||||
"kind": "git",
|
||||
"baseline": "7f9f0e44db287e8e67c0e888141bfa200ab45121",
|
||||
"repository": "https://github.com/microsoft/vcpkg"
|
||||
},
|
||||
"registries": [
|
||||
{
|
||||
"kind": "artifact",
|
||||
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
|
||||
"name": "microsoft"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||
"dependencies": [
|
||||
"cpprestsdk",
|
||||
"geographiclib"
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -162,25 +162,9 @@ export const mapBounds = {
|
||||
"Kola": { bounds: new LatLngBounds([61.59999, 4.29982], [75.05179, 44.29982]), zoom: 3}
|
||||
}
|
||||
|
||||
export const mapMirrors = {
|
||||
"DCS Map mirror 1": "https://maps.dcsolympus.com/maps",
|
||||
"DCS Map mirror 2": "https://refugees.dcsolympus.com/maps"
|
||||
}
|
||||
export const defaultMapMirrors = {}
|
||||
|
||||
export const defaultMapLayers = {
|
||||
"ArcGIS Satellite": {
|
||||
urlTemplate: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
||||
minZoom: 1,
|
||||
maxZoom: 19,
|
||||
attribution: "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Mapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"
|
||||
},
|
||||
"OpenStreetMap Mapnik": {
|
||||
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
minZoom: 1,
|
||||
maxZoom: 20,
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}
|
||||
}
|
||||
export const defaultMapLayers = {}
|
||||
|
||||
/* Map constants */
|
||||
export const IDLE = "Idle";
|
||||
|
||||
@ -12,7 +12,7 @@ import { DestinationPreviewMarker } from "./markers/destinationpreviewmarker";
|
||||
import { TemporaryUnitMarker } from "./markers/temporaryunitmarker";
|
||||
import { ClickableMiniMap } from "./clickableminimap";
|
||||
import { SVGInjector } from '@tanem/svg-injector'
|
||||
import { defaultMapLayers, mapBounds, minimapBoundaries, IDLE, COALITIONAREA_DRAW_POLYGON, MOVE_UNIT, SHOW_UNIT_CONTACTS, HIDE_GROUP_MEMBERS, SHOW_UNIT_PATHS, SHOW_UNIT_TARGETS, SHOW_UNIT_LABELS, SHOW_UNITS_ENGAGEMENT_RINGS, SHOW_UNITS_ACQUISITION_RINGS, HIDE_UNITS_SHORT_RANGE_RINGS, FILL_SELECTED_RING, MAP_MARKER_CONTROLS, DCS_LINK_PORT, DCS_LINK_RATIO, mapMirrors } from "../constants/constants";
|
||||
import { defaultMapLayers, mapBounds, minimapBoundaries, IDLE, COALITIONAREA_DRAW_POLYGON, MOVE_UNIT, SHOW_UNIT_CONTACTS, HIDE_GROUP_MEMBERS, SHOW_UNIT_PATHS, SHOW_UNIT_TARGETS, SHOW_UNIT_LABELS, SHOW_UNITS_ENGAGEMENT_RINGS, SHOW_UNITS_ACQUISITION_RINGS, HIDE_UNITS_SHORT_RANGE_RINGS, FILL_SELECTED_RING, MAP_MARKER_CONTROLS, DCS_LINK_PORT, DCS_LINK_RATIO, defaultMapMirrors } from "../constants/constants";
|
||||
import { CoalitionArea } from "./coalitionarea/coalitionarea";
|
||||
import { CoalitionAreaContextMenu } from "../contextmenus/coalitionareacontextmenu";
|
||||
import { DrawingCursor } from "./coalitionarea/drawingcursor";
|
||||
@ -97,6 +97,7 @@ export class Map extends L.Map {
|
||||
|
||||
#mapSourceDropdown: Dropdown;
|
||||
#mapLayers: any = defaultMapLayers;
|
||||
#mapMirrors: any = defaultMapMirrors;
|
||||
#mapMarkerVisibilityControls: MapMarkerVisibilityControl[] = MAP_MARKER_CONTROLS;
|
||||
#mapVisibilityOptionsDropdown: Dropdown;
|
||||
#optionButtons: { [key: string]: HTMLButtonElement[] } = {}
|
||||
@ -131,10 +132,8 @@ export class Map extends L.Map {
|
||||
|
||||
this.#ID = ID;
|
||||
|
||||
this.setLayer("DCS Map mirror 1");
|
||||
|
||||
/* Minimap */
|
||||
var minimapLayer = new L.TileLayer(this.#mapLayers[Object.keys(this.#mapLayers)[0]].urlTemplate, { minZoom: 0, maxZoom: 13 });
|
||||
var minimapLayer = new L.TileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", { minZoom: 0, maxZoom: 13 });
|
||||
this.#miniMapLayerGroup = new L.LayerGroup([minimapLayer]);
|
||||
this.#miniMapPolyline = new L.Polyline([], { color: '#202831' });
|
||||
this.#miniMapPolyline.addTo(this.#miniMapLayerGroup);
|
||||
@ -226,13 +225,40 @@ export class Map extends L.Map {
|
||||
|
||||
document.addEventListener("configLoaded", () => {
|
||||
let config = getApp().getConfig();
|
||||
if (config.additionalMaps) {
|
||||
let additionalMaps = config.additionalMaps;
|
||||
let layerSet = false;
|
||||
|
||||
/* First load the map mirrors */
|
||||
if (config.mapMirrors) {
|
||||
let mapMirrors = config.mapMirrors;
|
||||
this.#mapMirrors = {
|
||||
...this.#mapMirrors,
|
||||
...mapMirrors
|
||||
}
|
||||
this.setLayer(Object.keys(mapMirrors)[0]);
|
||||
}
|
||||
|
||||
/* Set the options, and if at least one mirror is available, select the first */
|
||||
this.#mapSourceDropdown.setOptions(Object.keys(this.#mapMirrors), null);
|
||||
if (Object.keys(this.#mapMirrors).length > 0) {
|
||||
this.#mapSourceDropdown.selectValue(0);
|
||||
this.setLayer(Object.keys(this.#mapMirrors)[0]);
|
||||
layerSet = true; // Needed because this is async
|
||||
}
|
||||
|
||||
/* Then load the map layers */
|
||||
if (config.mapLayers) {
|
||||
let mapLayers = config.mapLayers;
|
||||
this.#mapLayers = {
|
||||
...this.#mapLayers,
|
||||
...additionalMaps
|
||||
...mapLayers
|
||||
}
|
||||
this.#mapSourceDropdown.setOptions(this.getLayers(), null);
|
||||
}
|
||||
|
||||
/* Append this options, and if no mirror was selected, select the first on (if available). Mirrors have the precedence */
|
||||
this.#mapSourceDropdown.setOptions(Object.keys(this.#mapMirrors).concat(Object.keys(this.#mapLayers)), null);
|
||||
if (!layerSet && Object.keys(this.#mapLayers).length > 0) {
|
||||
this.#mapSourceDropdown.selectValue(0);
|
||||
this.setLayer(Object.keys(this.#mapLayers)[0]);
|
||||
}
|
||||
})
|
||||
|
||||
@ -295,8 +321,8 @@ export class Map extends L.Map {
|
||||
}
|
||||
|
||||
setLayer(layerName: string) {
|
||||
if (this.#layer != null)
|
||||
this.removeLayer(this.#layer)
|
||||
if (this.#layer)
|
||||
this.removeLayer(this.#layer);
|
||||
|
||||
let theatre = getApp().getMissionManager()?.getTheatre() ?? "Nevada";
|
||||
|
||||
@ -308,16 +334,17 @@ export class Map extends L.Map {
|
||||
return new L.TileLayer(layer.urlTemplate.replace("{theatre}", theatre.toLowerCase()), layer);
|
||||
})
|
||||
this.#layer = new L.LayerGroup(layers);
|
||||
this.#layer?.addTo(this);
|
||||
} else {
|
||||
this.#layer = new L.TileLayer(layerData.urlTemplate, layerData);
|
||||
this.#layer?.addTo(this);
|
||||
}
|
||||
/* DCS core layers are handled here */
|
||||
} else if (["DCS Map mirror 1", "DCS Map mirror 2"].includes(layerName) ) {
|
||||
let layerData = this.#mapLayers["ArcGIS Satellite"];
|
||||
let layers = [new L.TileLayer(layerData.urlTemplate, layerData)];
|
||||
/* mirrored layers are handled here */
|
||||
} else if (Object.keys(this.#mapMirrors).includes(layerName) ) {
|
||||
let layers: L.TileLayer[] = [];
|
||||
|
||||
/* Load the configuration file */
|
||||
const mirror = mapMirrors[layerName as keyof typeof mapMirrors];
|
||||
const mirror = this.#mapMirrors[layerName as any];
|
||||
const request = new Request(mirror + "/config.json");
|
||||
fetch(request).then((response) => {
|
||||
if (response.status === 200) {
|
||||
@ -343,9 +370,7 @@ export class Map extends L.Map {
|
||||
}
|
||||
|
||||
getLayers() {
|
||||
let layers = ["DCS Map mirror 1", "DCS Map mirror 2"];
|
||||
layers.push(...Object.keys(this.#mapLayers));
|
||||
return layers;
|
||||
return Object.keys(this.#mapLayers);
|
||||
}
|
||||
|
||||
/* State machine */
|
||||
|
||||
69
olympus.json
69
olympus.json
@ -1,37 +1,36 @@
|
||||
{
|
||||
"backend": {
|
||||
"address": "localhost",
|
||||
"port": 4512
|
||||
},
|
||||
"authentication": {
|
||||
"gameMasterPassword": "4b8823ed9e5c2392ab4a791913bb8ce41956ea32e308b760eefb97536746dd33",
|
||||
"blueCommanderPassword": "b0ea4230c1558c5313165eda1bdb7fced008ca7f2ca6b823fb4d26292f309098",
|
||||
"redCommanderPassword": "302bcbaf2a3fdcf175b689bf102d6cdf9328f68a13d4096101bba806482bfed9"
|
||||
},
|
||||
"frontend": {
|
||||
"port": 3000,
|
||||
"elevationProvider": {
|
||||
"provider": "https://srtm.fasma.org/{lat}{lng}.SRTMGL3S.hgt.zip",
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"additionalMaps": {
|
||||
"TestMap": [
|
||||
{
|
||||
"urlTemplate": "http://localhost:3000/maps/TestMap/{z}/{x}/{y}.png",
|
||||
"minNativeZoom": 1,
|
||||
"maxNativeZoom": 13,
|
||||
"minZoom": 1,
|
||||
"maxZoom": 20
|
||||
},
|
||||
{
|
||||
"urlTemplate": "http://localhost:3000/maps/TestMap/{z}/{x}/{y}.png",
|
||||
"minNativeZoom": 14,
|
||||
"maxNativeZoom": 17,
|
||||
"minZoom": 14,
|
||||
"maxZoom": 20
|
||||
}
|
||||
]
|
||||
"backend": {
|
||||
"address": "localhost",
|
||||
"port": 4512
|
||||
},
|
||||
"authentication": {
|
||||
"gameMasterPassword": "4b8823ed9e5c2392ab4a791913bb8ce41956ea32e308b760eefb97536746dd33",
|
||||
"blueCommanderPassword": "b0ea4230c1558c5313165eda1bdb7fced008ca7f2ca6b823fb4d26292f309098",
|
||||
"redCommanderPassword": "302bcbaf2a3fdcf175b689bf102d6cdf9328f68a13d4096101bba806482bfed9"
|
||||
},
|
||||
"frontend": {
|
||||
"port": 3000,
|
||||
"elevationProvider": {
|
||||
"provider": "https://srtm.fasma.org/{lat}{lng}.SRTMGL3S.hgt.zip",
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"mapLayers": {
|
||||
"ArcGIS Satellite": {
|
||||
"urlTemplate": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
||||
"minZoom": 1,
|
||||
"maxZoom": 19,
|
||||
"attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Mapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"
|
||||
},
|
||||
"OpenStreetMap Mapnik": {
|
||||
"urlTemplate": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
"minZoom": 1,
|
||||
"maxZoom": 20,
|
||||
"attribution": "OpenStreetMap contributors"
|
||||
}
|
||||
},
|
||||
"mapMirrors": {
|
||||
"DCS Map (Refugees)": "https://refugees.dcsolympus.com/maps"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
"request": "launch",
|
||||
"program": "main.py",
|
||||
"console": "integratedTerminal",
|
||||
"args": ["./configs/PersianGulf/LowResolution.yml"],
|
||||
"args": ["./configs/PersianGulf/HighResolution.yaml"],
|
||||
"justMyCode": false
|
||||
}
|
||||
]
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"output_directory": "",
|
||||
"boundary_file": "./configs/persiangulf/boundary.kml",
|
||||
"zoom_factor": 0.7,
|
||||
"geo_width": 28.41
|
||||
}
|
||||
@ -53,15 +53,6 @@
|
||||
<snippet></snippet>
|
||||
<styleUrl>#msn_ylw-pushpin</styleUrl>
|
||||
<MultiGeometry>
|
||||
<Polygon>
|
||||
<tessellate>1</tessellate>
|
||||
<outerBoundaryIs>
|
||||
<LinearRing>
|
||||
<coordinates>
|
||||
</coordinates>
|
||||
</LinearRing>
|
||||
</outerBoundaryIs>
|
||||
</Polygon>
|
||||
<Polygon>
|
||||
<tessellate>1</tessellate>
|
||||
<outerBoundaryIs>
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"output_directory": "",
|
||||
"boundary_file": "./configs/persiangulf/highresolution.kml",
|
||||
"zoom_factor": 0.05,
|
||||
"geo_width": 1.58
|
||||
}
|
||||
@ -67,7 +67,7 @@
|
||||
<outerBoundaryIs>
|
||||
<LinearRing>
|
||||
<coordinates>
|
||||
51.14046495023259,27.97889498770899,0 51.55353431602219,27.67956231061547,0 52.12271273396132,27.54826968043618,0 52.48447085880215,27.15028440327163,0 52.71652672529243,26.89796512728381,0 53.12879512517743,26.68884941551969,0 53.37494568115115,26.5977988632661,0 53.85049019818978,26.37821106429506,0 54.24913361183636,26.2053559430932,0 54.56854641473323,26.21332231673139,0 54.82768581802085,26.32919602607321,0 55.26888050312395,26.35051081890743,0 55.80446334594801,26.35993721084362,0 56.33380786281894,26.5498201192042,0 56.48285365981736,26.61233639892026,0 56.85082806071058,26.64037142673503,0 57.17766178622572,26.66708862056534,0 57.42202625116622,26.76530994984642,0 57.42175200084923,26.78958275893595,0 57.75837609087983,27.17977467837602,0 57.98784159241647,27.5334767068154,0 58.31521962733038,27.92355619049269,0 58.83857811895194,28.42393873318583,0 58.78447751679316,28.95258319892324,0 58.49070365518425,29.75951677966167,0 57.99170980487579,30.41145443251768,0 57.29164084080367,30.56113335218462,0 56.10644792829299,30.49255474654641,0 55.38335050943599,30.2731014182876,0 54.55839222246502,30.0276205049906,0 54.29088397184947,30.12575153512911,0 53.74252371846605,30.60355068007007,0 53.08678998572581,30.81341623660898,0 51.84822979140608,30.81042419874112,0 51.30852498191112,30.52135036711869,0 50.9672043555116,30.24638484712573,0 50.64551787356796,29.52167314809455,0 50.75992419424781,28.81470435016178,0 50.98064068401045,28.23929040762457,0 51.14046495023259,27.97889498770899,0
|
||||
51.14046495023259,27.97889498770899,0 51.55353431602219,27.67956231061547,0 52.12271273396132,27.54826968043618,0 52.48447085880215,27.15028440327163,0 52.71652672529243,26.89796512728381,0 53.12879512517743,26.68884941551969,0 53.37494568115115,26.5977988632661,0 53.85049019818978,26.37821106429506,0 54.23787811313886,26.20691208719306,0 54.33271805762165,26.0894844559901,0 54.40557401608805,25.91106820893015,0 54.33693214503367,25.74559565245724,0 54.23722266288519,25.51002642472132,0 54.133241595249,25.37249411865993,0 54.09333359394986,25.2354518837233,0 54.11060811406112,25.13091928808479,0 54.22025593909834,25.06952867065685,0 54.40933693241553,25.17621859544131,0 54.58297467164004,25.507311025299,0 54.68743041455483,25.71261041853808,0 54.74910078286771,25.76911690580135,0 54.96274716677529,25.7421903717473,0 55.12301264507939,25.73073217164497,0 55.29063894539164,26.03174623372222,0 55.46414964975805,26.27240878545209,0 55.80446334594801,26.35993721084362,0 56.33380786281894,26.5498201192042,0 56.48285365981736,26.61233639892026,0 56.85082806071058,26.64037142673503,0 57.17766178622572,26.66708862056534,0 57.42202625116622,26.76530994984642,0 57.42175200084923,26.78958275893595,0 57.75837609087983,27.17977467837602,0 57.98784159241647,27.5334767068154,0 58.31521962733038,27.92355619049269,0 58.83857811895194,28.42393873318583,0 58.78447751679316,28.95258319892324,0 58.49070365518425,29.75951677966167,0 57.99170980487579,30.41145443251768,0 57.29164084080367,30.56113335218462,0 56.10644792829298,30.49255474654641,0 55.38335050943599,30.2731014182876,0 54.55839222246502,30.0276205049906,0 54.29088397184947,30.12575153512911,0 53.74252371846605,30.60355068007007,0 53.08678998572581,30.81341623660898,0 51.84822979140607,30.81042419874112,0 51.30852498191112,30.52135036711869,0 50.9672043555116,30.24638484712573,0 50.64551787356796,29.52167314809455,0 50.75992419424781,28.81470435016178,0 50.98064068401045,28.23929040762457,0 51.14046495023259,27.97889498770899,0
|
||||
</coordinates>
|
||||
</LinearRing>
|
||||
</outerBoundaryIs>
|
||||
@ -77,7 +77,7 @@
|
||||
<outerBoundaryIs>
|
||||
<LinearRing>
|
||||
<coordinates>
|
||||
53.8057811140837,23.55343439271727,0 54.16707732813894,23.63808676113464,0 54.32388774939614,23.86831181190716,0 54.70433991212435,24.06583238614991,0 55.04071193190381,24.08042313106568,0 55.62781213084946,24.05033960593778,0 55.89529470815445,23.78838696666025,0 56.88328612540428,23.71028293860385,0 57.39481730973479,23.74600242634563,0 57.61434197291053,23.86694222294323,0 57.56547100618887,23.98139643984701,0 57.25341033092799,24.14863903206592,0 57.0365711559341,24.31565932430973,0 56.79994205785796,24.6015396181255,0 56.62766466732369,24.93649209953436,0 56.57041711858137,25.15316604643681,0 56.5185519543729,25.39716505483441,0 56.59137067490876,25.75737337713514,0 56.66027045252924,26.27258369322207,0 56.54053906478659,26.45648304963149,0 56.34416424485094,26.42690029654913,0 56.13573995451507,26.25278325965957,0 55.99515194635932,26.06997020663153,0 55.79162779799368,25.84948461029359,0 55.78570489080146,25.84393126096045,0 55.52407201918845,25.65401646642523,0 55.32826077660956,25.50864178818507,0 55.04320231122364,25.31752352820883,0 54.67689634665136,25.01468736122063,0 54.50082644321805,24.8301383376733,0 54.14867248036185,24.63997143899151,0 53.61846063593983,24.43120259451614,0 53.45803049651203,24.28824233227118,0 53.38463578170503,24.00792002524971,0 53.36517219287005,23.70109887908254,0 53.5687558226762,23.52168454477098,0 53.8057811140837,23.55343439271727,0
|
||||
53.8057811140837,23.55343439271727,0 54.16707732813894,23.63808676113464,0 54.32388774939614,23.86831181190716,0 54.70433991212435,24.06583238614991,0 55.04071193190381,24.08042313106568,0 55.62781213084946,24.05033960593778,0 55.89529470815445,23.78838696666025,0 56.88328612540428,23.71028293860385,0 57.39481730973479,23.74600242634563,0 57.61434197291053,23.86694222294323,0 57.56547100618887,23.98139643984701,0 57.25341033092799,24.14863903206592,0 57.0365711559341,24.31565932430973,0 56.79994205785796,24.6015396181255,0 56.62766466732369,24.93649209953436,0 56.57041711858136,25.15316604643681,0 56.5185519543729,25.39716505483441,0 56.59137067490876,25.75737337713514,0 56.66027045252924,26.27258369322207,0 56.54053906478659,26.45648304963149,0 56.34416424485094,26.42690029654913,0 56.13573995451507,26.25278325965957,0 55.99515194635932,26.06997020663153,0 55.79162779799368,25.84948461029359,0 55.78570489080146,25.84393126096045,0 55.52407201918845,25.65401646642523,0 55.32826077660956,25.50864178818507,0 55.04320231122364,25.31752352820883,0 54.67689634665136,25.01468736122063,0 54.50082644321806,24.8301383376733,0 54.14867248036185,24.63997143899151,0 53.61846063593983,24.43120259451614,0 53.45803049651203,24.28824233227118,0 53.38463578170503,24.00792002524971,0 53.36517219287005,23.70109887908254,0 53.5687558226762,23.52168454477098,0 53.8057811140837,23.55343439271727,0
|
||||
</coordinates>
|
||||
</LinearRing>
|
||||
</outerBoundaryIs>
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"output_directory": "",
|
||||
"boundary_file": "./configs/persiangulf/lowresolution.kml",
|
||||
"zoom_factor": 0.4,
|
||||
"geo_width": 10.36
|
||||
}
|
||||
@ -20,8 +20,6 @@
|
||||
</Icon>
|
||||
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
|
||||
</IconStyle>
|
||||
<BalloonStyle>
|
||||
</BalloonStyle>
|
||||
<LineStyle>
|
||||
<width>2</width>
|
||||
</LineStyle>
|
||||
@ -37,8 +35,6 @@
|
||||
</Icon>
|
||||
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
|
||||
</IconStyle>
|
||||
<BalloonStyle>
|
||||
</BalloonStyle>
|
||||
<LineStyle>
|
||||
<width>2</width>
|
||||
</LineStyle>
|
||||
@ -56,7 +52,7 @@
|
||||
<outerBoundaryIs>
|
||||
<LinearRing>
|
||||
<coordinates>
|
||||
57.08662779551599,26.74222906685435,0 57.28481314894174,26.92299531371801,0 57.43069847386101,27.36015969177391,0 57.88416978274709,27.70555118616166,0 58.0042057443256,28.06666067600623,0 58.43292295766628,28.37877628698436,0 58.66282280324379,28.68761778545839,0 58.67265568373656,28.92845530236555,0 58.32264458411767,29.18501795573206,0 57.98470293895333,29.86973097050743,0 57.81246904926375,30.16290929906387,0 57.63210868041936,30.32649860254734,0 57.23148364578026,30.39033962486325,0 56.99269438672574,30.32922035173133,0 56.39192637435963,30.35829104571983,0 56.21051082483839,30.3913352005532,0 55.93241575671919,30.31673191396352,0 55.68692282491359,30.14593706366064,0 55.50459474810871,29.91376573153317,0 55.38019392283345,29.61325410376284,0 55.62005736468103,29.15281106584349,0 56.26879586031595,28.8873941945573,0 57.01315325085545,28.90188175533714,0 57.18746321156831,28.90981543949903,0 57.23393884601242,28.81968481562826,0 57.22931835415146,28.68863337491101,0 57.18006983441847,28.53458994708109,0 56.89259029574667,28.45164339743952,0 56.41096867944319,28.4230005305205,0 55.90896231070198,28.41463832144504,0 55.28995290351293,28.53854833393688,0 54.6907299362248,28.72036699217543,0 54.67759239657464,28.72006222261758,0 54.35213032846881,28.87295068450273,0 54.13380040639876,29.12847293545733,0 54.01771821843089,29.41175967020398,0 53.87960509127,29.63098973060083,0 53.46622012570221,29.8458340763824,0 53.36109748164392,30.07183069504149,0 53.31634843403909,30.2548008275813,0 53.37011919844125,30.39912958404357,0 53.34015595981462,30.50567519256808,0 53.33656590992216,30.50854090486732,0 52.97422597492253,30.63447613396465,0 52.64378324402295,30.69608964333785,0 52.38582508941005,30.69919222467069,0 51.93424163263478,30.63846078568024,0 51.64062563240322,30.62844974333259,0 51.56656809476638,30.60062987500587,0 51.52564949043939,30.51286263282904,0 51.42556555347527,30.2144551039222,0 51.45882264399518,30.09553531390153,0 51.4758758195529,29.80991502645059,0 51.45984842331793,29.60446451016335,0 51.37900690021137,29.53150534917414,0 51.20465159130943,29.43729914664441,0 50.89485214911348,29.44632210856937,0 50.84038777070577,29.30196126632671,0 50.93393600308552,29.21179017493654,0 51.03021815054434,29.07955934047702,0 50.99490623667714,28.95069318875168,0 50.95954820695037,28.82178720245981,0 50.9670611656345,28.66361249523314,0 50.9629723079531,28.5505677422788,0 50.98774261818584,28.48858338332086,0 51.11189158604945,28.58426578139435,0 51.1245348620256,28.7468382502921,0 51.146455549895,28.89233446085181,0 51.1555812701137,28.93508468041331,0 51.35975413307138,29.22774728682657,0 51.5246768367475,29.33121410984396,0 51.69643923569528,29.25902447100221,0 51.78556622089516,29.07766185644572,0 51.81585422025375,28.91075007631442,0 51.91322911022416,28.76838947794742,0 52.02084512456936,28.61038408598138,0 52.15446485839271,28.55968484296986,0 52.2493864131826,28.57821243633977,0 52.26512020082876,28.58243529410801,0 52.56928858850304,28.64543240915901,0 52.77130207998004,28.40228990565214,0 52.83953905561756,28.25637619409016,0 52.93946331556578,28.07142663504239,0 53.38183856470001,27.68580376993239,0 53.56292329759665,27.61174818318469,0 53.96866424078468,27.48696891702861,0 54.0408659625077,27.48199496121401,0 54.4591265736723,27.48166977000004,0 54.80500284085096,27.45348888663242,0 54.78140827645719,27.35405703505121,0 54.39285553396017,27.26087435762969,0 54.28295623960408,27.1925109459028,0 54.20510649314404,27.09826061501207,0 54.13987717421119,26.97384503596154,0 54.32854435416762,26.79853150880392,0 54.57260128570974,26.64243597383059,0 54.57724414808476,26.5844951870384,0 54.5913719314249,26.49401853840836,0 54.82139336816309,26.39374916320339,0 55.20087461601976,26.55581734485082,0 55.30074860500482,26.45546411192498,0 55.45276228217399,26.45116133996013,0 55.85249765360211,26.50043298708444,0 56.09139682670517,26.58388373526835,0 56.31288067485976,26.71204774158111,0 56.48193094296525,26.74420973333427,0 56.57020344734467,26.79057908643139,0 57.08662779551599,26.74222906685435,0
|
||||
57.08662779551599,26.74222906685435,0 57.28481314894174,26.92299531371801,0 57.43069847386101,27.36015969177391,0 57.88416978274709,27.70555118616166,0 58.00420574432561,28.06666067600623,0 58.43292295766628,28.37877628698436,0 58.66282280324379,28.68761778545839,0 58.67265568373656,28.92845530236555,0 58.32264458411767,29.18501795573206,0 57.98470293895333,29.86973097050743,0 57.81246904926375,30.16290929906387,0 57.63210868041936,30.32649860254734,0 57.23148364578026,30.39033962486325,0 56.98956095082467,30.35375793652755,0 56.39192637435963,30.35829104571983,0 56.21051082483839,30.3913352005532,0 55.93241575671919,30.31673191396352,0 55.68692282491359,30.14593706366064,0 55.50459474810871,29.91376573153318,0 55.38019392283345,29.61325410376284,0 55.62005736468103,29.15281106584349,0 56.26879586031595,28.8873941945573,0 57.01315325085545,28.90188175533714,0 57.18746321156831,28.90981543949903,0 57.23393884601242,28.81968481562826,0 57.22931835415146,28.68863337491101,0 57.18006983441847,28.53458994708109,0 56.89259029574667,28.45164339743952,0 56.41096867944319,28.4230005305205,0 55.90896231070198,28.41463832144504,0 55.28995290351293,28.53854833393688,0 54.6907299362248,28.72036699217543,0 54.67759239657464,28.72006222261758,0 54.35213032846881,28.87295068450273,0 54.13380040639876,29.12847293545733,0 54.0177182184309,29.41175967020398,0 53.87960509127,29.63098973060083,0 53.4662201257022,29.8458340763824,0 53.36109748164392,30.07183069504149,0 53.31634843403909,30.2548008275813,0 53.37011919844125,30.39912958404357,0 53.34015595981462,30.50567519256808,0 53.33656590992216,30.50854090486732,0 52.97422597492253,30.63447613396465,0 52.64378324402295,30.69608964333785,0 52.38582508941004,30.69919222467069,0 51.93424163263478,30.63846078568024,0 51.64062563240322,30.62844974333259,0 51.56656809476638,30.60062987500587,0 51.52564949043939,30.51286263282904,0 51.42556555347527,30.2144551039222,0 51.45882264399518,30.09553531390153,0 51.4758758195529,29.80991502645059,0 51.45984842331793,29.60446451016335,0 51.37900690021137,29.53150534917414,0 51.20465159130943,29.43729914664441,0 50.89485214911349,29.44632210856937,0 50.84038777070577,29.30196126632671,0 50.93393600308552,29.21179017493654,0 51.03021815054434,29.07955934047702,0 50.99490623667714,28.95069318875168,0 50.95954820695037,28.82178720245981,0 50.9670611656345,28.66361249523314,0 50.9629723079531,28.5505677422788,0 50.98774261818584,28.48858338332086,0 51.11189158604945,28.58426578139435,0 51.1245348620256,28.7468382502921,0 51.146455549895,28.89233446085181,0 51.1555812701137,28.93508468041331,0 51.35975413307137,29.22774728682657,0 51.5246768367475,29.33121410984396,0 51.69643923569528,29.25902447100221,0 51.78556622089516,29.07766185644572,0 51.81585422025375,28.91075007631442,0 51.91322911022416,28.76838947794742,0 52.02084512456936,28.61038408598138,0 52.15446485839271,28.55968484296987,0 52.2493864131826,28.57821243633977,0 52.26512020082876,28.58243529410801,0 52.56928858850304,28.64543240915901,0 52.77130207998004,28.40228990565214,0 52.83953905561756,28.25637619409016,0 52.93946331556578,28.07142663504239,0 53.38183856470001,27.68580376993239,0 53.56292329759665,27.61174818318469,0 53.96866424078468,27.48696891702861,0 54.0408659625077,27.48199496121401,0 54.4591265736723,27.48166977000004,0 54.80500284085096,27.45348888663242,0 54.78140827645719,27.35405703505121,0 54.39285553396017,27.26087435762969,0 54.28295623960409,27.1925109459028,0 54.20510649314404,27.09826061501207,0 54.13987717421119,26.97384503596154,0 54.32854435416762,26.79853150880392,0 54.57260128570974,26.64243597383059,0 54.57724414808476,26.5844951870384,0 54.5913719314249,26.49401853840836,0 54.82139336816309,26.39374916320339,0 55.20087461601976,26.55581734485082,0 55.30074860500482,26.45546411192498,0 55.45276228217399,26.45116133996013,0 55.85249765360211,26.50043298708444,0 56.09139682670517,26.58388373526835,0 56.31288067485976,26.71204774158111,0 56.48193094296525,26.74420973333427,0 56.57020344734467,26.79057908643139,0 57.08662779551599,26.74222906685435,0
|
||||
</coordinates>
|
||||
</LinearRing>
|
||||
</outerBoundaryIs>
|
||||
@ -66,7 +62,17 @@
|
||||
<outerBoundaryIs>
|
||||
<LinearRing>
|
||||
<coordinates>
|
||||
53.65471572344581,23.60707183181828,0 53.81497415962468,23.64039601077693,0 53.89006934210051,23.70030483918968,0 53.82333143229609,23.8516202627874,0 53.86319220148564,23.98332838418791,0 53.99053354492822,24.12456957062248,0 54.06970919826649,24.16390902332125,0 54.29453647311612,24.20786500130305,0 54.4269606795388,24.1621613203329,0 54.62769762272161,24.13496838655094,0 54.81618779246777,24.14356800279005,0 55.07760305886731,24.12710640153997,0 55.3717135673071,24.09408330468836,0 55.51665272247794,24.08714942578391,0 55.7130597944597,24.04771223790903,0 55.84755955669971,24.02354751356681,0 56.10545120654146,24.13762037622954,0 55.99976854056003,24.32485982077774,0 56.10486910232725,24.49774628963504,0 56.24379095616488,24.66002432190549,0 56.3757168932834,24.73517133058909,0 56.6059558780324,24.42435856267748,0 56.85872988375159,24.12755561616724,0 57.0338824559102,23.9914503374143,0 57.21308953024807,23.94929119710407,0 57.21680836491202,24.04403878815587,0 56.94869924942736,24.32708003404261,0 56.94581183443466,24.33459648384248,0 56.73500304028357,24.56368325312187,0 56.72656471071915,24.57361887978731,0 56.57309346581459,24.84701984357467,0 56.50441779853315,24.99594960265624,0 56.50433349353005,25.00093902729403,0 56.44771355470139,25.25213948764897,0 56.44763138020103,25.25712684971825,0 56.4264930810354,25.36657866141938,0 56.41171944085021,25.59595914783641,0 56.43005382355997,25.66367194197571,0 56.56194333184953,25.96084756058052,0 56.6066617166811,26.17987903949812,0 56.57980405692468,26.32794940582447,0 56.53327757140016,26.41380995505169,0 56.33457107103267,26.39306483854733,0 56.19021052846363,26.25368100717692,0 56.16768105068896,26.19579885978477,0 56.08476485694609,26.08929078790176,0 56.00685597366381,25.91695068510375,0 55.52074261151184,25.58980971732876,0 55.17612936813672,25.39222518791673,0 54.95524732310717,25.19180079080549,0 54.72370315792644,24.98180890658784,0 54.59143891565559,24.87888900005346,0 54.47725518383124,24.71026498169303,0 54.29117979539007,24.60365402476311,0 54.10668407157351,24.53002836819185,0 53.84674838021708,24.45397492570235,0 53.63051004330731,24.38355563124107,0 53.53099810274139,24.32599711001882,0 53.52655695929231,24.2430212866572,0 53.47731047620653,24.10526815199695,0 53.48409826645556,23.89833618306972,0 53.43772194035778,23.73559864214896,0 53.65471572344581,23.60707183181828,0
|
||||
53.62876614881812,23.58520953923354,0 53.81497415962468,23.64039601077693,0 53.89006934210051,23.70030483918968,0 53.82333143229609,23.8516202627874,0 53.86319220148564,23.98332838418791,0 53.99053354492822,24.12456957062248,0 54.06970919826648,24.16390902332125,0 54.29453647311612,24.20786500130305,0 54.4269606795388,24.1621613203329,0 54.62769762272161,24.13496838655094,0 54.81618779246777,24.14356800279005,0 55.07760305886731,24.12710640153997,0 55.3717135673071,24.09408330468836,0 55.51665272247794,24.08714942578391,0 55.7130597944597,24.04771223790903,0 55.8475595566997,24.02354751356681,0 56.10545120654146,24.13762037622954,0 55.99976854056003,24.32485982077774,0 56.10486910232725,24.49774628963504,0 56.24379095616488,24.66002432190549,0 56.3757168932834,24.73517133058909,0 56.6059558780324,24.42435856267748,0 56.85872988375159,24.12755561616724,0 57.0338824559102,23.9914503374143,0 57.21308953024807,23.94929119710407,0 57.21680836491202,24.04403878815587,0 56.94869924942736,24.32708003404261,0 56.94581183443466,24.33459648384248,0 56.73500304028357,24.56368325312187,0 56.72656471071916,24.57361887978731,0 56.57309346581459,24.84701984357467,0 56.50441779853315,24.99594960265624,0 56.50433349353005,25.00093902729403,0 56.44771355470139,25.25213948764897,0 56.44763138020103,25.25712684971825,0 56.4264930810354,25.36657866141938,0 56.41171944085021,25.59595914783641,0 56.43005382355997,25.66367194197571,0 56.56194333184953,25.96084756058052,0 56.6066617166811,26.17987903949812,0 56.57980405692468,26.32794940582447,0 56.53327757140016,26.41380995505169,0 56.33457107103267,26.39306483854733,0 56.19021052846363,26.25368100717692,0 56.16768105068896,26.19579885978477,0 56.08476485694609,26.08929078790176,0 56.00685597366381,25.91695068510375,0 55.52074261151184,25.58980971732876,0 55.17612936813672,25.39222518791673,0 54.95524732310717,25.19180079080549,0 54.72370315792644,24.98180890658784,0 54.59143891565559,24.87888900005346,0 54.463400225382,24.72046550155631,0 54.2874697694143,24.61403529309966,0 54.10668407157351,24.53002836819185,0 53.84674838021708,24.45397492570235,0 53.63051004330731,24.38355563124107,0 53.53099810274139,24.32599711001882,0 53.52655695929231,24.2430212866572,0 53.47731047620653,24.10526815199695,0 53.48409826645556,23.89833618306972,0 53.43772194035778,23.73559864214896,0 53.62876614881812,23.58520953923354,0
|
||||
</coordinates>
|
||||
</LinearRing>
|
||||
</outerBoundaryIs>
|
||||
</Polygon>
|
||||
<Polygon>
|
||||
<tessellate>1</tessellate>
|
||||
<outerBoundaryIs>
|
||||
<LinearRing>
|
||||
<coordinates>
|
||||
53.12492547604882,26.78128994935179,0 53.93429903281053,26.44886627234056,0 54.39518502867432,26.24317681495279,0 54.40595226013039,26.15085791066511,0 54.39402006647479,26.07275670239802,0 54.45409861019316,25.87972338154338,0 54.41724414033247,25.73480314688115,0 54.1187172157126,25.25321836400623,0 54.20987940042988,25.12047998388877,0 54.35257401277801,25.2267744278992,0 54.41550992214921,25.32036971405005,0 54.64097689900847,25.81475254728567,0 55.08139929658433,25.77655670271657,0 55.14837973740534,25.86648896219312,0 55.23438119476889,26.04611850844939,0 55.34687991216698,26.17079665300636,0 55.41772530288445,26.2809137484762,0 55.36900054746567,26.33000085609055,0 55.20397500475956,26.3236903109378,0 55.08125982524341,26.30582632988321,0 55.07529454278418,26.22195863065989,0 55.00557201138665,26.03662481453928,0 54.96119908244564,25.94100327391857,0 54.78115168217862,25.9371329700981,0 54.60398848713732,25.97924476797395,0 54.60929788338804,26.08907791015604,0 54.60926847524901,26.09196656708914,0 54.60493136791606,26.20170115253774,0 54.60709119423685,26.30570625817345,0 54.6032780887619,26.36345036596925,0 53.98968432153845,26.6143340162421,0 53.63126264971719,26.71666369444971,0 53.4267861671608,26.84118901754458,0 53.2458617324182,26.89935838924461,0 53.10187007838965,26.90286187426819,0 53.12492547604882,26.78128994935179,0
|
||||
</coordinates>
|
||||
</LinearRing>
|
||||
</outerBoundaryIs>
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"output_directory": "",
|
||||
"boundary_file": "./configs/persiangulf/mediumresolution.kml",
|
||||
"zoom_factor": 0.15,
|
||||
"geo_width": 3.05
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
cd ../..
|
||||
|
||||
call .venv/scripts/activate
|
||||
|
||||
python main.py ./configs/persiangulf/boundary.yaml -s
|
||||
python main.py ./configs/persiangulf/lowresolution.yaml -s -l 11
|
||||
python main.py ./configs/persiangulf/mediumresolution.yaml -s -l 13
|
||||
python main.py ./configs/persiangulf/highresolution.yaml -s -l 15
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
cd ../..
|
||||
|
||||
call .venv/scripts/activate
|
||||
|
||||
python main.py ./configs/persiangulf/boundary.yaml -r -o -w 0.2
|
||||
python main.py ./configs/persiangulf/lowresolution.yaml -r -o -w 0.2
|
||||
python main.py ./configs/persiangulf/mediumresolution.yaml -r -o -w 0.2
|
||||
python main.py ./configs/persiangulf/highresolution.yaml -r -o -w 0.2
|
||||
@ -331,6 +331,8 @@ def run(map_config, port):
|
||||
start_X, start_Y = deg_to_num(start_lat, start_lng, zoom)
|
||||
end_X, end_Y = deg_to_num(end_lat, end_lng, zoom)
|
||||
|
||||
print(f"Feature {f} of {len(features)}, finding screenshot locations, this may take a while...")
|
||||
|
||||
# Find all the X, Y coordinates inside of the provided area
|
||||
screenshots_XY = []
|
||||
for X in range(start_X, end_X, n_width):
|
||||
@ -400,6 +402,7 @@ def run(map_config, port):
|
||||
for current_zoom in range(zoom, map_config["final_level"], -1):
|
||||
Xs = [int(d) for d in listdir(os.path.join(map_config["tiles_folder"], str(current_zoom))) if isdir(join(map_config["tiles_folder"], str(current_zoom), d))]
|
||||
existing_tiles = []
|
||||
print("Finding tiles to merge...")
|
||||
for X in Xs:
|
||||
Ys = [int(f.removesuffix(".png")) for f in listdir(os.path.join(map_config["tiles_folder"], str(current_zoom), str(X))) if isfile(join(map_config["tiles_folder"], str(current_zoom), str(X), f))]
|
||||
for Y in Ys:
|
||||
@ -424,12 +427,12 @@ def run(map_config, port):
|
||||
res.extend([fut.result() for fut in futures.as_completed(futs)])
|
||||
print(f"Merged {len(res)} images in {datetime.datetime.now() - start_time}s")
|
||||
|
||||
########### Assemble tiles to get lower zoom levels
|
||||
########### Compress tiles to reduce storage and download times
|
||||
if not map_config["screenshots_only"] and not map_config["extraction_only"] and not map_config["merging_only"]:
|
||||
start_time = datetime.datetime.now()
|
||||
res = []
|
||||
print("Tiles compression start time: ", start_time)
|
||||
for current_zoom in range(zoom, map_config["final_level"], -1):
|
||||
for current_zoom in range(zoom, map_config["final_level"] - 1, -1):
|
||||
Xs = [int(d) for d in listdir(os.path.join(map_config["tiles_folder"], str(current_zoom))) if isdir(join(map_config["tiles_folder"], str(current_zoom), d))]
|
||||
existing_tiles = []
|
||||
for X in Xs:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user