Re: New feature suggestion: map source overlays

On Fri, Oct 7, 2011 at 12:50 AM, Jiří Techet <techet gmail com> wrote:
Hi Gerard,

On Thu, Oct 6, 2011 at 11:15, Gerard Toonstra <gtoonstra gmail com> wrote:
> Hello,
> One of the possible extensions that people may want to use champlain for is
> in GIS applications or
> simplified GIS viewers perhaps. These GIS related applications typically use
> multiple sources as 'overlays'.

The only reason why I haven't implemented it is that I don't know any
freely available source of such overlay data. The main data source is
OSM. If there was some good quality satellite map, we could display
OSM on top of it but OSM over OSM doesn't make much sense.

Do you know about some different map sources?

I had a look, but the license is always proprietary. Given the effort to create satellite data and such, I'd be surprised if those
images can be used in different contexts.

The main benefit would be to create manageable overlays for use in libchamplain. For example, some countries have
datasets available that show neighborhoods boundaries, counties and provinces. Some of those data sources have additional
statistics like crime rate, age groups, etc. Doing that with markers might lead to situations where 4,000 markers are active
at the same time.

Having said that, although the feature sounds nice, I also doubt that too many will actively use it, because it requires them
to generate the map tiles offline and this would take quite some time at high zoom levels. So it only makes sense to have a
feature like this if the effort to do it is low.


> The MapSourceChain is already amazing, but it works for a single layer only,
> namely the map data. My suggestion is to
> insert another chain on the map which is a chain of MapSourceChains, where
> the bottom layer is made up of opaque map tiles
> and layers higher up mostly transparent map data, custom generated by other
> processes as a set of tiles.

Even easier would be a flag to mark a map source (i.e. also chains
because chains are just special map sources - you can put chains
inside chains already) as overlay map source - such a map source would
continue loading tiles from the following sources even if it renders a
tile. The tiles from all map sources would be combined inside the
tile's actor.

I could implement it if I have time, it doesn't sound too difficult.

Sounds the easiest way to do this.

The chain api doesn't allow you to get at the underlying individual sources though. It would be handy to 
allow developers to access the individual sources as well, so that some of these properties can be set on the fly.

In terms of requirements:
- Allow the map source to be activated/deactivated, just like a show_all / hide_all call.
- Setting the 'alpha' of the loaded tiles may also be interesting.  (bottom layer of course should be opaque).
- Slight improvements in the API for manipulating chains and sources. E.g.. the "mapSourceDesc" feature in C doesn't work in Python (at least I couldn't get it to work).
- It's already possible to set the zoom levels for which the map source should be active... that would be a good test.
- It's possible that some people want to use the feature for slightly more dynamic data. So an option to "reload" tiles (and bypass caches) would be interesting for those as well.

Gerard Toonstra

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]