[mapguide-internals] MapGuide RFC 69 - Rendering Layer Styles

scotth at mpowerinnovations.com scotth at mpowerinnovations.com
Fri Jun 26 01:08:46 EDT 2009


Thats really backwards...since the catch all of default should be the last rule processed..and is for themes...it soud also be the lowest level geometry and label rendered as well...what kind of speed issues would this entail?

-----Original Message-----
From: Walt Welton-Lair <walt.welton-lair at autodesk.com>
Sent: Thursday, June 25, 2009 10:42 PM
To: MapGuide Internals Mail List <mapguide-internals at lists.osgeo.org>
Subject: RE: [mapguide-internals] MapGuide RFC 69 - Rendering Layer Styles

In MapGuide the order of the rules has no influence at all on the feature rendering order or the label rendering order.  Features are processed in the order that FDO returns them.  If a feature corresponding to a local road is returned by FDO before a feature corresponding to a highway, then the local road gets rendered first - below the highway.

Labels are processed in reverse order.  As we iterate over the features for all layers we build up a list of candidate labels.  Feature 1 on layer 1 adds its candidate labels, then feature 2 on layer 1, ...  Once all features on all visible layers have been processed we do the final processing of labels.  We iterate over the list of candidate labels in reverse order - top down in rndering order.  The last feature on the topmost layer has the first crack at displaying its labels.  Then the next-to-last feature on the topmost layer, and eventually you move to the next lower layer.

This is the way MapGuide has worked since the very beginning (pre-MapGuide 6.5).


I'm going to bed...

________________________________________
From: scotth at mpowerinnovations.com [scotth at mpowerinnovations.com]
Sent: Thursday, June 25, 2009 11:29 PM
To: Walt Welton-Lair; MapGuide Internals Mail List
Subject: RE: [mapguide-internals] MapGuide RFC 69 - Rendering Layer Styles

        using Style Order
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Welt That was confusing...Are you saying if I put complex linestyles on highways and labels but leave local roads   simplex thats why the local road labels render before myy complex linestyle roads no matter how far up I promote thhem in thhhe theme...I have the same problem with polygons...If I move townships, villages, or cities to the top of my theme of muniipalities it seems to have no effect onlabeling priority at all...it seems almost random

-----Original Message-----
From: Walt Welton-Lair <walt.welton-lair at autodesk.com>
Sent: Thursday, June 25, 2009 10:07 PM
To: MapGuide Internals Mail List <mapguide-internals at lists.osgeo.org>
Subject: RE: [mapguide-internals] MapGuide RFC 69 - Rendering Layer Styles
        using Style Order

"Can some elaborate on how the server currently handles this?"
Handles what?

The current code iterates once over the features (ignore the compound line style example).  For every feature it evaluates the filters defined by the rules (in the order that the rules are specified).  Once it finds a matching rule it applies its style to the feature.

With compound line styles we make a pass over all the features for each line style.  So for a compound line style containing M styles we make M FDO queries.

With rendering passes (RFC 29) we also iterate over all the layer's features for each rendering pass.  The more passes you define the more queries you make.

How to implement your RFC?

option 1
- Make a pass over the features for each rule.
- During each pass only render the features that satisfy the rule for that pass.
- If there are M rules you will make M FDO queries.
=> performance (speed) will be unacceptable for anything more than a few themes

option 2
- Make one query against all the features, remembering (in memory?) all the feature information (attributes / geometry) needed by stylization.
- During the initial pass render the features for the first rule.
- Iterate over the remaining rules in order, rendering the features for each rule.
=> performance (memory use) will be unacceptable for data sources containing large numbers of features
=> this approach goes against the MG architecture of not keeping feature data in memory during stylization (we already break that rule with labels which is what leads to high memory usage spikes for some maps)

option 3
- Allocate one image per rule.
- Make one query against all the features, and render each feature into the image corresponding to the rule it satisifes.
- Merge all images at the end.
=> performance (speed + memory) will be unacceptable for anything more than a few themes

option 4
???


________________________________________
From: mapguide-internals-bounces at lists.osgeo.org [mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer [zac.spitzer at gmail.com]
Sent: Thursday, June 25, 2009 10:36 PM
To: MapGuide Internals Mail List
Subject: Re: [mapguide-internals] MapGuide RFC 69 - Rendering Layer Styles      using Style Order

At the moment the only way to achieve this is to split the road network out into
multiple layers which is rather ugly.

Taking a road network as the example here, it's only at the
intersections where this
problem occurs.

Can some elaborate on how the server currently handles this?

z

On Fri, Jun 26, 2009 at 12:28 PM, Walt
Welton-Lair<walt.welton-lair at autodesk.com> wrote:
> "Proposed solution: Add support to the rendering engine to render layer styles in ordered passes."
>
> I'd like to see some concrete suggestions in the RFC on how to actually do this efficiently.  Just consider a conservative use case - say around 10  rules.
>
> Walt
> ________________________________________
> From: mapguide-internals-bounces at lists.osgeo.org [mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer [zac.spitzer at gmail.com]
> Sent: Thursday, June 25, 2009 9:29 PM
> To: MapGuide Internals Mail List
> Subject: [mapguide-internals] MapGuide RFC 69 - Rendering Layer Styles using    Style Order
>
> I have posted a new RFC
>
> http://trac.osgeo.org/mapguide/wiki/MapGuideRfc69
>
> --
> Zac Spitzer -
> http://zacster.blogspot.com
> +61 405 847 168
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>



--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals



More information about the mapguide-internals mailing list