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

Stephen Woodbridge woodbri at swoodbridge.com
Wed Nov 9 21:10:24 PST 2011


I use the following definition:

<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 
+x_0=0.0 +y_0=0 +k=1.0 +units=m +over +nadgrids=@null +no_defs  <>

and have never gad a problem. Give it a try.

-Steve W

On 11/9/2011 11:06 PM, Matthew Pettis wrote:
> 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 <http://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
> <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”)
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list