Advertisement
ellenlee218

Drawing Maps in Mathematica

Jan 29th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. (*Use the definitions of area1, area2, and area3 provided in the blog post. Below is the basic map.*)
  2. Show[
  3. GeoGraphics[{EdgeForm[Black], FaceForm[Green], Polygon[area1]
  4. }],
  5. GeoGraphics[{EdgeForm[Black], FaceForm[Red], Polygon[area2]
  6. }],
  7. GeoGraphics[{EdgeForm[Black], FaceForm[Blue], Polygon[area3]
  8. }]
  9. ]
  10.  
  11. (*This is the flag map. If you use the With[] and/or Map[] command, you can add many more countries with less effort.*)
  12. Show[
  13. GeoGraphics[{
  14. GeoStyling[{"Image", area1["Flag"]}],
  15. area1["Polygon"]
  16. },
  17. GeoBackground -> GeoStyling["Satellite"]],
  18. GeoGraphics[{
  19. GeoStyling[{"Image", area2["Flag"]}],
  20. area2["Polygon"]
  21. },
  22. GeoBackground -> GeoStyling["Satellite"]],
  23. GeoGraphics[{
  24. GeoStyling[{"Image", area3["Flag"]}],
  25. area3["Polygon"]
  26. },
  27. GeoBackground -> GeoStyling["Satellite"]]
  28. ]
  29.  
  30. (*The map of our glorious leader. img1 is a picture of Mr. President and img2 is a picture of a wall. Replace them with whatever you'd like.*)
  31. Show[
  32. GeoGraphics[{
  33. GeoStyling[{"Image", area1["Flag"]}],
  34. area1["Polygon"]
  35. },
  36. GeoBackground -> GeoStyling["Satellite"]],
  37. GeoGraphics[{
  38. GeoStyling[{"Image", area2["Flag"]}],
  39. area2["Polygon"]
  40. },
  41. GeoBackground -> GeoStyling["Satellite"]],
  42. GeoGraphics[{
  43. GeoStyling[{"Image", area3["Flag"]}],
  44. area3["Polygon"]
  45. },
  46. GeoBackground -> GeoStyling["Satellite"]]
  47. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement