auto-sync: 2026-05-14 00:10:01
This commit is contained in:
33
tasks/enduro-trails/scripts/patch_resampling.py
Normal file
33
tasks/enduro-trails/scripts/patch_resampling.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import sys
|
||||
|
||||
path = "/home/slin/enduro-trails/prototype/static/app.js"
|
||||
with open(path, 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
old = """ map.addLayer({
|
||||
id: id,
|
||||
type: 'raster',
|
||||
source: sourceId,
|
||||
paint: {
|
||||
'raster-opacity': opacity
|
||||
},"""
|
||||
|
||||
new = """ map.addLayer({
|
||||
id: id,
|
||||
type: 'raster',
|
||||
source: sourceId,
|
||||
paint: {
|
||||
'raster-opacity': opacity,
|
||||
'raster-resampling': 'linear'
|
||||
},"""
|
||||
|
||||
if old not in content:
|
||||
print("ERROR: marker not found")
|
||||
sys.exit(1)
|
||||
|
||||
content = content.replace(old, new)
|
||||
|
||||
with open(path, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
print("OK - raster-resampling: linear added")
|
||||
Reference in New Issue
Block a user