Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update titiler #143

Merged
merged 3 commits into from
Feb 8, 2023
Merged

Conversation

vincentsarago
Copy link
Contributor

This pr does:

  • Update titiler and titiler-pgstac version
  • Update rasterio >=1.3 (and remove pctiler/pctiler/reader_cog.py)

Frontend changes

Ref: https://github.com/stac-utils/titiler-pgstac/blob/master/CHANGES.md?plain=1#L55-L63

@@ -30,6 +30,8 @@
colormap_dependency=PCColorMapParams,
reader_dependency=ReaderParams,
router_prefix=get_settings().item_endpoint_prefix,
# We remove the titiler default `/map` viewer
add_viewer=False,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in titiler 0.8 we added a /map viewer which is added by default with the Tiler Factories

@@ -39,13 +39,16 @@ def __init__(self, request: Request):
reader_dependency=ReaderParams,
router_prefix=get_settings().mosaic_endpoint_prefix,
backend_dependency=BackendParams,
add_map_viewer=False,
add_statistics=False,
add_mosaic_list=False,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those are already set to False in the TileFactory so it's mostly informative
https://github.com/stac-utils/titiler-pgstac/blob/master/titiler/pgstac/factory.py#L111-L116

)


@pgstac_mosaic_factory.router.get(
"/info", response_model=MosaicInfo, response_class=ORJSONResponse
)
def map(
def mosaic_info(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed for consistency

h = asset_info.extra_fields["file:header_size"]
info["env"] = {"GDAL_INGESTED_BYTES_AT_OPEN": h}

return info
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we now return a TypedDict with the URL and a dictionary used to set some GDAL env (if available)

"fastapi @ git+https://github.com/mmcfarland/fastapi/@982e7caf086bffeace8554da6d69e5f3082f14a3#egg=fastapi",
"starlette>=0.21.0,<0.22.0",
"fastapi>=0.87",
"starlette>=0.22.0,<0.23.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmcfarland is it ok to use starlette 0.22

@mmcfarland
Copy link
Member

Due to the breaking expression changes, we're going to wait to evaluate this after the next release (end of Jan).

@mmcfarland
Copy link
Member

Thanks @vincentsarago , I'm ready to merge this. Could you resolve the conflict (I can't push to the fork)? The same dependency upgrades have merged after this PR was created.

@vincentsarago
Copy link
Contributor Author

conflict resolved, I'll let you go ahead an merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants