[Cartoweb-users] CartoWeb and projections & dynamic filtering

Sebastian Albrecht albrecht at fielax.de
Wed Aug 24 04:43:03 EDT 2005


Hi Alexandre,

at the moment I try to understand CartoWeb but it is not very easy
although I have an - unusual for most open source projects - very
advanced documentation.

The plugin development might be very easy and comfortable but I don't
get the start. Which interfaces to implement, which methods to
implement and how to obtain a map object reference for doing own
changings to the map parameters? And when would these changings have
to be made and will other plugins simply overwrite them later in the
chain?!


> That would definitely be an interesting feature for CW3. I know that it 
> has already been suggested for some of our projects and might be 
> discussed during our next dev meeting. If you have any idea/solution, 
> don't hesitate to let us know about it!

After looking at the documentation and the code so far I would
certainly prefer a new plugin because this is what CartoWeb is
designed for.


On the other hand the LOCATION coreplugin is prepared best to be
extended with projection management. The projections could be set in
the location.ini like the scales are:

projection.0.name   = "latlong"             ; internal name
projection.0.label  = "Geographic / WGS 84" ; GUI label
projection.0.proj   = "init=epsg:4326"      ; Projection string or SRID

What is needed, too, is an initial extent for each projection (because
-180 -90 180 90 won't work for UTM projections f. e.) and it should be
possible to change the keymap (and keymap's extent) dynamically
dependent on the selected projection.

projection.0.extent = "-180 -90 180 90"        ; initial extent
projection.0.keymap = "keymap_geographic.gif"  ; keymap file name
projection.0.keymap_width  = "150"             ; keymap width
projection.0.keymap_height = "120"             ; keymap height
projection.0.keymap_extent = "-170 -70 170 80" ; keymap's extent might
                                               ; differ from map
                                               ; extent

You could define the keymaps separately, too, and just add a reference
to the projection:

projection.0.keymap = 1
keymap.1.file = "keymap_geographic.gif"
keymap.1....
...

The selection of projections could be done in a simple dropdown list
as it is used for the selection of predefined SCALES. At last you will
have to think about other .ini settings for activation, default
projections and so on.


A big disadvantage would certainly be the lot of code which would
further increase the complexity of the LOCATION coreplugin. This won't
fit to the idea of CartoWeb.


I'm really looking forward to your comments or ideas on this topic and
perhaps you have some tips for me to get "in the code".

Best regards,
Sebastian



More information about the Cartoweb-users mailing list