Re: libchamplain displaying GIS files.
- From: Jiří Techet <techet gmail com>
- To: Lorenzo Masini <lorenxo86 gmail com>
- Cc: libchamplain-list gnome org
- Subject: Re: libchamplain displaying GIS files.
- Date: Fri, 17 Sep 2010 17:18:05 +0200
On Fri, Sep 17, 2010 at 01:40, Lorenzo Masini <lorenxo86 gmail com> wrote:
> Il giorno gio, 16/09/2010 alle 20.06 +0200, Jiří Techet ha scritto:
>> Hi Guillemin,
>>
>> libchamplain has a fairly flexible system of map sources and renderers
>> now. What a renderer does is that based on coordinates it renders a
>> bitmap tile which is then displayed by libchamplain. We already have
>> one renderer that renders tiles from vector data - it's a renderer
>> based on the libmemphis library
>> (https://trac.openstreetmap.ch/trac/memphis/wiki/LibMemphis) which
>> renders tiles from OpenStreetMap vector files (in OSM format). I would
>> expect that there already exist similar libraries for SHP and KML (do
>> they?). So if there is a library that creates bitmaps from the shape
>> or kml files, it should be fairly easy to integrate it into
>> libchamplain.
>
> I think libchamplain is quite far to be a library suitable for GIS
> applications because only the mercator projection is supported _(for
> now).
Yes, good point. libchamplain is basically based on the fact that the
world is a huge plane where meridians and parallels are straight
perpendicular _lines_, and that the north, south, east and west are
always top, bottom, right, left, respectively. It would just be
confusing for the user to pan the map upwards and not to go directly
to the north. So for practical reasons we are restricted to
projections like Mercator or equirectangular projection.
>
> Live reprojection for raster data could be done using gdal library, but
> I think it's out of scope of libchamplain.
I just had a look and gdal really looks rather too heavy-weight. On
the other hand, if the rendering based on gdal is optional like
libmenphis, then why not...
>
> Talking about vector data, I think that every feature could be drawn on
> map, but the condition is that coordinate have to be in latlon decimal
> format.
> Maybe have all features primiteves (like points, lines, splines and
> polygons) in libchamplain could help.
>
> On the other side, render country boundaries could be verry expensive.
>
Yes, you can put some custom actors on top of libchamplain map already
(I would like to improve this for 0.10) as Tomaž does but it becomes
too expensive if your data set is huge and covers a larger area than
what you are displaying. So it's fine for e.g. visualizing your route
from a gps tracker but it's not good if you are rendering map data for
the whole country. Also if it's not implemented as a map source you'll
lose all the caching abilities libchamplain already has so you'll have
to re-render the map every time.
The rendering itself can be done using Cairo - it's already used by libmemphis.
>
> In the next release I'd like to concentrate on the frontend side of
>> libchamplain so this is not my top priority now but of course I will
>> gladly accept any patches if someone wishes to work on that.
>
> I'd like to implement on-map pan and zoom controls (something like
> google maps). Should them be useful?
Definitely. This is basically the architecture I would like to have in
0.10 - the map view would be basically empty (possibly showing the
license only) and there would be a set of "widgets" that you can
insert into the map view like the scale or the controls you propose.
The map view would emit some signals when its moved or zooms in/out
and the widgets could register for them so e.g. the scale would update
itself when the position on the map changes. Because also these
widgets would be clutter actors, the user could position them wherever
he wishes or even rotate or scale them. There would also be overlays
that move together with the map where polygons markers and other
custom drawings could be inserted.
Cheers,
Jiri
>
> cheers
> Lorenzo
>
>
> _______________________________________________
> libchamplain-list mailing list
> libchamplain-list gnome org
> http://mail.gnome.org/mailman/listinfo/libchamplain-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]