Results 1 to 3 of 3

Math Help - Logarithmic scale calculation for mapping

  1. #1
    Newbie
    Joined
    May 2011
    Posts
    2

    Logarithmic scale calculation for mapping

    Hi,

    I've written a PHP script for plotting points on a map. Among other variables, the script accepts a lat/long and range. The range is in nautical miles and is represented by an integer. Currently I have limited the allowable range scale from 1 to 1000.

    The map is of the entire world and needs to be presented centred on the lat/long and zoomed in to an appropriate scale based on the range. The range is represented as a circle on the map with the passed lat/long as the centre. The circle should fill the map top to bottom.

    My problem lies in calculating a figure that is used to draw the map zoomed in appropriately based on the range. I don't have a clue how to calculate it as it is not linear. Currently I am using simple comparisons of the range value and assigning the "scale" a fixed value. This is far from ideal because I have to come up with this fixed value by trial and error and plug it in for a sufficient number of possible ranges. I'd like it to be a formula of course where scale = something based on range.

    Some of the fixed values I'm currently using are:

    1 nm = 1300000
    2 nm = 630000
    3 nm = 400000
    4 nm = 320000
    24 nm = 50000
    49 nm = 27000
    100 nm = 13000
    1000 nm = 1300

    Any help is appreciated as I am out of my depth here.

    Thanks,
    Doug
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    May 2011
    Posts
    7

    Simple relationship

    I think what you want is scale = 1300000/range

    You might have to fiddle with the 1300000 a bit.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    May 2011
    Posts
    2
    Talk about missing the obvious. Works like a charm. Thanks.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. A tough logarithmic scale question
    Posted in the Algebra Forum
    Replies: 1
    Last Post: September 13th 2011, 10:29 AM
  2. Replies: 0
    Last Post: July 19th 2011, 12:45 PM
  3. Complex open mapping & conformal mapping problems.
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: February 22nd 2011, 08:26 AM
  4. Log-scale
    Posted in the Math Topics Forum
    Replies: 5
    Last Post: December 22nd 2009, 11:14 AM
  5. Logarithmic scale problem
    Posted in the Algebra Forum
    Replies: 1
    Last Post: January 4th 2006, 12:40 PM

Search Tags


/mathhelpforum @mathhelpforum