[Mapserver-users] WMS client re-projection errors

Paul Ramsey pramsey at refractions.net
Tue Jul 13 17:35:37 EDT 2004


Relatively quick test / workaround:

Change your output projection to 26910, so that your vectors are being 
datum shifted but your image is not. If things start to work, then it 
would be fair to say that running the WMS through a datum shift was your 
(or rather mapserver's) problem.

If things are still not working, try setting your output projection to 
4326, so your vectors are being tranformed into the native projection of 
your raster. If things *still* are not lining up, then maybe there is 
something evil going on at the WMS level. Maybe the USGS service is not 
returning exactly the data it is asked for.

Paul

Matthew Perry wrote:

> Hi folks,
>   
>   I have some shapefiles in UTM, NAD27, Zone 10
> (epsg:26710) which I'm trying to overlay on a WMS
> shaded relief layer from the USGS in Geographic, WGS84
> (epsg:4326). The problem is a noticable distortion on
> the y axis. Features line up at the center of the
> image, but become more and more distorted as you move
> above or below the center-line. 
> 
> These three images should capture the idea (keep your
> eye on the peak in relation to the roads around it):
> 
> http://darkstar.rr.nu/download/mapserv1.jpg
> http://darkstar.rr.nu/download/mapserv2.jpg
> http://darkstar.rr.nu/download/mapserv3.jpg
> 
> 
> It is almost as though the WMS image is vertically
> compressed. However, when using a WMS image from
> terraserver (nad83), the map is aligned properly. I am
> running mapserver 4.2.0 on slackware linux with proj
> 4.4.7 & the datum shift files. Perhaps the requested
> WMS extents are not accurate because of the datum
> shift?? Is there something unique to shifting from
> wgs84 to nad27?? Anyone have any ideas?
> 
> 
> The abbreviated mapfile is as follows:
> -----------------------------
> MAP
> 
>   PROJECTION
>     "init=epsg:26710"
>     # UTM zone 10, Nad27, meters
>   END
> 
>   LAYER
>     NAME "Shaded_relief"
>     GROUP "bg"
>     STATUS OFF
>     TYPE RASTER
>     CONNECTIONTYPE WMS
>     CONNECTION
> "http://gisdata.usgs.net:80/servlet/com.esri.wms.Esrimap?servicename=USGS_WMS_NED&"
>     METADATA
>       "wms_srs"    "EPSG:4326"
>       "wms_title"    "Shaded Relief"
>       "wms_name"    "US_NED_Shaded_Relief"
>       "wms_server_version"    "1.0.0"
>       "wms_format"    "image/png"
>       "wms_group_title" "background"
>     END
>     PROJECTION
>       "init=epsg:4326"
>     END
>   END
> 
>   LAYER
>     NAME "Roads"
>     STATUS OFF
>     DATA "clip1"
>     TYPE LINE
>     TOLERANCE 2
>     DUMP true
>     METADATA
>       "wms_title"    "Klamath Basin Roads"
>       "wms_srs"    "EPSG:26710"
>       "wms_abstract" ""
>       "wfs_title"   "Klamath Basin Roads"
>       "wfs_srs"    "EPSG:26710"
>       "wfs_abstract" ""
>     END
>     CLASS
>       NAME "Roads"
>       STYLE
>         SYMBOL 1
>         SIZE 2
>         COLOR 0 0 0
>       END
>     END
>   END
> 
> END
> ---------------------------------
> 
> 
> Here is a link to a small, clipped shapefile if anyone
> feels inclined to try it out...
> 
> http://darkstar.rr.nu/download/clip1.zip
> 
> 
> ... and the urls to recreate the three sample images
> are:
> 
> http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/htdocs/klamath2/klamath2.map&mapext=594418.2128140883+4727975.646318736+602962.0885061937+4733853.945029724&mapsize=610+420&layers=Roads+Shaded_relief
> 
> http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/htdocs/klamath2/klamath2.map&mapext=594411.1981378223+4730115.122579895+602955.0738299277+4735993.421290884&mapsize=610+420&layers=Roads+Shaded_relief
> 
> http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/htdocs/klamath2/klamath2.map&mapext=594411.1981378224+4726172.874518348+602955.0738299278+4732051.173229337&mapsize=610+420&layers=Roads+Shaded_relief
> 
> -----------------------------------
> 
> Thanks... Any ideas are greatly appreciated!!
> 
> Matthew Perry
> Humboldt State University
> Natural Resources Planning
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list