EXTENT vs. actual pixel count - is this strange or not?

Rahkonen Jukka Jukka.Rahkonen at MMMTIKE.FI
Thu Apr 6 06:48:10 EDT 2006


Hi again,
 
While I was doing my simple performance tests one thing was wondering me. First I defined 300 meters wide and hight extent to my mapfile like this:
EXTENT 2540050 7220050 2540350 7220350 
On one corresponding line in the logfile I see this:
msDrawGDAL(): src=99,9299,601,601, dst=0,0,600,600\r

I suppose this is telling the starting point of my request as pixel coordinates and then the count of the pixels to be picked up. This is fine with my 0.5 metre pixel size. I believe one extra pixel is needed because it is the pixel centre that the coordinates are referring to. 
What I wonder is this: for an area of 600x600 meters mapfile and logfile look like this:
EXTENT 2540050 7220050 2540650 7220650 
msDrawGDAL(): src=99,8699,1202,1202, dst=0,0,600,600\r

and for an area of 1200x1200 meters like this:
EXTENT 2540050 7220050 2541250 7221250 
msDrawGDAL(): src=98,7498,2404,2404, dst=0,0,600,600\r
 
Should it possibly be "1201,1201" instead of "1202,1202" and "2401,2401" instead of "2404,2404"?
 
Regards,
 
-Jukka-



More information about the mapserver-users mailing list