SciTools / cartopy

Cartopy - a cartographic python library with matplotlib support
https://scitools.org.uk/cartopy/docs/latest
BSD 3-Clause "New" or "Revised" License
1.43k stars 365 forks source link

Provide data attribution capabilities. #32

Open pelson opened 12 years ago

pelson commented 12 years ago

Many of the datasets used by cartopy require attribution. Provide an interface which makes it easy to attribute a dataset which is automatically displayed at the bottom of a map.

pelson commented 12 years ago

@bjlittle would be a good candidate for this.

esc24 commented 12 years ago

Could you be more specific about by what you mean by attribution? An example perhaps?

rhattersley commented 12 years ago

For an example: when you use Google maps you'll see a small text overlay at the bottom saying something like "Map data (c) 2012 Google". That's what we need to reproduce. e.g. my_axes.reference('Map data (c) 2012 Ordnance Survey')

esc24 commented 12 years ago

Thank you. That's very clear.

rhattersley commented 12 years ago

NB. SciTools/iris#48 also requires a citation capability.

pelson commented 12 years ago

Interesting, thanks @rhattersley. On that basis, perhaps we should be targeting a standard matplotlib interface then.

rhattersley commented 12 years ago

Getting it into mpl would be nice as a mid-term goal. But that isn't going to happen within Iris 1.0 / cartopy 0.4 timescales is it?

pelson commented 12 years ago

No. There would definitely need to be an interim solution.

QuLogic commented 9 years ago

standard matplotlib interface

I guess this API would work here?

pelson commented 9 years ago

I guess this API would work here?

Yep. There is a complexity in bubbling up the attributions from the source datasets e.g.:

ax.add_wms(USGS_wms)

Should automatically add the annotation to the axes (it should be possible to remove as a user though). What makes things a little harder is that the attribution changes as you look at different areas/zoom levels even within the same data source - for that reason, I'd be surprised if there wasn't attribution information available from interfaces such as WMS etc.

Complexity aside - there is scope to keep the problem simple and do something as simple as checking whether an object being added to a GeoAxes has a attribution attribute, and automatically create the attribution box for you.