[mapserver-users] Rotating a map
Dave Howlett
davehowlett at sympatico.ca
Fri Jan 11 15:13:23 PST 2002
Yes using Proj can help you out there. It may depend on what type of projection you intend to use. I'm using a
Lambert Conformal Conic projection and can turn the map by changing what is specified as my central meridian.
This is my normal output projection for Canada:
PROJECTION
"proj=lcc"
"ellps=GRS80"
"lat_0=49"
"lon_0=-95"
"lat_1=49"
"lat_2=77"
END
If I change lon_0 to -5 then the image will be rotated by 90 degrees clockwise, and St. John's ends up becoming the
Miami of Canada.
Hope this helps!
Dave
Tyler Mitchell wrote:
> Frank Warmerdam wrote:
>
> >As it happens GDAL will read these in and use these rotational
> coefficients
> >when going through the resampling process, so the image gets rotated back
> >to north-up. You can accomplish the same thing by putting rotational
> >coefficients in a world file. The above file would have a world file that
> >looks like this:
>
> Will this only apply to an image layer as it is loaded?
> What about changing the whole map before it is display in the browser - any
> ideas?
>
>
> Frank Warmerdam
> <warmerdam at pobox.com> To: Tyler Mitchell <TMitchell at lignum.com>
> Sent by: cc: UMN MapServer <mapserver-users at lists.gis.umn.edu>
> owner-mapserver-users at lists.g Fax to:
> is.umn.edu Subject: Re: [mapserver-users] Rotating a map
>
>
> 01/10/2002 05:49 PM
> Please respond to warmerdam
>
>
>
> Tyler Mitchell wrote:
>
> > Hi guys, what would you do to rotate the orientation of your map? Is
> > using Proj realistic or not?
> > I saw some emails back in July about this question - has anyone gone
> > anywhere with this idea?
>
> Tyler,
>
> I have successfully used the resampling code in MapServer to do some
> rotation of an ortho image. In my particular test the georeferencing
> information in a GeoTIFF file included rotational coefficients as shown
> here:
>
> warmerda at gdal[483]% listgeo small.tif
> Geotiff_Information:
> Version: 1
> Key_Revision: 1.0
> Tagged_Information:
> ModelTransformationTag (4,4):
> 0.999978707 -0.0065257527 0 467086.89
> -0.0065257527 -0.999978707 0 5365917.48
> 0 0 0 0
> 0 0 0 1
> End_Of_Tags.
> Keyed_Information:
> End_Of_Keys.
> End_Of_Geotiff.
>
> As it happens GDAL will read these in and use these rotational coefficients
> when going through the resampling process, so the image gets rotated back
> to north-up. You can accomplish the same thing by putting rotational
> coefficients in a world file. The above file would have a world file that
> looks like this:
>
> warmerda at gdal[487]% more small.tfw
> 0.9999787070
> -0.0065257531
> -0.0065257527
> -0.9999787072
> 467087.3871740954
> 5365916.9739565337
>
> Please feel free to contact me if you have problems settings this up and
> doing it. It is a rather esoteric use of the mapserver resampling logic.
>
> PS. I have placed this text in the Wiki as:
>
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?RotatingImages
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
>
> I set the clouds in motion - turn up | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list