Problems trying to change projection

Marc Compte mcompte at SIGTE.UDG.ES
Mon Jan 15 08:13:50 PST 2007


Hi everyone,

We have a Mapserver drawing some layers from a local WMS service. The 
WMS service can only provide the data in EPSG:23031 (utm) but we need to 
be able to query our Mapserver by using EPSG:4326 (latlong).

If I understood it right Mapserver should be able to change the 
projection of my layers, right?

We tried specifying the incoming coordinate system inside the LAYER 
object in the mapfile. Then specify the working (output) coordinate 
system inside the PROJECTION object in the mapfile.

But when querying the mapserv using geographic coordinates we get a 
white image, no data.

Mapfile looks something like ...

---------------------------------
PROJECTION
"init=epsg:4326" #longlat datum wgs84 elipsoide wgs84
END

LAYER     NAME orto
    MINSCALE 100
    MAXSCALE 10000
    TYPE RASTER
    STATUS default
    CONNECTIONTYPE WMS
    CONNECTION 
"http://galileo.icc.es/wms/servlet/icc_orto5m_r_r?REQUEST=map&LAYERS=Ortofoto_5000&STYLES=&FORMAT=png&version=1.1.1" 

    METADATA
        "wms_name" "Ortofoto_5000"
        "wms_server_version" "1.1.1"
        "wms_srs" "epsg:23031"
        "wms_format" "image/png"
    END

    PROJECTION
        "init=epsg:23031"
    END
END
-----------------------------------

In the mapfile we have tried both using the EPSG code and specifying the 
proj/datum/ellipsoid, for both the output and the layer definition, and 
the result is still the same.

If we specify "proj=utm" (instead of "proj=longlat"), "ellps=WGS84" and 
"datum=WGS84" and we query mapserver using utm coordinates we seem to be 
getting a good map, with the new datum and ellipsoid. But changing the 
projection doesn't seem to work.

Any help will be greatly appreciated. Thanks,

Marc Compte



More information about the MapServer-users mailing list