reprojecting WMS layer

Armin Burger armin.burger at GMX.NET
Thu Sep 30 17:01:32 EDT 2004


Thomas,

I got the impression that reprojecting WMS layers works well when the new projection is not too different from the original of the WMS server, e.g. re-projecting from a Gauss-Krueger to UTM. But I tried it once with reprojecting a WMS layer from lat/lon (epsg 4326) to a lambert azimuthal equal area projection of the map and the results were bad, especailly for low zoom level, like continental view.

In fact the two projections are very different and the lat/lon layer had to be very much distorted for that. It got better the more you zoomed in. It might be a very simplistic view but maybe there are not enough pixels left after the image is fetched from WMS server to stretch and bend the image so much to the new projection.

Armin

> Hello,

> I am still having the problem of reprojecting WMS layers into other
> projection.
> USGS provides it's Urban color ortho coverage only in epsg:4326 and I would
> like it to be in either local UTM zone or local state plate.

> I have wms_srs set and PROJECTION tag set to 4326 at the layer level and
> output projection set via the cgi interface (a method which works fine with
> reprojecting shape files) The 2 output image is almost identical. There is a
> small "rotation" effect visible if I switch back and forth from the 2
> images, but when I overlay a shapefile layer on it (which is correctly
> reprojected) the original projection 4326 creates a nicely overlayed image,
> while the reprojected one has the WMS and shape layer messed up, they do not
> correctly overlay.

> Can I send 2 jpg attachment to the list to demonstrate?

> The question therefore: is there any known trick with reprojecting WMS
> raster layer as opposed to locally stored raster and shape layer? Did
> anybody has this problem before?
> Help me out on this as I am stucked for weeks already.

> Here is my mapfile:
> MAP
>  NAME USGSUrban
>  SHAPEPATH      "/usr/local/mapdata/"
>  SIZE           600 400
>  IMAGETYPE      PNG24
>  IMAGECOLOR     0 0 0
>  WEB
>   IMAGEPATH      /usr/local/httpd/htdocs/tmp/
>  END
>  LAYER
>   NAME "SanFrancisco01"
>   TYPE RASTER
>         PROJECTION
>      "init=epsg:4326"
>         END
>   STATUS OFF
>   CONNECTION "http://gisdata.usgs.net:80/servlet/com.esri.wms.Esrimap/USGS_E
>   DC_Ortho_133Urban?"
>   CONNECTIONTYPE WMS
>   METADATA
>    "wms_srs"             "EPSG:4326"
>    "wms_name"            "SanFrancisco01"
>    "wms_server_version"  "1.1.0"
>    "wms_formatlist"      "image/png,image/jpeg"
>    "wms_format"          "image/png"
>   END
>  END
> END

> The 2 url which should generate to different projection of the WMS layer is:
> mapserv?mode=map&map=/usr/local/mapapp/map.map&layer=SanFrancisco01&mapext=-
> 122.226813776775+37.4764381661621+-122.213167520107+37.4835588561656&mapsize
> =600+400&map_projection=init%3Depsg:26910

> mapserv?mode=map&map=/usr/local/mapapp/map.map&layer=SanFrancisco01&mapext=-
> 122.226813776775+37.4764381661621+-122.213167520107+37.4835588561656&mapsize
> =600+400&map_projection=init%3Depsg:4326

> Let me know if anyone has some idea of what's going wrong here.

> Thanks

> Thomas




> ---------------------------------
> Do you Yahoo!?
> Express yourself with Y! Messenger! Free. Download now.



More information about the mapserver-users mailing list