Skip to content

Commit

Permalink
tileserver server side!
Browse files Browse the repository at this point in the history
  • Loading branch information
GondekNP committed Jan 6, 2024
1 parent 8db51ba commit 0fd2f93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ def analyze_burn(body: AnaylzeBurnPOSTBody, sftp_client: SFTPClient = Depends(ge

@app.get("/map/{fire_event_name}", response_class=HTMLResponse)
def serve_map(request: Request, fire_event_name: str, manifest: dict = Depends(get_manifest)):
# tileserver_endpoint = 'https://tf-rest-burn-severity-ohi6r6qs2a-uc.a.run.app'
tileserver_endpoint = 'http://localhost:5050'
tileserver_endpoint = 'https://tf-rest-burn-severity-ohi6r6qs2a-uc.a.run.app'
# tileserver_endpoint = 'http://localhost:5050'
cog_url = f"https://burn-severity-backend.s3.us-east-2.amazonaws.com/public/{fire_event_name}/rbr.tif"
cog_tileserver_url_prefix = tileserver_endpoint + f"/cog/tiles/WebMercatorQuad/{{z}}/{{x}}/{{y}}.png?url={cog_url}&nodata=0&algorithm=classify&algorithm_params="
# cog_tileserver_url_prefix = tileserver_endpoint + f"/cog/tiles/WebMercatorQuad/{{z}}/{{x}}/{{y}}.png?url={cog_url}"
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
var fireMetadata = JSON.parse({{fire_metadata_json | tojson | safe}});
console.log(fireMetadata);

var fire_bounds = [[fireMetadata.bounds[0], fireMetadata.bounds[1]], [fireMetadata.bounds[2], fireMetadata.bounds[3]]]
var fire_bounds = [[fireMetadata.bounds[1], fireMetadata.bounds[0]], [fireMetadata.bounds[3], fireMetadata.bounds[2]]]
console.log("fire bounds - ", fire_bounds)

// Add base map
Expand Down

0 comments on commit 0fd2f93

Please sign in to comment.