SRS - layer with two valid EPSGcodes

Ed McNierney ed at TOPOZONE.COM
Tue Dec 6 18:44:52 PST 2005


Stefanie -

I am still not sure I understand - it might help to post the MAP file
that defines the grid layer and the other layers.

If the grid should "pass through the same coordinates even when the
geodetic datum changes", then I take it that you mean to change the
definition of the grid data when the output map image changes.  In other
words, if the requested output map is in projection A, the datum for the
grid is projection A's datum; if the requested output map is in
projection B, the datum for the grid is in projection B's datum.

That is, the grid itself actually moves on the Earth, so its coordinates
in the new datum are the same as the coordinates in the old datum.  It
is important to understand that you are really trying to create two (or
more) different grids.  That is why the option you do not favor -
creating two different layers with two different definitions - is really
the best way (I think) to do this.  You are really trying to define two
different grids.

You did not quite say it, but it sounds like you are implementing this
through the WMS interface.  Is that correct?  There are some things you
can do with the MapServer CGI interface that might help, but if you are
using WMS then you need to work within the limits of that interface.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396
ed at topozone.com

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Stefanie Weykam
Sent: Tuesday, December 06, 2005 7:20 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] SRS - layer with two valid EPSGcodes

Ok, perhaps I did not explain my case correctly:
The mesh is supposed to fit always to strait coordinates, lets say Y:
4.500.000 and then the next line would lay on 4.550.000 and so on...
This is an artificial grid, witch should pass through the same
coordinates even when the geodetic datum changes (of course, we would
keep the same UTM time zone).

I have tested this by drawing a point on top of the map before and then
again after the proyection change. The epsg codes I am trying out are:

# ED50 / UTM zone 30N
<23030> +proj=utm +zone=30 +ellps=intl +units=m +no_defs  no_defs <>

# ED50 / UTM zone 30N Espana y Portugal - not official <230301>
+proj=utm +zone=30 +ellps=intl +towgs84=-84,-107,-120,0,0,0,0
+units=m +no_defs no_defs <>

# ETRS89 / UTM zone 30N
<25830> +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs  no_defs <>

# WGS 84 / UTM zone 30N
<32630> +proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs
no_defs <>

The only way to get the point always on the grid is by not defining the
projection at layer level (so that it is taken for the same projection
as the web object).

If I specify any of these 4 epsg codes at layer level, I get different
results: With either ETRS89 or WGS84 I get a perfect fit as long as I
only change projections among these two. But with any of the other two
projections with ellipsoid International I get shifts of some 300m, and
they are different.

Perhaps a reprojection problem? It seems odd such a high error.


Stefanie



-----Mensaje original-----
De: Ed McNierney [mailto:ed at topozone.com] Enviado el: martes, 06 de
diciembre de 2005 15:18
Para: Stefanie Weykam; MAPSERVER-USERS at LISTS.UMN.EDU
Asunto: RE: [UMN_MAPSERVER-USERS] SRS - layer with two valid EPSGcodes


Stefanie -

Don't confuse the description of the source projection of the layer with
the client's request for the layer.

In MapServer you use the PROJECTION object inside a LAYER to inform
MapServer of the native projection used in the coordinates of the data
layer itself (the shapefile coordinates, for example).

Using a WMS request to that server, you can request a map be generated
using (a) a specified series of data layers and (b) output in a
particular projection, specified by EPSG code.

You wrote "if the datum is changed, the mesh should still fit to the
original coordinates and should not be reprojected".  I don't think
that's quite correct.  When you say "datum is changed" I assume you mean
that the WMS client requests an output map using a different datum,
correct?  If that is the case, then the original coordinates MUST be
reprojected - for every layer in your map.  The output map image should
still have the grid lines correctly aligned, since both the grid lines
and the map layers underneath them have been reprojected to the same
output projection and datum.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Stefanie Weykam
Sent: Tuesday, December 06, 2005 8:06 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] SRS - layer with two valid EPSGcodes

Yes, but this does not avoid reprojection of the layer if the client
chooses the other ellipsoid, does it? As an arctefact the grid lines
would be shifted several hundred meters in both directions.

So, what is the best way to handle this -perhaps unusual- situation?
- offering only one of these EPSG codes in order to force the client to
use the first datum?
- duplicate the layer and offer each in a different projection?? (I do
not really favour this one)
- any other suggestion??

st.

-----Mensaje original-----
De: Bart van den Eijnden [mailto:BEN at Syncera-ITSolutions.NL]
Enviado el: martes, 06 de diciembre de 2005 11:22
Para: MAPSERVER-USERS at LISTS.UMN.EDU; sweykam at TELELINE.ES
Asunto: Re: [UMN_MAPSERVER-USERS] SRS - layer with two valid EPSGcodes


AFAIK you just advertize using wms_srs METADATA (space delimited list).

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> Stefanie Weykam <sweykam at TELELINE.ES> 12/6/2005 10:41 AM >>>
> Hi list members,
>
I have a polygon layer, a mesh witch fits to exact coordinates on the
UTM grid.
If the datum is changed, the mesh should still fit to the original
coordinates and should not be reprojected.

I guess, I could work around this in our own application, but how do I
advertise this layer with several valid EPSG codes to clients?

> Thanks in advance,
> Stefanie
>



More information about the MapServer-users mailing list