[mapserver-users] Examples using projection?

Mike Neuman mcn at engarde.com
Mon Jul 23 15:45:07 EDT 2001


> How are you projecting from old extent to 
> new? Doing just the corners will not work. 

  What is the proper way to do this? My formula is something like:

  lccX1,lccY1 = project(minlat, minlon)
  lccX2,lccY2 = project(minlat, maxlon)
  lccX3,lccY3 = project(maxlat, minlon)
  lccX4,lccY4 = project(maxlat, maxlon)

  new_extent(minx) = MIN(lccX1, lccX2, lccX3, lccX4)
  new_extent(maxx) = MAX(lccX1, lccX2, lccX3, lccX4)

  new_extent(miny) = MIN(lccY1, lccY2, lccY3, lccY4)
  new_extent(maxy) = MAX(lccY1, lccY2, lccY3, lccY4)

  Thanks!

-Mike



More information about the mapserver-users mailing list