Skip to content

Conversation

@caitlinadams
Copy link
Collaborator

Using the Copernicus DEM results in georeferenced products in EPSG:4326. This adds the ability to specify EPSG:3031 as the output and uses gdal to do the transform. Also adds the ability to select linear, dB or both as the scaling.

@caitlinadams caitlinadams requested a review from abradley60 March 18, 2025 01:39
new_ymax = min(bounds.ymax + buffer[1], 90)
new_xmin = max(bounds.xmin - buffer[0], -180.0)
new_ymin = max(bounds.ymin - buffer[1], -90.0)
new_xmax = min(bounds.xmax + buffer[0], 180 - 0.5 * lon_spacing)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just checking this logic is required?

Copy link
Collaborator

@abradley60 abradley60 left a comment

Choose a reason for hiding this comment

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

Looks good to me! Just confirming a couple things and we should make a decision about CRS formatting

@click.option("--spacing", type=int)
@click.option("--scaling", type=click.Choice(["linear", "db"]))
@click.option("--scaling", type=click.Choice(["linear", "db", "both"]))
@click.option("--target-crs", type=click.Choice(["EPSG:4326", "EPSG:3031"]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need to be consistent across the project (and other projects). I have typically passed in crs as an integer value and assumed EPSG:{crs}. This might not be best practice but would align with what I have done elsewhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that's sensible -- I'm happy to update mine to match. I agree that consistency is important.

click.echo("Performing reprojection to EPSG:3031")
# Identify all files containing gamma0-rtc_geo
files_to_reproject = list(
processed_scene_directory.glob("*gamma0-rtc_geo*.tif")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Confirming this consider all required ancillaries?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, no it doesn't. I only focussed on getting the polarisation measurements, and didn't consider the ancillaries. I will go back and update.

@abradley60 abradley60 merged commit 2e66489 into main Mar 19, 2025
1 check passed
@caitlinadams caitlinadams deleted the feature-reprojectproducts branch March 20, 2025 00:00
abradley60 added a commit that referenced this pull request Apr 10, 2025
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.

2 participants