Last active
March 7, 2020 17:17
-
-
Save lakshmanok/580a45f76b6191b5b7ecc97a55b1c411 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_rectangle_geo(LATRES, LONRES, ORIGIN_LAT, ORIGIN_LON, rowno, startcol, linedata): | |
# find a rectangle of pixels with the same value, and represent that pixel instead | |
endcol = startcol | |
while (endcol < len(linedata)) and (linedata[endcol] == linedata[startcol]): | |
endcol = endcol + 1 | |
return create_geo(LATRES, LONRES, ORIGIN_LAT, ORIGIN_LON, rowno, startcol, endcol) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment