Sign in to follow this  
rhumbaflappy

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 this post


Link to post
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 this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this