wide lines not complete at the edges

rich.fromm nospam420 at YAHOO.COM
Thu Jan 3 20:42:51 EST 2008


I think this is likely a bug, but I'm first posting to the mailing list to
see if there might be some way I can control this with via my map file.

This is best seen by a picture.  [Hopefully attaching files worked; I
haven't attached files to msgs here before.]

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 attached images, the road network is rectangular, 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.  *.map files are pasted
inline below.

--- begin streetbug.agg.map ---
MAP
    NAME        streetbug-agg

    IMAGETYPE   AGG_Q
    OUTPUTFORMAT
        NAME 'AGG_Q'
        DRIVER AGG/PNG
        IMAGEMODE RGB
        FORMATOPTION "QUANTIZE_FORCE=ON"
        FORMATOPTION "QUANTIZE_DITHER=OFF"
        FORMATOPTION "QUANTIZE_COLORS=256"
    END
    
    EXTENT      -122.2914 37.8396 -122.2892 37.841

    ANGLE       0

    SIZE        640 480
    IMAGECOLOR  204 204 204

    LAYER
        NAME        LocalRoads
        STATUS      DEFAULT     # DEFAULT means on.  change to OFF to enable
via URL parameter (&layer=foo)
        TYPE        LINE
        CONNECTIONTYPE postgis
        CONNECTION "dbname=navteq user=navteq host=agua"
        DATA        "the_geom FROM streets"
        CLASS
            NAME        "Local Roads"
            STYLE
                COLOR       248 248 248
                WIDTH       11
            END
        END
    END
END
--- end streetbug.agg.map ---

--- begin streetbug.gd.map ---
MAP
    NAME        streetbug-gd

    IMAGETYPE   PNG
    
    EXTENT      -122.2914 37.8396 -122.2892 37.841

    ANGLE       0

    SIZE        640 480
    IMAGECOLOR  204 204 204

    LAYER
        NAME        LocalRoads
        STATUS      DEFAULT     # DEFAULT means on.  change to OFF to enable
via URL parameter (&layer=foo)
        TYPE        LINE
        CONNECTIONTYPE postgis
        CONNECTION "dbname=navteq user=navteq host=agua"
        DATA        "the_geom FROM streets"
        CLASS
            NAME        "Local Roads"
            STYLE
                COLOR       248 248 248
                WIDTH       11
            END
        END
    END
END
--- end streetbug.gd.map ---

-- 
View this message in context: http://www.nabble.com/wide-lines-not-complete-at-the-edges-tp14609249p14609249.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list