Skip to content

Commit

Permalink
Adjust gcp sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenwh committed Jun 25, 2024
1 parent 4be193c commit 7e576c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nansat/mappers/sentinel1.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ def test2(gcp_dim):

logging.debug("GCPY size: %d" % gcp_y)
logging.debug("GCPX size: %d" % gcp_x)
logging.debug("Pixel(s) size: %d" % pixel.size)

if gcp_y*gcp_x != pixel.size:
raise ValueError("GCP dimension mismatch")
if gcp_y*gcp_x > pixel.size:
gcp_x, gcp_y = test1(gcp_x-1, gcp_y-1)
if gcp_y*gcp_x != pixel.size:
raise ValueError("GCP dimension mismatch")

return int(gcp_y), int(gcp_x)

Expand Down

0 comments on commit 7e576c3

Please sign in to comment.