Opened 16 years ago

Closed 13 years ago

#2464 closed defect (fixed)

wide lines not complete at the edges

Reported by: richf Owned by: sdlime
Priority: normal Milestone: 6.0 release
Component: MapServer C Library Version: 5.0
Severity: minor Keywords:
Cc: tbonfort

Description

This was originally posted to the mapserver-users mailing list in the following thread:

http://www.nabble.com/wide-lines-not-complete-at-the-edges-to14609249.html

What's going on is that it looks like the end of a line is determined by the point at which the center of the line reaches the edge of the map, not the points at which the edges of the line reach the edge of the map. This is significant if you have a line wider than 1 pixel, and it becomes more significant as the angle between the line and the edge becomes shallower.

In the example here, the lines are rectangular relative to one another, but offset a bit from a pure N/S/E/W grid. Look at what happens to the roads at the edges. They look like they end prematurely.

This happens when rendered in both AGG and GD. In AGG the cutoff is rounded; in GD the cutoff is straight horizontal or vertical.

The test.{shp,shx,dbf} files were created by creating the table in postgis described in test.sql, then outputting it with pgsql2shp.

Attachments (1)

simple.zip (6.1 KB ) - added by richf 16 years ago.

Download all attachments as: .zip

Change History (7)

by richf, 16 years ago

Attachment: simple.zip added

comment:1 by richf, 16 years ago

In case it matters, I'm using mapserver 5.0.0, compiled locally as follows, with locally compiled versions of gd 2.0.35 and agg 2.5:

MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=THREADS INPUT=POSTGIS INPUT=SHAPEFILE

comment:2 by sdlime, 16 years ago

Cc: tbonfort added
Milestone: 5.2 release
Status: newassigned

I looks like a clipping issue but I tried simply making the clipping rect far larger and that didn't help so something else is going on here. Sorry, should have picked up on this bug before now.

Note that switching the gd mapfile to use a circular brush changed the cap but the rendering artifacts remain.

Targeting 5.2 but more likely 5.2.1 or something like that.

Steve

comment:3 by richf, 16 years ago

This doesn't seem to have made it into the 5.2 release: http://trac.osgeo.org/mapserver/browser/tags/rel-5-2-0/mapserver/HISTORY.TXT

Should the milestone be advanced?

comment:4 by sdlime, 16 years ago

Milestone: 5.2 release5.4 release

Will back port if this is a MapServer issue. It doesn't look like a clipping problem, the lines make it to the rendering functions with ends outside the view port. I gotta come up with GD only test case.

Steve

comment:5 by tbonfort, 16 years ago

tested on mapserver 5.2 with AGG: the clipping doesn't occur anymore. those changes where made in #2411

comment:6 by tbonfort, 13 years ago

Milestone: 5.6 release6.0 release
Resolution: fixed
Status: assignedclosed

marking as fixed, after testing on 6.0.

the GD renderer still suffers from this problem, but this seems inherent to GD itself, not on how we clip the lines before feeding them in, so there's no way we can intervene.

Note: See TracTickets for help on using tickets.