cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-51031%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%C2%BFEs%20posible%20generar%20un%20cuadro%20delimitador%20alrededor%20de%20un%20conjunto%20de%20coordenadas%20en%20JMP%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-51031%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ETodos%2C%20%3CBR%20%2F%3E%20Si%20tengo%20un%20conjunto%20de%20coordenadas%2C%20%C2%BFexiste%20una%20funci%C3%B3n%20geoespacial%20que%20pueda%20generar%20las%20coordenadas%20de%20un%20cuadro%20delimitador%20dentro%20del%20radio%20especificado%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20Por%20ejemplo%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BLatitud%20%3D%2047.80%20%3CBR%20%2F%3E%20Longitud%20%3D%20-122.00%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20Me%20gustar%C3%ADa%20generar%20un%20cuadro%20delimitador%20alrededor%20de%20estas%20coordenadas%20dentro%20de%20un%20radio%20de%2010%20millas.%20%C2%BFTiene%20JMP%20alguna%20funci%C3%B3n%20incorporada%20para%20esto%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20Pude%20lograr%20esto%20usando%20%22R%22%2C%20excepto%20que%20preferir%C3%ADa%20hacerlo%20en%20JMP%20si%20es%20posible.%20Adem%C3%A1s%2C%20la%20documentaci%C3%B3n%20de%20la%20funci%C3%B3n%20para%20la%20funci%C3%B3n%20acepta%20una%20fracci%C3%B3n%20y%20no%20necesariamente%20la%20distancia%2C%20no%20est%C3%A1%20claro%20en%20lo%20que%20simboliza%20la%20fracci%C3%B3n.%20Para%20eliminar%20la%20ambig%C3%BCedad%2C%20prefiero%20hacerlo%20en%20JMP%20si%20es%20posible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3ELat%20%26lt%3B-%2047.80%0ALon%20%26lt%3B-%20-122.00%0ARad%20%26lt%3B-%200.05%20%0ABBox%20%26lt%3B-%20ggmap%3A%3Amake_bbox(lon%20%3D%20Lon%2Clat%20%3D%20Lat%2Cf%20%3D%20Rad)%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-51064%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%C2%BFEs%20posible%20generar%20un%20cuadro%20delimitador%20alrededor%20de%20un%20conjunto%20de%20coordenadas%20en%20JMP%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-51064%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FUncharted%2FSunshine-Map%2Fba-p%2F21004%22%20target%3D%22_blank%22%3E%20Esta%20publicaci%C3%B3n%20%3C%2FA%3E%20te%20se%C3%B1alar%C3%A1%20a%20%3CA%20href%3D%22http%3A%2F%2Fwww.movable-type.co.uk%2Fscripts%2Flatlong.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20este%20sitio%20%3C%2FA%3E%20que%20describe%20la%20f%C3%B3rmula%20de%20largo%20alcance%20para%20calcular%20distancias%20entre%20puntos%20en%20el%20globo%20y%20otras%20f%C3%B3rmulas%20%C3%BAtiles.%20Utilic%C3%A9%20las%20f%C3%B3rmulas%20en%20la%20secci%C3%B3n.%20%3CEM%3E%20Punto%20de%20destino%20dada%20la%20distancia%20y%20el%20rumbo%20desde%20el%20punto%20de%20inicio%20%3C%2FEM%3E%3CSTRONG%3E%3C%2FSTRONG%3E%20para%20crear%20un%20c%C3%ADrculo%20de%20puntos%20alrededor%20de%20la%20ubicaci%C3%B3n%20central.%20En%20mi%20publicaci%C3%B3n%2C%20utilic%C3%A9%20una%20distancia%20que%20se%20alejaba%2090%20grados%20en%20todas%20las%20direcciones.%2010%20millas%20ser%C3%A1n%20una%20fracci%C3%B3n%20de%20un%20grado.%20(Al%20menos%20as%C3%AD%20creo%20que%20lo%20hice.%20Con%20un%20poco%20de%20suerte%20hay%20algunos%20comentarios%20en%20la%20JSL.)%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20643px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Projected%20circle%20of%20sunlight%22%20style%3D%22width%3A%20643px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F2382i0E6481E230E18539%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2210335_map.png%22%20alt%3D%22Projected%20circle%20of%20sunlight%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EProjected%20circle%20of%20sunlight%3C%2Fspan%3E%3C%2Fspan%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EC%C3%ADrculo%20proyectado%20de%20luz%20solar.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-51063%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20%C2%BFEs%20posible%20generar%20un%20cuadro%20delimitador%20alrededor%20de%20un%20conjunto%20de%20coordenadas%20en%20JMP%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-51063%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ENo%20estoy%20seguro%20de%20para%20qu%C3%A9%20pretende%20utilizar%20el%20cuadro%20delimitador%2C%20pero%20he%20usado%20algo%20como%20el%20siguiente%20para%20controlar%20el%20%22zoom%22%20de%20los%20mapas%20de%20Graph%20Builder%20mediante%20JSL%20(adaptaci%C3%B3n%20r%C3%A1pida%20del%20sistema%20m%C3%A9trico).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20default%20to%20here(1)%3B%0A%2F%2F%20Desired%20map%20central%20position%20and%20distance%20to%20view%20boundary%0ALat%20%3D%2040.782222%3B%20%2F%2FLatitude%0ALon%20%3D%20-73.965278%3B%20%2F%2FLongitude%0ARad%20%3D%207%3B%20%2F%2F%20miles%0A%0A%2F%2F%20Calculate%20bounding%20box%20coordinates%20with%20geodetic%20approximation%20(WGS84)%0Aa%20%3D%206378137%3B%20%2F%2F%20Radius%20of%20earth%20at%20equator%20(m)%0Ae2%20%3D%200.00669437999014%3B%20%2F%2F%20eccentricity%20squared%0Am%20%3D%201609.344%3B%20%2F%2F%201%20mile%20in%20meters%0Ar%20%3D%20Pi()%20%2F%20180%3B%20%2F%2F%20convert%20to%20radians%0A%2F%2FDistance%20of%201%C2%B0%20latitude%20(miles)%0Ad1%20%3D%20r%20*%20a%20*%20(1%20-%20e2)%20%2F%20(1%20-%20e2%20*%20Sin(Lat%20*%20r)%20%5E%202)%20%5E%20(3%20%2F%202)%20%2F%20m%3B%0A%2F%2FDistance%20of%201%C2%B0%20longitude%20(miles)%0Ad2%20%3D%20r%20*%20a%20*%20Cos(Lat%20*%20r)%20%2F%20Sqrt(1%20-%20e2%20*%20Sin(Lat%20*%20r)%20%5E%202)%20%2F%20m%3B%0A%0A%2F%2FBounding%20box%20coordinates%0A%7BminLat%2C%20maxLat%7D%20%3D%20%7BLat%20-%20Rad%20%2F%20d1%2C%20Lat%20%2B%20Rad%20%2F%20d1%7D%3B%0A%7BminLon%2C%20maxLon%7D%20%3D%20%7BLon%20-%20Rad%20%2F%20d2%2C%20Lon%20%2B%20Rad%20%2F%20d2%7D%3B%0A%2F%2F%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%E2%80%93%0A%0A%2F%2FExample%20map%20%0Adt%20%3D%20Open(%22%24SAMPLE_DATA%2FSAT.jmp%22)%3B%0Agb%20%3D%20dt%20%26lt%3B%26lt%3B%20Graph%20Builder(Variables(X(%3ALongitude)%2C%20Y(%3ALatitude))%2C%20Elements(Points(X%2C%20Y)))%3B%0AReport(gb)%5BFrameBox(1)%5D%20%26lt%3B%26lt%3B%20Background%20Map(Images(%22Street%20Map%20Service%22))%3B%20Wait(1)%3B%0A%0A%2F%2FSet%20bounding%20box%20(Manhattan%2C%20~13%20miles%20long)%0AReport(gb)%5BScaleBox(2)%5D%20%26lt%3B%26lt%3B%20%7BMin(minLat)%2C%20Max(maxLat)%7D%3B%0AReport(gb)%5BScaleBox(1)%5D%20%26lt%3B%26lt%3B%20%7BMin(minLon)%2C%20Max(maxLon)%7D%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
uday_guntupalli
Level VIII

Is it possible to generate a bounding box around a set of coordinates in JMP ?

All,
    If I have a set of coordinates, is there a geo-spatial function that can generate the coordinates of  a bounding box within specified radius. 

    For e.g. 

         Latitude = 47.80 
         Longitude = -122.00 

    

    I would like to generate a bounding box around these coordinates within a 10 mile radius. Does JMP have any inbuilt functions for this ? 

    

    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.

 

Lat <- 47.80
Lon <- -122.00
Rad <- 0.05 
BBox <- ggmap::make_bbox(lon = Lon,lat = Lat,f = Rad)
Best
Uday
1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Is it possible to generate a bounding box around a set of coordinates in JMP ?

Not sure what you intend to use the bounding box for, but I have used something like below to control the "zooming" of Graph Builder maps by JSL (quick adaptation from the metric system).

 

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 << Graph Builder(Variables(X(:Longitude), Y(:Latitude)), Elements(Points(X, Y)));
Report(gb)[FrameBox(1)] << Background Map(Images("Street Map Service")); Wait(1);

//Set bounding box (Manhattan, ~13 miles long)
Report(gb)[ScaleBox(2)] << {Min(minLat), Max(maxLat)};
Report(gb)[ScaleBox(1)] << {Min(minLon), Max(maxLon)};

View solution in original post

2 REPLIES 2
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Is it possible to generate a bounding box around a set of coordinates in JMP ?

Not sure what you intend to use the bounding box for, but I have used something like below to control the "zooming" of Graph Builder maps by JSL (quick adaptation from the metric system).

 

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 << Graph Builder(Variables(X(:Longitude), Y(:Latitude)), Elements(Points(X, Y)));
Report(gb)[FrameBox(1)] << Background Map(Images("Street Map Service")); Wait(1);

//Set bounding box (Manhattan, ~13 miles long)
Report(gb)[ScaleBox(2)] << {Min(minLat), Max(maxLat)};
Report(gb)[ScaleBox(1)] << {Min(minLon), Max(maxLon)};
Craige_Hales
Super User

Re: Is it possible to generate a bounding box around a set of coordinates in JMP ?

This post will point you to this site that describes the haversine formula for calculating distances between points on the globe and other useful formulas. I used the formulas in the section Destination point given distance and bearing from start point 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.)

Projected circle of sunlightProjected circle of sunlight

Craige

Recommended Articles