ghorbani
(MA Ghorbani)
April 2, 2021, 8:11pm
1
Hi,
How do I apply the United State of America instead of the World in the “GeoRange” command?
In other words, I would like to specify two points on the USA country, NOT the World.
GeoListPlot[{WeatherData[{38.4916, -122.1241}],
WeatherData[{25.8175, -80.2858}]},
GeoBackground -> GeoStyling["ReliefMap"], GeoRange -> "World"]
jose
(Jose Martin-Garcia)
April 2, 2021, 8:53pm
2
Is this what you want?
GeoListPlot[{WeatherData[{38.4916, -122.1241}], WeatherData[{25.8175, -80.2858}]},
GeoBackground -> GeoStyling["ReliefMap"],
GeoRange -> Entity["Country", "UnitedStates"]]
ghorbani
(MA Ghorbani)
April 3, 2021, 4:34am
3
Thank you so much, Jose.
Is it possible to have a full border for the USA in the Relief Map?
jose
(Jose Martin-Garcia)
April 3, 2021, 3:19pm
4
You can add the polygon of the US in the GeoListPlot result with something like this:
GeoListPlot[{WeatherData[{38.4916, -122.1241}],
WeatherData[{25.8175, -80.2858}],
Polygon[Entity["Country", "UnitedStates"]]},
GeoBackground -> GeoStyling["ReliefMap"]]
(Note that now there is no need of the GeoRange specification, because we get the map bounds from its geo primitives.)
Or you can use GeoGraphics directly with something like
GeoGraphics[{Thick, GeoBoundary[Entity["Country", "UnitedStates"]],
GeoMarker@WeatherData[{38.4916, -122.1241}],
GeoMarker@WeatherData[{25.8175, -80.2858}]},
GeoBackground -> GeoStyling["ReliefMap"]]
jose
(Jose Martin-Garcia)
April 3, 2021, 7:11pm
6
I see. I used features of WL 12.2. You are probably using a previous version. Then try this:
GeoGraphics[{{EdgeForm[Directive[Black, Thick]], FaceForm[],
Polygon[Entity["Country", "UnitedStates"]]},
GeoMarker@WeatherData[{38.4916, -122.1241}],
GeoMarker@WeatherData[{25.8175, -80.2858}]},
GeoBackground -> GeoStyling["ReliefMap"]]
ghorbani
(MA Ghorbani)
April 3, 2021, 7:28pm
7
I really appreciate your help.
Regards,
Mohammad