[mapserver-users] Projection

Thomas Hofmann thomas at savoy-truffle.de
Fri Jun 15 04:17:15 PDT 2012


Hello Arnd and list,

thanks for those hints :-)

2012/6/14 Arnd:
> Your map extent should something like this
>
> EXTENT 3186000 5210000 4006000 6156000
>
> PROJECTION
>  "init=epsg:2166"
>  #or "init=epsg:31467"
> END
>
> then your layer should show.
>
> Instead of Gauss-Krüger i would take EPSG:25832 (UTM32).
> It's the new official used projection for Germany .

After first hardcoding the projection and extent as supplied by you, I
came up with the following version, to project the original extent on
the fly.
$this is a "MapserverMap"

	$this->setProjection("init=epsg:4326");		// original projection of
the underlying data
	$this->setExtent(5.55, 47.2, 15.1, 55.1);	// extent according to that
original projection
	$this->setProjection("init=epsg:25832", true); // true also
"projects" units and extent to the new projection

I have not been aware of that last "true".

BTW:
I have programmed a wrapper around mapscript so that for instance
php-eclipse can do code-completion.
If somebody is interested in that, I would be glad to provide that to
the public. It also contains the documentation from the mapscript-API.
It is around mapscript as of version 5.6.5 and not thorougly tested,
as I only use a small subset of the whole functionality, but I am
quite confident, that its state is far enough...

Kind regards,
Thomas

p.s. I'll be afk for ten days.


More information about the mapserver-users mailing list