Jump to content
Sign in to follow this  
rhumbaflappy

CellXdimensionDeg

Recommended Posts

Guest

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
Guest

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • 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!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...