Skip to content

[#300] Fix for raster initialization code used in sinmap python scripts - #301

Merged
dtarb merged 3 commits into
Developfrom
300-fix-raster-initialization-py-code
May 19, 2026
Merged

dtarb merged 3 commits into
Developfrom
300-fix-raster-initialization-py-code

Conversation

@pkdash

@pkdash pkdash commented May 18, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@pkdash
pkdash marked this pull request as ready for review May 19, 2026 02:22
@pkdash

pkdash commented May 19, 2026

Copy link
Copy Markdown
Collaborator Author

@dtarb Let me know if you want to review this. I want to include this in release 5.5.0 for which I have already created a draft release few weeks back.

Comment thread pyfiles/Utils.py
# Set projection from the source raster without reparsing WKT because
# some ArcGIS binary DEM projections can fail ImportFromWkt with corrupt data errors.
source_srs = base_raster.GetSpatialRef() if hasattr(base_raster, 'GetSpatialRef') else None
if source_srs:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why not do the else option all the time?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I added comments to the this code block to clarify the branching logic.

@pkdash
pkdash requested a review from dtarb May 19, 2026 19:03
@dtarb

dtarb commented May 19, 2026

Copy link
Copy Markdown
Owner

It is still a bit confusing to me, but I'll take your word for it and merge.

@dtarb
dtarb merged commit 60c2e2c into Develop May 19, 2026
1 check passed
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