Skip to content

fix: perform get tile with known format to reduce requests(MAPCO-8749)#175

Draft
nitzanmorr wants to merge 14 commits intomasterfrom
get-tile-with-known-format
Draft

fix: perform get tile with known format to reduce requests(MAPCO-8749)#175
nitzanmorr wants to merge 14 commits intomasterfrom
get-tile-with-known-format

Conversation

@nitzanmorr
Copy link
Contributor

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

This PR removes the need to "guess" the tile format when performing a "get" request to s3. So instead of trying to fetch a tile of a certain format, and if it fails - try the other format, now it just fetches the correct format. This reduces requests to s3.
Also made an improvement to the fs client so now instead of searching the entire directory, it reads the correct file directly.

@nitzanmorr nitzanmorr changed the title fix: perform get tiles with known format (MAPCO-8749) fix: perform get tile with known format to reduce requests(MAPCO-8749) Oct 20, 2025
@nitzanmorr nitzanmorr marked this pull request as draft October 20, 2025 12:32
This is experimental! might break the cli when using it against s3 and fs
List<CorrespondingTileBuilder> correspondingTileBuilders = new List<CorrespondingTileBuilder>()
{
() => baseData.GetCorrespondingTile(targetCoords, shouldUpscale),
() => baseData.GetCorrespondingTile(targetCoords, null, shouldUpscale),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tile format parameter should not be null, as it would break the cli when using S3 or FS. The format should be a cli argument.

{
Tile newTile = newTiles[i];
bool baseTileExists = baseData.TileExists(newTile.GetCoord());
bool baseTileExists = baseData.TileExists(newTile.GetCoord(), null);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tile format parameter should not be null, as it would break the cli when using S3 or FS. The format should be a cli argument.

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.

1 participant