Group Abstract Group Abstract

Message Boards Message Boards

1
|
9.3K Views
|
6 Replies
|
1 Total Like
View groups...
Share
Share this post:

Plot array of geolocated data on a world map?

Posted 7 years ago
POSTED BY: Vincent Virgilio
6 Replies
POSTED BY: Vincent Virgilio
Posted 7 years ago

You never mentioned that requirement. As long as you know the geo bounding box of the image, use the method in my previous reply to select the points within that rectangle and then

image = Import["~/Downloads/VIIRS-I5.png"];
GeoListPlot[selected, GeoBackground -> GeoStyling[{"Image", image}]]

enter image description here

POSTED BY: Rohit Namjoshi
POSTED BY: Vincent Virgilio
Posted 7 years ago

I have run into the same issue when dealing with a large number of points. Filtering using GeoWithinQ is slow because it hits Wolfram's servers and will also fail for a large number of points. Filtering using GeoGridRange is also very slow. Outline of a workaround that I use.

geoPositions = RandomGeoPosition[Entity["Country", "UnitedStates"], 1000];

positions = geoPositions /. GeoPosition[p_] -> p; (* Extract coordinates *)

bounds = CoordinateBounds[positions]; (* Bounding box *)

(* Divide bounding box *)
lats = FindDivisions[First@bounds, 6];
longs = FindDivisions[Last@bounds, 6];

(* Subdivided bounding boxes *)    
grid = Table[{i, j}, {i, lats}, {j, longs}]; 

(* Rectangle for one subdivision *)
section = Rectangle[{35, -110}, {40, -100}];

(* Select positions in the rectangle *)    
selected = GeoPosition@Select[positions, RegionMember[section, #] &]

GeoListPlot[selected, 
 GeoBackground -> GeoStyling["SatelliteWithLabels"], GeoServer -> "DigitalGlobe"]

enter image description here

POSTED BY: Rohit Namjoshi
POSTED BY: Vincent Virgilio
Posted 7 years ago
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard