Skip to content

Commit

Permalink
Move to stable data hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
banesullivan committed Jan 18, 2025
1 parent 54516cc commit cbd4088
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
10 changes: 4 additions & 6 deletions localtileserver/tiler/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ def get_data_path(name):


def get_sf_bay_url():
# Non-COG: https://data.kitware.com/#item/60747d792fa25629b9a79538
# COG: https://data.kitware.com/#item/626854a04acac99f42126a72
return "https://data.kitware.com/api/v1/file/626854a14acac99f42126a74/download"
return "s3://localtileserver/examples/TC_NG_SFBay_US_Geo_COG.tif"


def get_elevation_us_url():
return "https://data.kitware.com/api/v1/file/5dbc4f66e3566bda4b4ed3af/download"
return "s3://localtileserver/examples/elevation_cog.tif"


def get_oam2_url():
return "https://oin-hotosm.s3.amazonaws.com/59c66c5223c8440011d7b1e4/0/7ad397c0-bba2-4f98-a08a-931ec3a6e943.tif"
return "s3://localtileserver/examples/oam2.tif"


def convert_dropbox_url(url: str):
Expand All @@ -47,4 +45,4 @@ def clean_url(url: str):


def get_co_elevation_url():
return "https://data.kitware.com/api/v1/file/62e4408fbddec9d0c4443918/download"
return "s3://localtileserver/examples/co_elevation.tif"
2 changes: 1 addition & 1 deletion localtileserver/web/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"description": "The local path or URL to the image to use.",
"in": "query",
"type": "str",
"example": "https://data.kitware.com/api/v1/file/60747d792fa25629b9a79565/download",
"example": "s3://localtileserver/examples/TC_NG_SFBay_US_Geo.tif",
},
}
STYLE_PARAMS = {
Expand Down
3 changes: 0 additions & 3 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ def test_list_palettes(flask_client):
def test_cog_validate_endpoint(flask_client, remote_file_url):
r = flask_client.get(f"/api/validate?filename={remote_file_url}")
assert r.status_code == 200
non_cog = "https://data.kitware.com/api/v1/file/60747d792fa25629b9a79565/download"
r = flask_client.get(f"/api/validate?filename={non_cog}")
assert r.status_code == 415


def test_run_app():
Expand Down

0 comments on commit cbd4088

Please sign in to comment.