Skip to content

Refactor COG#1862

Merged
sharkAndshark merged 52 commits intomaplibre:mainfrom
sharkAndshark:cog_web_4
Jun 12, 2025
Merged

Refactor COG#1862
sharkAndshark merged 52 commits intomaplibre:mainfrom
sharkAndshark:cog_web_4

Conversation

@sharkAndshark
Copy link
Collaborator

@sharkAndshark sharkAndshark commented May 29, 2025

It's the 4th PR of #1814 to fix #1820

  • Create a new struct Image and many func moved from Source.rs to image.rs
  • The structure Meta got removed and its fields moved to Source
  • Many docs added
  • Refactor rgb_to_png to three: rgb_to_png ensure_pixels_valid and encode_rgba_to_png

Before we add more fields and helper methods, a refactor is needed.

Copy link
Member

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

Nice work.
I have left a few comments below, nothing major

@sharkAndshark
Copy link
Collaborator Author

sharkAndshark commented Jun 7, 2025

Thx! @nyurik @CommanderStorm will be back hours later :)

@sharkAndshark sharkAndshark requested a review from nyurik June 7, 2025 17:37
@sharkAndshark
Copy link
Collaborator Author

Something could be added in next:

  • A COG file with masks should be added as test case
  • Add a readme.md in martin/src/cog

@sharkAndshark sharkAndshark requested a review from nyurik June 8, 2025 07:52
Copy link
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

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

@sharkAndshark looks good to me. I made a number of minor changes, and moved the docs to a dedicated readme (included with the module). Please take a look at a few FIXME i left there - you may want to fix them before we merge, but feel free to merge whenever you feel its ready

@sharkAndshark sharkAndshark enabled auto-merge (squash) June 12, 2025 06:46
@sharkAndshark sharkAndshark merged commit c8b28cc into maplibre:main Jun 12, 2025
17 of 18 checks passed
@sharkAndshark sharkAndshark deleted the cog_web_4 branch June 12, 2025 07:23
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.

Make COG web friendly

4 participants