# CellXdimensionDeg

## Recommended Posts

I've recently started experimenting with custom terrain textures. A problem I have is how do I calculate the numbers for the "CellXdimensionDeg and CellYdimensionDeg"? I know everything else about my image. I know the Latitude and Longitude of the Northwest corner of the image, I know the width and height in pixels of the image, plus the meters per pixel of the image. So is there maybe a math formula to that can help me figure this out?

##### Share on other sites
 Help AVSIM continue to serve you!Please donate today!

cellxdim and cellydim, and both in units of degrees per pixel.Thus, its a comparison between the geographic location in terms of degrees and the pixels within your image of the same two points.Airports or the length of runways can work. Just convert your degree:minutes:seconds to decimal degrees (remember 60 seconds to the minute, and 60 minutes to the degree).Bob B

##### Share on other sites

Hi supergalacticemperor .If you know all the dimensions of the image, then the following will work:Xspan = ( North Latitude - South Latitude )CellXdimensionDeg = ( Xspan) / ( Image height in pixels ) Yspan = ( East Longitude - West Longitude )CellYdimensionDeg = ( Yspan ) / ( Image width in pixels ) They are the spans in degrees, divided by the number of pixels ( cells ) in the image.Dick

## Create an account

Register a new account

• Tom Allensworth,
Founder of AVSIM Online

• ### Hot Spots

• Flight Simulation's Premier Resource!

AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!