[mapserver-users] Two Layers not matching up when one is reprojected

Matthew Pettis matthew.pettis at gmail.com
Wed Nov 9 20:06:40 PST 2011


Hi,

I am reprojecting a layer of Minnesota county boundaries from epsg:26915 to
be commensurate with a google maps overlay (epsg:3857 aka epsg:900913).
 The county overlay is shifted down from the Google Maps map by I'm
guessing to be about 10 miles.  Relevant links to map with Openlayers,
straight mapserver map of counties, and the contents of the mapfile for the
counties are below.

My question is:  Do I have a data problem, or is it a mapserver
reprojection problem? Or is it a proj4 reprojection problem?

In addition, I am including the epsg codes and the proj.4 equivalents I got
from spatialreference.org and stuck into my proj/epsg file:

# got proj/epsg entries from proj4 link at:
http://spatialreference.org/ref/sr-org/6864/ :
<3785> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
<3857> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
<900913> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>

Help is much appreciated,

Thanks,
Matt

--------------------------------------------------------------------------------------------------------------------------
Map Overlays: http://209.20.85.148/scratch/google-state.htm

Straight mapserver output of county overlay:
http://209.20.85.148/cgi-bin/mapserv?mode=map&map=/var/www/scratch/county-epsg900913.map

County Map (epsg:26916) mapfile (county-epsg900913.map):
=========================

MAP
        ################
        # Map attributes
        ################
    IMAGETYPE   PNG

    # epsg:3785 http://spatialreference.org/ref/epsg/3785/proj4/
    # Convert
    EXTENT     -10779406.34 5378456.81 -9951631.67 6334157.39
    PROJECTION
        "init=epsg:3857"
    END

    SIZE        700 700
    IMAGECOLOR  244 244 244
    FONTSET     "/home/matt/votevis/mapserver-files/fonts/fonts.list"



        ################
        # Layers
        ################


        #---------------------------------------------------------------
        # Counties
        # Renders different thickness borders at different scales
        #---------------------------------------------------------------
    LAYER
        NAME                "county"
        DATA
 "/home/matt/votevis/MN/2010-election/shp/shp_counties"
        STATUS              default
        TYPE                polygon

        PROJECTION
            "init=epsg:26915"
        END

        CLASS
            NAME            "county_lg"
            STYLE
                OUTLINECOLOR  111 111 111
                COLOR         -1 -1 -1
                WIDTH         3
            END
        END

    END # Layer county

END # MAP


-- 
Do not seek to follow in the footsteps of the wise men of old. Seek what
they sought.

- Matsuo Munefusa (”Basho”)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111109/ca113fe3/attachment.htm>


More information about the MapServer-users mailing list