-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor basemap service and rename to wmts_imagery #100
Conversation
fix bug with resulting bounding box add ability to clip image to bounding box
x = int(m * 2 ** (zoom_level - 1) * (lon / 180 + 1)) | ||
y = int(m / (2 * math.pi) * 2 ** zoom_level * | ||
(math.pi - math.log(math.tan(math.pi / 4 + math.radians(lat) / 2)))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W293 blank line contains whitespace
(math.pi - math.log(math.tan(math.pi / 4 + math.radians(lat) / 2)))) | ||
|
||
return x, y | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W293 blank line contains whitespace
return xmin_pixel, ymin_pixel, xmax_pixel, ymax_pixel | ||
|
||
|
||
@staticmethod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E303 too many blank lines (2)
p = param.ParamOverrides(self, kwargs) | ||
bbox = listify(p.bbox) | ||
|
||
tile_indices = self._get_indices_from_bbox(*bbox, p.zoom_level) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E999 SyntaxError: only named arguments may follow *expression
""" | ||
image_array = np.moveaxis(array, -1, 0) # move the bands from the last axis to the first. | ||
count, height, width = image_array.shape | ||
transform = rasterio.transform.from_bounds(*bbox, width, height) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E999 SyntaxError: only named arguments may follow *expression
test/data.py
Outdated
'NAM 181 AFWA Grid - Central America/Caribbean (12-km Resolution)'], | ||
['NAM 182 AFWA Grid - North Pacific (12-km Resolution)', | ||
'NAM 182 AFWA Grid - North Pacific (12-km Resolution)'], | ||
['NAM 190 Grid - CONUS (Staggered B-grid on rotated lat/lon grid using the 60 NAM hybrid levels(NAM 12km Domain))', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (132 > 120 characters)
test/data.py
Outdated
['NAM 182 AFWA Grid - North Pacific (12-km Resolution)', | ||
'NAM 182 AFWA Grid - North Pacific (12-km Resolution)'], | ||
['NAM 190 Grid - CONUS (Staggered B-grid on rotated lat/lon grid using the 60 NAM hybrid levels(NAM 12km Domain))', | ||
'NAM 190 Grid - CONUS (Staggered B-grid on rotated lat/lon grid using the 60 NAM hybrid levels(NAM 12km Domain))'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (133 > 120 characters)
test/data.py
Outdated
'NAM 215 AWIPS Grid - CONUS (20-km Resolution)'], | ||
['NAM 216 AWIPS Grid - Regional - Alaska (45-km Resolution)', | ||
'NAM 216 AWIPS Grid - Regional - Alaska (45-km Resolution)'], | ||
['NAM 218 AWIPS Grid - CONUS (12-km Resolution; full complement of pressure level fields and some surface-based fields)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (138 > 120 characters)
test/data.py
Outdated
['NAM 216 AWIPS Grid - Regional - Alaska (45-km Resolution)', | ||
'NAM 216 AWIPS Grid - Regional - Alaska (45-km Resolution)'], | ||
['NAM 218 AWIPS Grid - CONUS (12-km Resolution; full complement of pressure level fields and some surface-based fields)', | ||
'NAM 218 AWIPS Grid - CONUS (12-km Resolution; full complement of pressure level fields and some surface-based fields)'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (139 > 120 characters)
test/data.py
Outdated
'NAM 221 AWIPS Grid - High Resolution North American Master Grid (32-km Resolution)'], | ||
['NAM 221 AWIPS Grid - N. American Master (32-km Resolution) (GOES Simulated Brightness Temp.)', | ||
'NAM 221 AWIPS Grid - N. American Master (32-km Resolution) (GOES Simulated Brightness Temp.)'], | ||
['NAM 242 AWIPS Grid - Over Alaska (11.25 KM Resolution; full complement of pressure level fields and some surface-based fields)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (147 > 120 characters)
test/data.py
Outdated
['NAM 221 AWIPS Grid - N. American Master (32-km Resolution) (GOES Simulated Brightness Temp.)', | ||
'NAM 221 AWIPS Grid - N. American Master (32-km Resolution) (GOES Simulated Brightness Temp.)'], | ||
['NAM 242 AWIPS Grid - Over Alaska (11.25 KM Resolution; full complement of pressure level fields and some surface-based fields)', | ||
'NAM 242 AWIPS Grid - Over Alaska (11.25 KM Resolution; full complement of pressure level fields and some surface-based fields)'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501 line too long (148 > 120 characters)
test/data.py
Outdated
'default': | ||
'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{Z}/{Y}/{X}', | ||
'range': [ | ||
['http://c.tile.openstreetmap.org/{Z}/{X}/{Y}.png', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E126 continuation line over-indented for hanging indent
test/data.py
Outdated
'default': 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/' | ||
'{Z}/{Y}/{X}', | ||
'range': [ | ||
['http://c.tile.openstreetmap.org/{Z}/{X}/{Y}.png', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E126 continuation line over-indented for hanging indent
@sdc50 why are all the notebooks have output being deleted when this was already done in the Quest Updates PR? |
Hold off on this. I renamed the |
@sdc50 The only way that I've had success with name changes is from within PyCharm. |
Did you use 'git mv' typically you have to do the rename in a isolated commit. If I remember right, I've had issues in the past when mixing renaming and edits to the same file in a single commit. |
I wonder how the ipynb checkpoints got committed when it is in our gitignore file.. Also you still have the WMTS example notebook deleted in this PR. |
It still says that the WMTS notebook has been deleted. |
@AaronV77 make sure to clean up the commit messages when you |
fix bug with resulting bounding box
add ability to clip image to bounding box