Skip to content
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

Merged
merged 10 commits into from
Aug 20, 2018

Conversation

sdc50
Copy link
Member

@sdc50 sdc50 commented Aug 17, 2018

fix bug with resulting bounding box
add ability to clip image to bounding box

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))))

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

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

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)

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)

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))',

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))'],

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)',

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)'],

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)',

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)'],

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',

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',

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

@coveralls
Copy link

coveralls commented Aug 17, 2018

Pull Request Test Coverage Report for Build 347

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 69.529%

Totals Coverage Status
Change from base Build 333: 0.3%
Covered Lines: 7425
Relevant Lines: 10679

💛 - Coveralls

@AaronV77
Copy link
Collaborator

@sdc50 why are all the notebooks have output being deleted when this was already done in the Quest Updates PR?

@sdc50
Copy link
Member Author

sdc50 commented Aug 17, 2018

Hold off on this. I renamed the NoteBooks directory to notebooks, but it looks like git didn't pick up the new directory.

@AaronV77
Copy link
Collaborator

@sdc50 The only way that I've had success with name changes is from within PyCharm.

@dharhas
Copy link
Collaborator

dharhas commented Aug 20, 2018

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.

@AaronV77
Copy link
Collaborator

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.

@sdc50
Copy link
Member Author

sdc50 commented Aug 20, 2018

@dharhas thanks. git mv worked.
@AaronV77 I've got the notebooks added back in, so this PR should be ready to go.

@AaronV77
Copy link
Collaborator

It still says that the WMTS notebook has been deleted.

@sdc50
Copy link
Member Author

sdc50 commented Aug 20, 2018

@AaronV77 make sure to clean up the commit messages when you squash and merge.

@AaronV77 AaronV77 merged commit 35ae02b into erdc:master Aug 20, 2018
@sdc50 sdc50 deleted the bugfix/wmts_service branch August 20, 2018 14:57
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.

5 participants