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

Additional support for LINZ Maps Tiles #2048

Merged
merged 6 commits into from
Aug 21, 2022
Merged

Conversation

aluthfian
Copy link
Contributor

This is to add support for plotting NZ Map tiles, which is in EPSG:3857 (https://epsg.io/3857) already and in png format. Layer ID can be read in every layer's "About" tab, and the "subscription key" parameter is actually an API key given to the registered users. Tested in Python 3.8 and runs well.

Rationale

To add support to plotting LINZ Map Tiles, which are used widely within the Australia-New Zealand region.

Implications

More cartopy applicability for Australia-New Zealand users.

This is to add support for plotting NZ Map tiles, which is in EPSG:3857 (https://epsg.io/3857) already and in png format. Layer ID can be read in every layer's "About" tab, and the "subscription key" parameter is actually an API key given to the registered users. Tested in Python 3.8 and runs well.
@SciTools-assistant SciTools-assistant added the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label May 20, 2022
lib/cartopy/io/img_tiles.py Show resolved Hide resolved
lib/cartopy/io/img_tiles.py Outdated Show resolved Hide resolved
lib/cartopy/io/img_tiles.py Outdated Show resolved Hide resolved
lib/cartopy/io/img_tiles.py Outdated Show resolved Hide resolved
lib/cartopy/io/img_tiles.py Outdated Show resolved Hide resolved
lib/cartopy/io/img_tiles.py Outdated Show resolved Hide resolved
Copy link
Contributor

@greglucas greglucas left a comment

Choose a reason for hiding this comment

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

Is there a way to add a test for this if we have an environment variable for the subscription_key set? See here for a similar situation:

@pytest.mark.network
def test_azuremaps_get_image():
# In order to test fetching map images from Azure Maps
# an API key needs to be provided
try:
api_key = os.environ['AZURE_MAPS_SUBSCRIPTION_KEY']
except KeyError:
pytest.skip('AZURE_MAPS_SUBSCRIPTION_KEY environment variable '
'is unset.')

lib/cartopy/io/img_tiles.py Outdated Show resolved Hide resolved
Adding some descriptions as requested.
@greglucas
Copy link
Contributor

@aluthfian it looks like you haven't signed the CLA: Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form

Looks good though. My only other minor comment is that right now we have "API_key", "apikey", "subscription_key" as variable names for the services. I'm wondering if we should follow precedence here and use "apikey" for this as well? Or change the others at some point for consistency.

@SciTools-assistant SciTools-assistant removed the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Jul 1, 2022
@aluthfian
Copy link
Contributor Author

Yup, done! Thanks for reviewing!

Fian

@greglucas greglucas merged commit 79947f2 into SciTools:main Aug 21, 2022
@greglucas
Copy link
Contributor

Thanks, @aluthfian! Sorry for not checking on this in quite a while!

@QuLogic QuLogic added this to the 0.21 milestone Sep 3, 2024
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