November 23, 2024, 12:28:31 PM

Author Topic: Looking for a relationship (between numbers!!)  (Read 1551 times)

Offline cc17926

  • Administrator
  • Hero Member
  • *
  • Posts: 547
  • TWC Today Curator
    • View Profile
  • WxStar Version: XL
Looking for a relationship (between numbers!!)
« on: July 23, 2010, 08:35:04 AM »
hey guys,
i am working with some radar stuff, but i am busting my head on the wall trying to figure this one solution out. in this topic, i am not going to cite any numbers inorder to keep this simple and sweet.

-I have two images, a basemap and radar data. given known area that the basemap and radar data populate (respectively), I am trying to overlay the radar data with a relationship between the numbers i can't quite figure out.
-The local area's center is plotted on an X, Y axis by both images, however the resolution on each image is different (and not the same aspect either).
-What i can always determine is what X, Y coordinate will be used on the basemap, however, i cannot co-relate a known X,Y coordinate for the radar data's center because the layer is a different size.

What I do have is a few examples of location exact X,Y coordinates both known on the basemap and on the radar data layer in an effort to determine a relationship between the numbers. I appologize, this may be very simple graphing arithmetic using proportions, but it has been many years since I touched a math problem. If someone is willing to lend a hand with this, please message me on AIM (cc17926). I will not leave you empty handed for any effort given!
Thank You!!

Offline Trevor

  • Ultimate Member
  • *
  • Posts: 1481
  • Gender: Male
    • View Profile
  • Cable Provider: Xfinity
  • WxStar Version: IntelliStar
Re: Looking for a relationship (between numbers!!)
« Reply #1 on: July 23, 2010, 09:41:16 AM »
Too much math for me, Brian!  :wacko:
 :P

Offline tuez13

  • Radio DJ, Graphic Designer & NWS Certified Storm Spotter & Tracker
  • Sr. Member
  • *
  • Posts: 265
  • Gender: Male
  • 2 fried chickens & a Coke...
    • View Profile
    • South Meadows PWS
  • Cable Provider: Midcontinent Comm.
  • HD Channel #: 619
  • HD WxStar ID #: 028785
  • SD Channel #: 3
  • SD WxStar ID #: 22928
  • WxStar Version: IntelliStar
Re: Looking for a relationship (between numbers!!)
« Reply #2 on: July 23, 2010, 01:36:30 PM »
First of all, just to let you know...I am terrible with math...so this may not help at all.  Would it be possible to determine where two cities are on the map and the radar data and then calculate how many pixels (or cm, in, whatever) are between the points?  If so, you could then divide the two and get a ratio % to reduce the size of the radar. 

As for positioning, the best method may be finding the radar site locations and basing it off of that.  I'm assuming you are going off of this or something like it?   :dunno:

phw115wvwx

  • Guest
Re: Looking for a relationship (between numbers!!)
« Reply #3 on: July 23, 2010, 01:37:21 PM »
You need to use a scaling factor here, and it will involve a proportion.  I will assume that your X and Y axes are centered perfectly on both maps.  Here's an example:

A small map goes from -30 to 30 on the X-axis and -40 to 40 on the Y-axis.  A big map goes from -70 to 70 on the X-axis and -90 to 90 on the Y-axis.  In order to scale the smaller map to the bigger map, you take your X-coordinate from the smaller map and multiply by the ratio of the largest positive X-coordinate of the bigger map over the largest positive X-coordinate of the smaller map, and that ratio would be 70/30 in this example.  For the Y-coordinate, you would take your Y-coordinate of the smaller map and multiply by the ratio of 90/40 (same procedure described before but this time with the Y-coordinates of both maps).

So, if you're at (12, -8) on your small map and want to convert that to the coordinates of your big map, you would find that the new X-coordinate would be X = 12 * (70/30) = 28, and your new Y-coordinate would be Y = -8 * (90/40) = -18.  Thus, (12, -8) on the small map correlates to (28, -18) on the big map.

I hope this helps, and I apologize to others reading this math drill! :P

Offline cc17926

  • Administrator
  • Hero Member
  • *
  • Posts: 547
  • TWC Today Curator
    • View Profile
  • WxStar Version: XL
Re: Looking for a relationship (between numbers!!)
« Reply #4 on: July 23, 2010, 05:17:18 PM »
hey patrick,
i thank you for the response, however I would say it is safe to assume that the regions are not proportional, and it is not clear where the maps are centered at any particular point. i am going to send you further details in a PM hoping you can figure this one out!
thank you!

You need to use a scaling factor here, and it will involve a proportion.  I will assume that your X and Y axes are centered perfectly on both maps.  Here's an example:

A small map goes from -30 to 30 on the X-axis and -40 to 40 on the Y-axis.  A big map goes from -70 to 70 on the X-axis and -90 to 90 on the Y-axis.  In order to scale the smaller map to the bigger map, you take your X-coordinate from the smaller map and multiply by the ratio of the largest positive X-coordinate of the bigger map over the largest positive X-coordinate of the smaller map, and that ratio would be 70/30 in this example.  For the Y-coordinate, you would take your Y-coordinate of the smaller map and multiply by the ratio of 90/40 (same procedure described before but this time with the Y-coordinates of both maps).

So, if you're at (12, -8) on your small map and want to convert that to the coordinates of your big map, you would find that the new X-coordinate would be X = 12 * (70/30) = 28, and your new Y-coordinate would be Y = -8 * (90/40) = -18.  Thus, (12, -8) on the small map correlates to (28, -18) on the big map.

I hope this helps, and I apologize to others reading this math drill! :P