-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
barak
committed
Aug 13, 2024
1 parent
73c9378
commit d8438b2
Showing
6 changed files
with
199 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,86 @@ | ||
// import * as pimage from "pureimage"; | ||
// import { Bitmap } from "pureimage/types/bitmap"; | ||
// import { Readable } from "stream"; | ||
// import { MapData, UrlResult, UrlUsageType } from "./map.data"; | ||
// | ||
// export const mapDataGalilTahton: MapData = { | ||
// name: "Galil Tahton", | ||
// | ||
// urlProvider: async (usageType: UrlUsageType, mapType: string, zoomLevel: number, row: number, col: number): Promise<UrlResult> => { | ||
// const zoomLevelStr = (zoomLevel + 4).toString(); | ||
// https://v5.gis-net.co.il/proxy/proxy.ashx?http://10.237.72.71:8080/geoserver/gwc/service/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=Galil_tachton_SHP:Galil_tachton_Reka&STYLE=raster&FORMAT=image/jpeg&TILEMATRIXSET=Galil_tachton&TILEMATRIX=Galil_tachton:8&TILEROW=110&TILECOL=128 | ||
// debugger | ||
// return { url: `https://v5.gis-net.co.il/proxy/proxy.ashx?http://10.237.72.71:8080/geoserver/gwc/service/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=Galil_tachton_2023:2023&STYLE=raster&FORMAT=image/jpeg&TILEMATRIXSET=Galil_tachton&TILEMATRIX=Galil_tachton:${zoomLevelStr}&TILEROW=${row}&TILECOL=${col}` }; | ||
// }, | ||
// | ||
// zoomLevelProvider: (zoomLevel: number): string => { | ||
// return (zoomLevel + 4).toString(); | ||
// }, | ||
// | ||
// zoomFactorProvider: (zoomLevel: number, zoomIn: boolean): number => { | ||
// return 2; | ||
// }, | ||
// | ||
// decode: async (mapType: string, buffer: Buffer): Promise<Bitmap> => { | ||
// return pimage.decodeJPEGFromStream(Readable.from(buffer)); | ||
// }, | ||
// | ||
// supportedMapTypes: ["Satellite"], | ||
// | ||
// showScale: true, | ||
// | ||
// referer: undefined, | ||
// | ||
// zoomLayers: [ | ||
// { | ||
// scale: 32000, | ||
// centerTileX: 8, | ||
// centerTileY: 7, | ||
// centerTileOffsetX: 117, | ||
// centerTileOffsetY: 61, | ||
// }, | ||
// { | ||
// scale: 16000, | ||
// centerTileX: 16, | ||
// centerTileY: 14, | ||
// centerTileOffsetX: 234, | ||
// centerTileOffsetY: 122, | ||
// }, | ||
// { | ||
// scale: 8000, | ||
// centerTileX: 33, | ||
// centerTileY: 28, | ||
// centerTileOffsetX: 213, | ||
// centerTileOffsetY: 247, | ||
// }, | ||
// { | ||
// scale: 4000, | ||
// centerTileX: 67, | ||
// centerTileY: 57, | ||
// centerTileOffsetX: 171, | ||
// centerTileOffsetY: 239, | ||
// }, | ||
// { | ||
// scale: 2000, | ||
// centerTileX: 135, | ||
// centerTileY: 115, | ||
// centerTileOffsetX: 87, | ||
// centerTileOffsetY: 219, | ||
// }, | ||
// { | ||
// scale: 1000, | ||
// centerTileX: 270, | ||
// centerTileY: 231, | ||
// centerTileOffsetX: 179, | ||
// centerTileOffsetY: 190, | ||
// }, | ||
// { | ||
// scale: 500, | ||
// centerTileX: 541, | ||
// centerTileY: 463, | ||
// centerTileOffsetX: 108, | ||
// centerTileOffsetY: 129, | ||
// }, | ||
// { | ||
// scale: 250, | ||
// centerTileX: 1082, | ||
// centerTileY: 927, | ||
// centerTileOffsetX: 219, | ||
// centerTileOffsetY: 5, | ||
// } | ||
// ], | ||
// }; | ||
import { MapData, UrlResult, UrlUsageType } from './map.data' | ||
|
||
export const mapDataGalilTahton: MapData = { | ||
name: 'Galil Tahton', | ||
|
||
urlProvider: async (_usageType: UrlUsageType, _mapType: string, zoomLevel: number, row: number, col: number): Promise<UrlResult> => { | ||
const zoomLevelStr = (zoomLevel + 4).toString() | ||
|
||
return { | ||
url: `https://v5.gis-net.co.il/proxy/proxy.ashx?http://10.237.72.71:8080/geoserver/gwc/service/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=Galil_tachton_2023:2023&STYLE=raster&FORMAT=image/jpeg&TILEMATRIXSET=Galil_tachton&TILEMATRIX=Galil_tachton:${zoomLevelStr}&TILEROW=${row}&TILECOL=${col}` | ||
} | ||
}, | ||
|
||
zoomLevelProvider: (zoomLevel: number): string => { | ||
return (zoomLevel + 4).toString() | ||
}, | ||
|
||
zoomFactorProvider: (_zoomLevel: number, _zoomIn: boolean): number => { | ||
return 2 | ||
}, | ||
|
||
supportedMapTypes: ['Satellite'], | ||
|
||
showScale: true, | ||
|
||
referer: 'https://v5.gis-net.co.il/v5/GalilTachton', | ||
|
||
zoomLayers: [ | ||
{ | ||
scale: 32000, | ||
centerTileX: 8, | ||
centerTileY: 7, | ||
centerTileOffsetX: 117, | ||
centerTileOffsetY: 61 | ||
}, | ||
{ | ||
scale: 16000, | ||
centerTileX: 16, | ||
centerTileY: 14, | ||
centerTileOffsetX: 234, | ||
centerTileOffsetY: 122 | ||
}, | ||
{ | ||
scale: 8000, | ||
centerTileX: 33, | ||
centerTileY: 28, | ||
centerTileOffsetX: 213, | ||
centerTileOffsetY: 247 | ||
}, | ||
{ | ||
scale: 4000, | ||
centerTileX: 67, | ||
centerTileY: 57, | ||
centerTileOffsetX: 171, | ||
centerTileOffsetY: 239 | ||
}, | ||
{ | ||
scale: 2000, | ||
centerTileX: 135, | ||
centerTileY: 115, | ||
centerTileOffsetX: 87, | ||
centerTileOffsetY: 219 | ||
}, | ||
{ | ||
scale: 1000, | ||
centerTileX: 270, | ||
centerTileY: 231, | ||
centerTileOffsetX: 179, | ||
centerTileOffsetY: 190 | ||
}, | ||
{ | ||
scale: 500, | ||
centerTileX: 541, | ||
centerTileY: 463, | ||
centerTileOffsetX: 108, | ||
centerTileOffsetY: 129 | ||
}, | ||
{ | ||
scale: 250, | ||
centerTileX: 1082, | ||
centerTileY: 927, | ||
centerTileOffsetX: 219, | ||
centerTileOffsetY: 5 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,81 @@ | ||
// import * as pimage from "pureimage"; | ||
// import { Bitmap } from "pureimage/types/bitmap"; | ||
// import { Readable } from "stream"; | ||
// import { MapData, UrlResult, UrlUsageType } from "./map.data"; | ||
// | ||
// export const mapDataHodHasharon: MapData = { | ||
// name: "Hod Hasharon", | ||
// | ||
// urlProvider: async (usageType: UrlUsageType, mapType: string, zoomLevel: number, row: number, col: number): Promise<UrlResult> => { | ||
// let zoomLevelStr = (zoomLevel + 3).toString(); | ||
// const rowStr = row.toString(); | ||
// const colStr = col.toString(); | ||
// const mapTypeStr = mapType === "Satellite" ? "Hod_Hasharon_2022:2022" : "Hod_Hasharon_SHP:Hod_Hasharon_Reka"; | ||
// return { url: `https://v5.gis-net.co.il/proxy/proxy.ashx?http://10.237.72.70:8080/geoserver/gwc/service/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=${mapTypeStr}&STYLE=raster&FORMAT=image/jpeg&TILEMATRIXSET=Hod_Hasharon&TILEMATRIX=Hod_Hasharon:${zoomLevelStr}&TILEROW=${rowStr}&TILECOL=${colStr}` }; | ||
// }, | ||
// | ||
// zoomLevelProvider: (zoomLevel: number): string => { | ||
// return zoomLevel.toString(); | ||
// }, | ||
// | ||
// zoomFactorProvider: (zoomLevel: number, zoomIn: boolean): number => { | ||
// return 2; | ||
// }, | ||
// | ||
// decode: async (mapType: string, buffer: Buffer): Promise<Bitmap> => { | ||
// return await pimage.decodeJPEGFromStream(Readable.from(buffer)); | ||
// }, | ||
// | ||
// supportedMapTypes: ["Satellite", "Street & Buildings"], | ||
// | ||
// showScale: true, | ||
// | ||
// referer: undefined, | ||
// | ||
// zoomLayers: [ | ||
// { | ||
// scale: 16000, | ||
// centerTileX: 3, | ||
// centerTileY: 4, | ||
// centerTileOffsetX: 221, | ||
// centerTileOffsetY: 216, | ||
// }, | ||
// { | ||
// scale: 8000, | ||
// centerTileX: 7, | ||
// centerTileY: 9, | ||
// centerTileOffsetX: 184, | ||
// centerTileOffsetY: 176, | ||
// }, | ||
// { | ||
// scale: 4000, | ||
// centerTileX: 15, | ||
// centerTileY: 19, | ||
// centerTileOffsetX: 111, | ||
// centerTileOffsetY: 96, | ||
// }, | ||
// { | ||
// scale: 2000, | ||
// centerTileX: 30, | ||
// centerTileY: 38, | ||
// centerTileOffsetX: 223, | ||
// centerTileOffsetY: 192, | ||
// }, | ||
// { | ||
// scale: 1000, | ||
// centerTileX: 61, | ||
// centerTileY: 77, | ||
// centerTileOffsetX: 193, | ||
// centerTileOffsetY: 129, | ||
// }, | ||
// { | ||
// scale: 500, | ||
// centerTileX: 123, | ||
// centerTileY: 155, | ||
// centerTileOffsetX: 130, | ||
// centerTileOffsetY: 3, | ||
// }, | ||
// { | ||
// scale: 250, | ||
// centerTileX: 247, | ||
// centerTileY: 310, | ||
// centerTileOffsetX: 4, | ||
// centerTileOffsetY: 6, | ||
// }, | ||
// ], | ||
// }; | ||
import { MapData, UrlResult, UrlUsageType } from './map.data' | ||
|
||
export const mapDataHodHasharon: MapData = { | ||
name: 'Hod Hasharon', | ||
|
||
urlProvider: async (_usageType: UrlUsageType, mapType: string, zoomLevel: number, row: number, col: number): Promise<UrlResult> => { | ||
const zoomLevelStr = (zoomLevel + 3).toString() | ||
const rowStr = row.toString() | ||
const colStr = col.toString() | ||
const mapTypeStr = mapType === 'Satellite' ? 'Hod_Hasharon_2022:2022' : 'Hod_Hasharon_SHP:Hod_Hasharon_Reka' | ||
return { | ||
url: `https://v5.gis-net.co.il/proxy/proxy.ashx?http://10.237.72.70:8080/geoserver/gwc/service/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=${mapTypeStr}&STYLE=raster&FORMAT=image/jpeg&TILEMATRIXSET=Hod_Hasharon&TILEMATRIX=Hod_Hasharon:${zoomLevelStr}&TILEROW=${rowStr}&TILECOL=${colStr}` | ||
} | ||
}, | ||
|
||
zoomLevelProvider: (zoomLevel: number): string => { | ||
return zoomLevel.toString() | ||
}, | ||
|
||
zoomFactorProvider: (_zoomLevel: number, _zoomIn: boolean): number => { | ||
return 2 | ||
}, | ||
|
||
supportedMapTypes: ['Satellite', 'Street & Buildings'], | ||
|
||
showScale: true, | ||
|
||
referer: 'https://v5.gis-net.co.il/v5/Hod_Hasharon', | ||
|
||
zoomLayers: [ | ||
{ | ||
scale: 16000, | ||
centerTileX: 3, | ||
centerTileY: 4, | ||
centerTileOffsetX: 221, | ||
centerTileOffsetY: 216 | ||
}, | ||
{ | ||
scale: 8000, | ||
centerTileX: 7, | ||
centerTileY: 9, | ||
centerTileOffsetX: 184, | ||
centerTileOffsetY: 176 | ||
}, | ||
{ | ||
scale: 4000, | ||
centerTileX: 15, | ||
centerTileY: 19, | ||
centerTileOffsetX: 111, | ||
centerTileOffsetY: 96 | ||
}, | ||
{ | ||
scale: 2000, | ||
centerTileX: 30, | ||
centerTileY: 38, | ||
centerTileOffsetX: 223, | ||
centerTileOffsetY: 192 | ||
}, | ||
{ | ||
scale: 1000, | ||
centerTileX: 61, | ||
centerTileY: 77, | ||
centerTileOffsetX: 193, | ||
centerTileOffsetY: 129 | ||
}, | ||
{ | ||
scale: 500, | ||
centerTileX: 123, | ||
centerTileY: 155, | ||
centerTileOffsetX: 130, | ||
centerTileOffsetY: 3 | ||
}, | ||
{ | ||
scale: 250, | ||
centerTileX: 247, | ||
centerTileY: 310, | ||
centerTileOffsetX: 4, | ||
centerTileOffsetY: 6 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as pimage from 'pureimage' | ||
import { Bitmap } from 'pureimage' | ||
import { Readable } from 'stream' | ||
import { MapBackendData } from './map-backend' | ||
|
||
export const mapBackendGalilTahton: MapBackendData = { | ||
name: 'Galil Tahton', | ||
|
||
decode: async (_mapType: string, buffer: Buffer): Promise<Bitmap> => { | ||
return pimage.decodeJPEGFromStream(Readable.from(buffer)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as pimage from 'pureimage' | ||
import { Bitmap } from 'pureimage' | ||
import { Readable } from 'stream' | ||
import { MapBackendData } from './map-backend' | ||
|
||
export const mapBackendHodHasharon: MapBackendData = { | ||
name: 'Hod Hasharon', | ||
|
||
decode: async (_mapType: string, buffer: Buffer): Promise<Bitmap> => { | ||
return await pimage.decodeJPEGFromStream(Readable.from(buffer)) | ||
} | ||
} |
Oops, something went wrong.