Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#632 closed defect (fixed)

Polylines can disappear completely using AGG renderer

Reported by: jbirch Owned by: tonyfang
Priority: medium Milestone: 2.1
Component: Rendering Service Version: 2.0.1
Severity: major Keywords: agg, gd, renderer
Cc: External ID: 1161231

Description

At small scales, some lines can dissappear using the AGG renderer.

See the attached images, showing two different layers (polyline layer in orange, polygon layer in green) of Nanaimo parcels. At this full extent, the AGG renderer does not display the polylines, though the GD renderer does.

In this case, these lines were set as device space, 1 point.

Attachments (2)

render_gd.png (133.3 KB) - added by jbirch 10 years ago.
Lines display using GD renderer
renderer_agg.png (368.1 KB) - added by jbirch 10 years ago.
Lines don't display using the AGG renderer

Download all attachments as: .zip

Change History (11)

Changed 10 years ago by jbirch

Attachment: render_gd.png added

Lines display using GD renderer

Changed 10 years ago by jbirch

Attachment: renderer_agg.png added

Lines don't display using the AGG renderer

comment:1 Changed 10 years ago by tomfukushima

Hi Jason, Can you attach the layer definition for that layer that has the disappearing lines? I would like to see how it is styled so that we could try to reproduce. Thanks Tom

comment:2 Changed 10 years ago by tomfukushima

Oh, nevermind, I see it now... device space, 1 point.

comment:3 Changed 10 years ago by jbirch

I've also just noticed that this occurs with the polylines that are created for a polygon border, not just for polyline data sources.

comment:4 Changed 10 years ago by tonyfang

External ID: 1161231
Owner: set to tonyfang
Status: newassigned

comment:5 Changed 10 years ago by tonyfang

Resolution: fixed
Status: assignedclosed

In AGGRenderer::DrawScreenPolyline?, the outline renderer is used to draw the polylines if the line weight is thin (<= 3 pixels). For Parcels.sdf (from the Redding data set), it is 1 pixel. The outline renderer seems to be dropping vertices when they are overlapping -- thus the lines don't all get rendered when the polyline data is dense.

I removed the outline renderer code in AGGRenderer::DrawScreenPolyline?, forcing it to stroke the lines as polygons -- this is code path taken when the lines are thick (> 3 pixels). After doing so, all the dense lines are rendered, yielding the expected results.

There is a performance penalty. With my debug MG server, using the outline renderer, it takes 2.39 sec to render (albeit with missing lines). Using the stroke as polygon code, it takes 3.407 sec to render.

The user can get around this rendering slowness by using standard optimization techniques such as generalization and/or scale ranges. So this slowness will probably not affect our end users in general.

http://trac.osgeo.org/mapguide/changeset/3454

comment:6 Changed 10 years ago by zspitzer

AGG with 2.0 was already a big performance penalty over 1.2 with GD, a 30% slow down is pretty damn painful, especially when it comes to tiled maps which exacerbates the problem as that's roughly 30% times 20 for the average full screen display. ouch...

would it be possible to add a trace warning for this maybe with the new logging api?

comment:7 Changed 10 years ago by tonyfang

I just want to clarify the numbers from above. The times quoted refer to the time spent to stylize the layer on the debug MG server. So if you factor in the time to transfer the data from the server to the client (which should be the same for both), other server processing, and client processing, then the performance penalty isn't quite as significant.

As a comparison, I just tried running the same test with GD Renderer, it took ~1.7 sec to stylize the layer on the debug MG server when rendering the same data. And the DWF Viewer takes ~4.6 sec.

Can you provide more details about your trace warning? When exactly did you want it to occur and what do you want it to say?

comment:8 Changed 10 years ago by zspitzer

probably getting into a little bug spam here, but mapguide rendering is a bit of a black box performance wise. I see tiles which render in 200s or 60s whilst the next tiles render in 1s of 10s. It would be nice to be able to pin point what the bottle necks are.

comment:9 Changed 10 years ago by tomfukushima

Milestone: 2.1
Note: See TracTickets for help on using tickets.