[mapserver-users] pointObj->project behaviour differences from 4.10 to 5.6 versions
Daniel Morissette
dmorissette at mapgears.com
Mon Apr 23 11:03:20 PDT 2012
EPSG:32630 is UTM Zone 30N ...
http://spatialreference.org/ref/epsg/32630/
A UTM coordinate system is defined for a limited area, a UTM zone has a
width of 6 degrees of longitude, in this case
EPSG:32630
WGS 84 / UTM zone 30N
WGS84 Bounds: -6.0000, 0.0000, 0.0000, 84.0000
It is very likely that you are getting random values from various PROJ
versions because your -116, -15 test coordinate is outside of the area
of validity of the EPSG:32630 coordinate system.
Daniel
On 12-04-23 9:39 AM, Juanma M. R. wrote:
> Hi,
>
> I have been doing more tests to try to identify exactly the problem and
> I ahve realized that, according to http://twcc.free.fr/, the coordinates
> returned when working with php_mapscript from version 4.10 are not
> correct. I am trying to get where is the problem, so that I can decide
> wether sorting out a The issue is that the function project returns
> different things depending on the server configuration:
>
> Input coordinates in Google Spherical Mercator:
> (-20500513.477395,-3641436.
> 715144)
>
> Server 1: proj 4.1.5 and MapServer 4.10 returns
> (-90270074.105905,-216622133.8792)
> Server 2: proj 4.1.7 and MapServer 5.6 returns
> (-20500513.477395,-3641436.715144)
> The World Coordinate Converter automatically transform the output CRS to
> UTM 60S, so I can't not validate the transformation with it.
>
> The issue is that I would like to understand the expected behaviour from
> this function, so that I can go on checking it and defining the best way
> to support the functionality or detecting a problem in servers
> configuration.
>
> The code is as follows:
>
> function project($x, $y, $srsIn, $srsOut)
> {
> $pointObj=ms_newPointObj();
>
> $pointObj->setXY($x,$y);
>
>
> $pointObj->project(ms_newProjectionObj("init=".strtolower($srsIn)),
> ms_newProjectionObj("init=".strtolower($srsOut)));
>
> $xout=$pointObj->x;
> $yout=$pointObj->y;
>
> $pointObj->free();
>
> return $xout.",".$yout;
> }
> ?>
>
>
> 2012/4/16 Lime, Steve D (DNR) <Steve.Lime at state.mn.us
> <mailto:Steve.Lime at state.mn.us>>
>
> The transformation is done in place, I’ve not had problems with it.
> What language? Can you post a code snippet?____
>
> __ __
>
> *From:*mapserver-users-bounces at lists.osgeo.org
> <mailto:mapserver-users-bounces at lists.osgeo.org>
> [mailto:mapserver-users-bounces at lists.osgeo.org
> <mailto:mapserver-users-bounces at lists.osgeo.org>] *On Behalf Of
> *Juanma M. R.
> *Sent:* Thursday, April 12, 2012 4:13 AM
> *To:* mapserver-users at lists.osgeo.org
> <mailto:mapserver-users at lists.osgeo.org>
> *Subject:* [mapserver-users] pointObj->project behaviour differences
> from 4.10 to 5.6 versions____
>
> __ __
>
> Dear list,
>
> I have a webgis application working with different CRS all over the
> world. I have realized that the behaviour from version 4.10 of the
> function pointObj->project differs from the one of version 5.6 from
> Mapserver. For example, I try to convert (-116,-15) in 4326 and in
> mapscript from version 4.10 it returns
> (-26158630.407638,-25040425.679281) when passing to 32630. On the
> other hand, in version 5.6 of mapscript it returns the original
> coordinates without transforming them.
>
> Is this intended or am I doing something wrong? Which is the
> intended behaviour of project function in MapServer 5.6?
>
> Best regards,
> --
> Juan Manuel Moreno Rivera.
> University of Castilla-La Mancha
> Albacete, Spain____
>
>
>
>
> --
> Juan Manuel Moreno Rivera.
> University of Castilla-La Mancha
> Albacete, Spain
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000
More information about the MapServer-users
mailing list