matplotlib / matplotlib/basemap

arcgisimage transparent argument suggestion

Open
#348 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
817
Forks
395
PR merge metrics
No merged PRs in 30d

Description

Hi there,
Some arcgis images should be transparent. For instance Ocean/World_Ocean_Reference which includes only labels. If user wants to add two arcgis images the second one must be obtained with the argument transparent=true. Ex:

m.arcgisimage(service='Ocean/World_Ocean_Base', xpixels = 1000, verbose=1)
m.arcgisimage(service='Ocean/World_Ocean_Reference', xpixels = 1000, verbose=1)

For now I just changed the function arcgisimage to always use transparent images (I can't see a reason not to):

...
basemap_url = \
"%s/rest/services/%s/MapServer/export?\
bbox=%s,%s,%s,%s&\
bboxSR=%s&\
imageSR=%s&\
size=%s,%s&\
dpi=%s&\
format=png32&\
transparent=true&\ <----------------- Here
f=image" %\
...

best
mma

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the arcgisimage function and the basemap_url construction shown in the issue. Clarify whether completion means adding a transparent argument or always requesting transparent PNGs, then verify the Ocean/World_Ocean_Base and Ocean/World_Ocean_Reference example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.