WMS and reprojection

Paul Hasenohr paul.hasenohr at JRC.IT
Thu May 26 01:20:13 PDT 2005


Hello Vincent,

I would suggest that you describe the projection in your mapfile, at least for debug purposes.
If you have a prj file coming e.g. with Arcgis, it is fairly easy.
Then you avoid using +pm=paris and specify lon_0.

For this WKT definition (probably equivalent to a LambertIIE):
PROJCS["France_IMAGE2000",GEOGCS["GCS_NTF",DATUM["D_NTF",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenw
ich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",600000.0],P
ARAMETER["False_Northing",2200000.0],PARAMETER["Central_Meridian",2.337229166666667],PARAMETER["Standard_Parallel_1",45.
898919],PARAMETER["Standard_Parallel_2",47.696014],PARAMETER["Latitude_Of_Origin",46.8],UNIT["Meter",1.0]]

I am using this projection section in my mapfile:
  PROJECTION
    "proj=lcc"
    "ellps=clrk80"
    "lat_1=45.898919"
    "lat_2=47.696014"
    "lat_0=46.8"
    "lon_0=2.337229166666667"
    "x_0=600000.0"
    "y_0=2200000.0"
    "units=m"
    "no_defs"
  END

Also check whether or not you need to use the +towgs84 parameter...

HTH
Paul

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of vincent.dacol
Sent: Thursday, May 26, 2005 9:17 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] WMS and reprojection

Hi Francois,

I have found what doesn't really work in my WMS server. The reprojection really work well now. But the probleme is the
(x,y) position the differents layers who are in local French epsg projection system. All are not at the right place.

I think it's a problem of PROJ4 epsg definition. But I don't realy know how solve it.

Have you some tips or technique to resolve that sort of problem?

Thank for your help.

Vincent




> Hi (again) Vincent,
>
> If you have a look to epsg file contained in proj 4.4.9
package :
> # NTF (Paris) / Lambert zone II
> <27572> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=-2.33722917
+k_0=0.99987742
> +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 
> +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  <>
> # NTF (Paris) / France II
> <27582> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=-2.33722917
+k_0=0.99987742
> +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 
> +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  <>
>
> Looks the same ... If you look to Lambert II Etendu (ie.
France II)
> parameters
>
http://www.ign.fr/telechargement/education/fiches/geodesie/projections.pdf
> It seems that for Lambert II zone 27572, y_0 should be
200000 and lon_0, 0 ?
> And for France II lon_0 should be 0 ! Anyone using French
coordinate systems
> having the same troubles ?
>
> I'm currently using these parameters for France II.
> <27582> +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0
+k_0=0.99987742
> +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 
> +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs  <>
>
> Any ideas ?
>
> Francois
>
> > -----Message d'origine-----
> > De : UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
> > part de vincent.dacol
> > Envoyé : mercredi 25 mai 2005 11:40
> > À : MAPSERVER-USERS at LISTS.UMN.EDU
> > Objet : [UMN_MAPSERVER-USERS] WMS and reprojection
> >
> > Hi everybody,
> >
> > I'm a student and I'm disovering the world of Mapserver and 
> > interoperabillity.
> >
> > I'm trying to use 2 WMS services in different projections,
> and one client to
> > display two layer from that server.
> >
> > But the reprojection didn't work in the client. The 2 layer
> obtain with the
> > 2 WMS server aren't display in the same projection.
> >
> > The projection of my WMS server 1 is "init=epsg:27571"
> > The projection of my WMS server 2 is "init=epsg:27582"
> >
> > This two server can serv :
> > "wms_srs"      "EPSG:27582 EPSG:27571"
> >
> > The projection I want to display with the client is
> "init=epsg:27582"
> >
> > When I use the 2 layers in local, there is no supperposition
> problem, the
> > picture obtain was fine, the reprojection work.
> >
> > But with the WMS client, the first layer is in it's own
> projection, and the
> > second too. So the 2 layer arn't supperposed, it seem there
> is no
> > reprojection.
> >
> > Is-it a reprojection probleme?
> >
> > My opignon is that a single mapfile with multiple
> connections to different
> > WMS server must only connect to server who are in the same
> projection.
> >
> > Maybe I'm wrong, I really new to Mapserver, but I have spend
> a lot of time
> > one this probleme, and the only solution I have find the
> solve it is to use
> > the same output projection in the client and in the WMS
server.
> >
> > But this solution isn't very logical for me. I want to
> connect to a server
> > who use is own projection, and can serve data in other
> predefined EPSG
> > projection. So a WMS client use a WMS layer has a local
> layer, with is own
> > projection output, and is abble to reproject the data obtain
> in the WMS
> > layer.
> >
> >
> > Thanks for the help (I really need it).
> >
> > Vincent
> >
> > Accédez au courrier électronique de La Poste :
www.laposte.net ;
> > 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)
> >
> >
> >
> > --
> > Ce message a ete verifie par MailScanner pour des virus ou
> des polluriels et
> > rien de suspect n'a ete trouve.
> >
> > Les donnees et renseignements contenus dans ce message sont
> personnels,
> > confidentiels et prives. Toute publication, utilisation ou
> diffusion, meme
> > partielle, doit etre autorisee.
> >
> > Any data and information contained in this electronic mail
> is personal,
> > confidential and secret. Any total or partial publication,
> use or
> > distribution must be authorized.
> >
> > --
> > Ce message a ete verifie par MailScanner pour des virus ou
> des polluriels et rien de suspect n'a ete trouve.
> >
> > Les donnees et renseignements contenus dans ce message sont
> personnels, confidentiels et prives. Toute publication,
utilisation ou
> diffusion, meme partielle, doit etre autorisee.
> >
> > Any data and information contained in this electronic mail
> is personal, confidential and secret. Any total or partial
publication, use
> or distribution must be authorized.
> >
> >
>
> Accédez au courrier électronique de La Poste : www.laposte.net ;
> 3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)
>
>
>
>
> --
> Ce message a ete verifie par MailScanner pour des virus ou
des polluriels et
> rien de suspect n'a ete trouve.
>
> Les donnees et renseignements contenus dans ce message sont
personnels,
> confidentiels et prives. Toute publication, utilisation ou
diffusion, meme
> partielle, doit etre autorisee.
>
> Any data and information contained in this electronic mail
is personal,
> confidential and secret. Any total or partial publication,
use or
> distribution must be authorized.
>
>
> --
> Ce message a ete verifie par MailScanner pour des virus ou
des polluriels et rien de suspect n'a ete trouve.
>
> Les donnees et renseignements contenus dans ce message sont
personnels, confidentiels et prives. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.
>
> Any data and information contained in this electronic mail
is personal, confidential and secret. Any total or partial publication, use or distribution must be authorized.
> 

Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)



More information about the MapServer-users mailing list