[mapserver-dev] Development of new functions "combine symbols" and "displace symbols"

thomas bonfort thomas.bonfort at gmail.com
Tue Jan 25 05:54:36 EST 2011


Olaf,
as Tamas stated, I think the use case targeted here is compelling, and
this would be a nice addition to mapserver.
I'll speak for the rendering side of the propositions, as I'm not
familiar enough with the featureinfo side of mapserver.

* both propositions require a non trivial rework of the rendering
pipeline, as feature would have to be accumulated, processed and then
renderered, instead of the way that is currently done which is to
render them as they arrive from the data source.
* we can probably leverage the startLayer/endLayer calls, to trigger
the fact that features should not be rendered directly, but be
accumulated and rendered in a second phase.
* the clustering strategy would be non trivial, are there any known
algorithms or libraries that we could leverage?
* for the displacement, we might be able to leverage the actual
labelcache drawing code,  and only have to add the possibility of
trying several locations for the label's symbol if the first one is
already occupied by a previous symbol.
* the end-of-february limit seems very ambitious, given the need for
an RFC, the quantity of work to accomplish and the feature-freeze of
the end of january.

best regards,
thomas

On Tue, Jan 25, 2011 at 10:56, Olaf Knopp <olaf.knopp at wheregroup.com> wrote:
> Hi Tamas,
>
> thanks for you reply. Please check my answers below:
>
> Combine Symbols:
> 1. I would prefer a centroid.
> 2. I think it should be possible to click on the combined symbol and get a
> featureInfo of all combined objects. Perhaps this is not useful if you have
> many symbols. What do you think?
> 3. For the moment we only need point layers.
>
> Displace Symbols:
> 1. It should be possible to configure each layer (PRIORITY, DISTANCE of the
> relocation and a displace ANGLE) to avoid the relocated symbols cover each
> other.
> 2. Yes this is a problem. I think we can't solve it, because it could create
> a "cascade" in the mapfile with every symbol relocated. Perhaps we should
> limit the function only to objects with the same coordinates. You will then
> have to configure the mapfile and layers to provide the best map design.
> 3. This could be a nice option. Perhaps with something like "ARROW YES/NO"
> and a line symbol configured for the arrow. For our project it is not
> necessary.
> 4. For the moment we only need point layers.
>
> values of COMBINEUNITS and DISPLACEUNITS?: I think it would be best to use
> the options that are mostly availible in MapServer:
> [pixels|feet|inches|kilometers|meters|miles|nauticalmiles], but to make the
> configurement easy pixels is the option of choice, because you can "play"
> with symbolsize and the displacedistance.
>
> By the way. Do you know how this would work? Do we have to give a concept to
> the steering commitee e.g. for the options like "COMBINEUNITS,
> DISPLACEUNITS, COMBINESYMBOLS" etc? Do you commit to the MapServer trunk?
>
> Greetings
> Olaf
>
> ********************************************
> Die WhereGroup ist umgezogen ...
>
> Seit dem 01.01.2011 lautet unsere neue Adresse:
>
> WhereGroup GmbH & Co. KG
> Eifelstraße 7
> 53119 Bonn
>
> Alle Telefonnummern und eMail-Adressen
> bleiben unverändert.
> ********************************************
> -----------------------------------
> WhereGroup GmbH & Co. KG
> Eifelstraße 7
> 53119 Bonn
> Germany
>
> Olaf Knopp
> Geschäftsführer
>
> Fon: +49 (0)228 / 90 90 38 - 27
> Fax: +49 (0)228 / 90 90 38 - 11
>
> info at wheregroup.com
> www.wheregroup.com
> Amtsgericht Bonn, HRA 6788
> -----------------------------------
> Komplementärin:
> WhereGroup Verwaltungs GmbH
> vertreten durch:
> Olaf Knopp, Peter Stamm
> -----------------------------------
>
> Am 24.01.11 23:12, schrieb Tamas Szekeres:
>
> Hi Olaf,
>
> The idea looks compelling to me, however I would have some further questions
> before trying to propose a reasonable approach to this feature:
>
> Combine Symbols:
> 1. What would be the position of the combined feature? Would this be one of
> the features have been combined or some other location (like the centroid of
> the features)?
> 2. What did you mean by 'not to lose the FeatureInfo'? Does it mean that the
> invidual features should be retrieved from a 'query by point option' and not
> the combined feature?
> 3. Would this option affect only the point layers (with marker symbols) or
> some other types as well? (like annotations)
>
> Displace Symbols:
> 1. How the position of the relocated symbols should be calculated? Would
> this be a constant vector assigned to each layer/class?
> 2. What should be happened when a relocated symbols would overlap with some
> other symbols because of the relocation?
> 3. Shouldn't the relocation be displayed somehow? (ie. by using a line or
> arrow along with the symbol)
> 4. What type of layers would be affected? (points only?)
>
> Assuming the distance threshold is specified in screen coordinates, what
> would be the possible values of COMBINEUNITS and DISPLACEUNITS?
>
>
> Best regards,
>
> Tamas
>
>
>
>
> 2011/1/24 Olaf Knopp <olaf.knopp at wheregroup.com>
>>
>>  Hello everybody,
>>
>> for a project we need some software development to be done. We think these
>> new features will become more important to provide modern and elegant maps
>> and therefore would be a great add-on for MapServer. As working titles we
>> call these functions "combine symbols" and "displace symbols".
>> Here follows a rough concept for the functions.
>>
>> 1. Combine symbols
>> This function combines symbols of the same layer (or class) to one symbol
>> containing the number of combined symbols if viewed in a certain scale.
>> For this you have to mark a layer/class e.g. by "COMBINESYMBOLS TRUE",
>> give a distance between the symbols (COMBINEDISTANCE xy, COMBINEUNITS …),
>> perhaps a MAXCOUNT etc. You will also have to define a symbol and the label
>> for the combination. It would be best no to lose the FeatureInfo and get a
>> list of templates after clicking on the combined symbol. You will find a
>> nice example of combined symbols here: http://www.verbeterdebuurt.nl/ (zoom
>> to the Netherlands).
>> By configuring a zoom range (e.g. COMBINEMAXSCALEDENOM,
>> COMBINEMINSCALEDENOM) you define in which scales the symbols should be
>> combined.
>>
>> 2. Displace Symbols
>> This function should relocate symbols of objects with same or similar
>> coordinates so they don't conceal each other or overlap.
>> For this you have to mark the mapfile e.g. by "DISPLACESYMBOLS YES" and
>> give a distance between symbols that should be displaced (DISPLACEDISTANCE
>> xy, DISPLACEUNITS …). Then you have to configure every layer similar to a
>> label by giving a priority, a displace distance and an displace angle.
>> You will also have to give a zoom range similar to the combine function
>> described above. FeatureInfo should still work by clicking on the moved
>> symbols.
>>
>> Who can develop this functions until the end of February? Is there anybody
>> else interested in these functions?
>> Please conctact us to discuss further details and to calculate a proposal.
>>
>> Greetings
>> Olaf Knopp
>>
>> --
>> ********************************************
>> Die WhereGroup ist umgezogen ...
>>
>> Seit dem 01.01.2011 lautet unsere neue Adresse:
>>
>> WhereGroup GmbH&  Co. KG
>> Eifelstraße 7
>> 53119 Bonn
>>
>> Alle Telefonnummern und eMail-Adressen
>> bleiben unverändert.
>> ********************************************
>> -----------------------------------
>> WhereGroup GmbH&  Co. KG
>> Eifelstraße 7
>> 53119 Bonn
>> Germany
>>
>> Olaf Knopp
>> Geschäftsführer
>>
>> Fon: +49 (0)228 / 90 90 38 - 27
>> Fax: +49 (0)228 / 90 90 38 - 11
>>
>> info at wheregroup.com
>> www.wheregroup.com
>> Amtsgericht Bonn, HRA 6788
>> -----------------------------------
>> Komplementärin:
>> WhereGroup Verwaltungs GmbH
>> vertreten durch:
>> Olaf Knopp, Peter Stamm
>> -----------------------------------
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>


More information about the mapserver-dev mailing list