Author Topic: Pixels per Mile/Kilometer  (Read 663 times)

Offline NHawk

  • Silver Member
  • ****
  • Posts: 1787
Pixels per Mile/Kilometer
« on: July 23, 2010, 09:26:00 AM »
Has anyone every figured out what the exact relationship is between pixels and kilometers/miles in grayscale elevations?

I work with a pixel accuracy of about 201 meters per pixel and that seems to give the best results for me. But I really don't think that's correct. And my math brain died years ago so I just can't seem to come up with a logical relationship.

I would really like to work in a WYSIWYG environment with my other programs and this is a crucial part of doing that.
Most of the people you meet in life are like slinkies. Pretty much useless, but still bring a smile to your face when you push them down the stairs.
-------------------------------
Sometimes I think I have alzheimers. But then I forget about it and it's not a problem anymore.

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: Pixels per Mile/Kilometer
« Reply #1 on: July 23, 2010, 09:32:28 AM »
4096 / 512 = 8 pixels per mile.

Each pixel is 1/8th mile or 660 feet.

Oh, so your 201 is very close, it's 201.1679...

I use feet  x 0.304799995
« Last Edit: July 23, 2010, 09:36:48 AM by Easyscor »
Easy in-game again.
Since Tour 19 - 2001

Offline NHawk

  • Silver Member
  • ****
  • Posts: 1787
Re: Pixels per Mile/Kilometer
« Reply #2 on: July 23, 2010, 09:58:57 AM »
Dang! No wonder it works fairly well. I'm actually at 201.172. :D

Except a grayscale is 1024x1024. And with the resolution set to 804 meters (1/2 mile) it is WAY off.
« Last Edit: July 23, 2010, 10:01:26 AM by NHawk »
Most of the people you meet in life are like slinkies. Pretty much useless, but still bring a smile to your face when you push them down the stairs.
-------------------------------
Sometimes I think I have alzheimers. But then I forget about it and it's not a problem anymore.

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: Pixels per Mile/Kilometer
« Reply #3 on: July 24, 2010, 12:40:28 PM »
Isn't the elevation grayscale 1/2 mile per pixel?   (1024 pixels for 512 miles)

Offline NHawk

  • Silver Member
  • ****
  • Posts: 1787
Re: Pixels per Mile/Kilometer
« Reply #4 on: July 24, 2010, 02:17:15 PM »
That is what I always thought. But when working in a WYSIWYG terrain generator set at 804 meters per pixel what you get is far from what you see. As I said, the best results for me are obtained with the WYSIWYG set at 201 meters per pixel.

I was hoping for a little clarification on why this might be.
Most of the people you meet in life are like slinkies. Pretty much useless, but still bring a smile to your face when you push them down the stairs.
-------------------------------
Sometimes I think I have alzheimers. But then I forget about it and it's not a problem anymore.

Offline NHawk

  • Silver Member
  • ****
  • Posts: 1787
Re: Pixels per Mile/Kilometer
« Reply #5 on: July 24, 2010, 02:21:27 PM »
And now that I've posted the dumbest question in the world, lightning struck and I've figured out why the WYSIWYG is showing something different. It uses a 24 bit RGB that interprets the RGB values to 3 elevations within the 24 bit RGB value.
Most of the people you meet in life are like slinkies. Pretty much useless, but still bring a smile to your face when you push them down the stairs.
-------------------------------
Sometimes I think I have alzheimers. But then I forget about it and it's not a problem anymore.