<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is it possible to generate a bounding box around a set of coordinates in JMP ? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-generate-a-bounding-box-around-a-set-of/m-p/51031#M28974</link>
    <description>&lt;P&gt;All,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; If I have a set of coordinates, is there a geo-spatial function that can generate the coordinates of&amp;nbsp; a bounding box within specified radius.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; For e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Latitude = 47.80&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Longitude = -122.00&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; I would like to generate a bounding box around these coordinates within a 10 mile radius. Does JMP have any inbuilt functions for this ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; I was able to acheive this using "R" , except I would prefer to do this in JMP if at all possible. Also, the function documentation for the function accepts a fraction and not necessarily distance - not clear on what the fraction symbolizes. To eliminate the ambiguity , I prefer to do it in JMP if possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Lat &amp;lt;- 47.80
Lon &amp;lt;- -122.00
Rad &amp;lt;- 0.05 
BBox &amp;lt;- ggmap::make_bbox(lon = Lon,lat = Lat,f = Rad)&lt;/PRE&gt;</description>
    <pubDate>Sat, 10 Feb 2018 13:37:59 GMT</pubDate>
    <dc:creator>uday_guntupalli</dc:creator>
    <dc:date>2018-02-10T13:37:59Z</dc:date>
    <item>
      <title>Is it possible to generate a bounding box around a set of coordinates in JMP ?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-generate-a-bounding-box-around-a-set-of/m-p/51031#M28974</link>
      <description>&lt;P&gt;All,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; If I have a set of coordinates, is there a geo-spatial function that can generate the coordinates of&amp;nbsp; a bounding box within specified radius.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; For e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Latitude = 47.80&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Longitude = -122.00&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; I would like to generate a bounding box around these coordinates within a 10 mile radius. Does JMP have any inbuilt functions for this ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; I was able to acheive this using "R" , except I would prefer to do this in JMP if at all possible. Also, the function documentation for the function accepts a fraction and not necessarily distance - not clear on what the fraction symbolizes. To eliminate the ambiguity , I prefer to do it in JMP if possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Lat &amp;lt;- 47.80
Lon &amp;lt;- -122.00
Rad &amp;lt;- 0.05 
BBox &amp;lt;- ggmap::make_bbox(lon = Lon,lat = Lat,f = Rad)&lt;/PRE&gt;</description>
      <pubDate>Sat, 10 Feb 2018 13:37:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-it-possible-to-generate-a-bounding-box-around-a-set-of/m-p/51031#M28974</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-02-10T13:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to generate a bounding box around a set of coordinates in JMP ?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-generate-a-bounding-box-around-a-set-of/m-p/51063#M29001</link>
      <description>&lt;P&gt;Not sure what you intend to use the bounding box for, but I have used something like below&amp;nbsp;to control the "zooming" of Graph Builder maps by JSL (quick adaptation from the metric system).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
// Desired map central position and distance to view boundary
Lat = 40.782222; //Latitude
Lon = -73.965278; //Longitude
Rad = 7; // miles

// Calculate bounding box coordinates with geodetic approximation (WGS84)
a = 6378137; // Radius of earth at equator (m)
e2 = 0.00669437999014; // eccentricity squared
m = 1609.344; // 1 mile in meters
r = Pi() / 180; // convert to radians
//Distance of 1° latitude (miles)
d1 = r * a * (1 - e2) / (1 - e2 * Sin(Lat * r) ^ 2) ^ (3 / 2) / m;
//Distance of 1° longitude (miles)
d2 = r * a * Cos(Lat * r) / Sqrt(1 - e2 * Sin(Lat * r) ^ 2) / m;

//Bounding box coordinates
{minLat, maxLat} = {Lat - Rad / d1, Lat + Rad / d1};
{minLon, maxLon} = {Lon - Rad / d2, Lon + Rad / d2};
//––––––––––––––––––––––––––––––––––––––––––––––––––

//Example map 
dt = Open("$SAMPLE_DATA/SAT.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(Variables(X(:Longitude), Y(:Latitude)), Elements(Points(X, Y)));
Report(gb)[FrameBox(1)] &amp;lt;&amp;lt; Background Map(Images("Street Map Service")); Wait(1);

//Set bounding box (Manhattan, ~13 miles long)
Report(gb)[ScaleBox(2)] &amp;lt;&amp;lt; {Min(minLat), Max(maxLat)};
Report(gb)[ScaleBox(1)] &amp;lt;&amp;lt; {Min(minLon), Max(maxLon)};
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Feb 2018 22:17:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-it-possible-to-generate-a-bounding-box-around-a-set-of/m-p/51063#M29001</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2018-02-11T22:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to generate a bounding box around a set of coordinates in JMP ?</title>
      <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-generate-a-bounding-box-around-a-set-of/m-p/51064#M29002</link>
      <description>&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Uncharted/Sunshine-Map/ba-p/21004" target="_blank"&gt;This post&lt;/A&gt; will point you to &lt;A href="http://www.movable-type.co.uk/scripts/latlong.html" target="_blank"&gt;this site&lt;/A&gt; that describes the haversine formula for calculating distances between points on the globe and other useful formulas. I used the formulas in the section&amp;nbsp;&lt;EM&gt;Destination point given distance and bearing from start point&lt;/EM&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;to create a circle of points around the center location. In my post, I used a distance that went 90 degrees away in every direction. 10 miles will be a fraction of a degree. (At least that's the way I think I did it. With a little luck there are some comments in the JSL.)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Projected circle of sunlight" style="width: 643px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2382i0E6481E230E18539/image-size/large?v=v2&amp;amp;px=999" role="button" title="10335_map.png" alt="Projected circle of sunlight" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Projected circle of sunlight&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 00:17:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-it-possible-to-generate-a-bounding-box-around-a-set-of/m-p/51064#M29002</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2018-02-12T00:17:37Z</dc:date>
    </item>
  </channel>
</rss>

