4
$\begingroup$

I need to generate a Europe map with given lattitue limit and longitute limit as shown in the attached figure. I want the map to be more detailed and colorful (attractive).

Furthermore, if I want to put some transparent cicles (with border latitute and longitude) on the map, how can i do it. Transparent circles means the map on the back should still be visible.

Map of Europe

$\endgroup$
3
  • 3
    $\begingroup$ Have you tried anything? $\endgroup$ – Kuba Nov 5 '18 at 12:45
  • 2
    $\begingroup$ Have you even looked "GeoProjection" in the documentation? You will find anything you need there. Even the transparent circles.. $\endgroup$ – ZaMoC Nov 5 '18 at 13:00
  • $\begingroup$ None of your previous questions' answers has been accepted. Don't they deserve it? Sometimes there are also unanswered comments asking for clarification. That may discourage people to answer your questions in future. Please take a tour: mathematica.stackexchange.com/tour $\endgroup$ – Kuba Nov 9 '18 at 8:54
11
$\begingroup$

Let me take a nap before I incorporate grid labels:

With[{range = { {25., 70.}, {-25., 45.}}}
, GeoGraphics[
    {
      {EdgeForm@Thick, FaceForm@None, GeoBoundsRegion[range]}
    }
  , GeoRange          -> range
  , GeoRangePadding   -> None
  , GeoProjection     -> {"Albers", "StandardParallels" -> {40, 60}}
  , GeoGridLines      -> {Range[30, 60, 15], Range[-15, 30, 15]}
  , GeoGridLinesStyle -> Directive[Dotted, GrayLevel[.7]]
  , ImagePadding      -> 10
  , GeoBackground     -> GeoStyling[{"Coastlines"
       , "Land" -> Gray, "Ocean" -> White, "Border" -> Black
    }]
  ]
 ]

enter image description here

Since there is no native way to specify GeoTicks etc. we need to generate them. One way is to

-> take our grid lines array -> extract theirs intersection with bounding area -> convert to Albers -> and Inset labels with offset at those calculated positions...

...boring, let's try to incorporate DynamicLocation and friends. Won't be shorter but maybe in future can be more general:

LabelGeoGridLines//ClearAll;
LabelGeoGridLines[x_,__]:=x;
LabelGeoGridLines[a:Annotation[{{dir__,lat:{__Line}},{dir2__,long:{__Line}}},"GeoGridLines",_],ranges_]:=Module[{temp}
, temp=a
; temp[[1,;;,2]]=MapIndexed[
    Function[{line,position}
    , With[{id=ToString[position]}
      , { DynamicName[line,id]
        , GridLabel[Extract[ranges,position],position[[1]]>1,id]
        }
      ]
   ]
  , temp[[1,;;,2]]
  , {2}
  ]
; temp
];

GridLabel[label_?NumericQ,True,id_]:=Text[Style[TextString[GeoPosition[{0,label}]]//StringSplit//Last, Black, 15],Offset[{0,-30},DynamicLocation[id,Automatic,Scaled[0]]]]
GridLabel[label_?NumericQ,False,id_]:=Text[Style[TextString[GeoPosition[{label,0}]]//StringSplit//First, Black, 15],Offset[{-30,0},DynamicLocation[id,Automatic,Scaled[0]]]]


 With[{range = { {25., 70.}, {-25., 45.}}, gridLines = {Range[30, 60, 15], Range[-15, 30, 15]}}
, GeoGraphics[
    {
      {EdgeForm@Thick, FaceForm@None, GeoBoundsRegion[range]}
    }
  , GeoRange          -> range
  , GeoRangePadding   -> None
  , GeoProjection     -> {"Albers", "StandardParallels" -> {40, 60}}
  , GeoGridLines      -> gridLines
  , GeoGridLinesStyle -> Directive[Dotted, GrayLevel[.7]]
  , PlotRangePadding  -> Scaled@.1
  , GeoBackground     -> GeoStyling[{"Coastlines"
       , "Land" -> Gray, "Ocean" -> White, "Border" -> Black
    }]
  , ImageSize -> 800  
  ] // Replace[
      #
    , a:Annotation[_,"GeoGridLines",_]:>LabelGeoGridLines[a,gridLines]
    , \[Infinity]
    ]& // DynamicNamespace

 ]

enter image description here

enter image description here

$\endgroup$
2
  • $\begingroup$ I'm wondering how could one display values of axis ticks on this sort of map. $\endgroup$ – ZonkoProducts Nov 8 '18 at 21:50
  • $\begingroup$ @AndrzejGolonka see my edit. $\endgroup$ – Kuba Nov 9 '18 at 8:48
4
$\begingroup$
GeoGraphics[
  { Polygon[Entity["GeographicRegion", "Europe"]]
  , Red, GeoDisk[Entity["City", {"Warsaw", "Mazowieckie", "Poland"}], Quantity[377, "Kilometers"]]}
, GeoRange -> {{25, 70}, {-25, 45}}
, GeoProjection -> "Albers"
, GeoBackground -> GeoStyling["CountryBorders"]
, GeoGridLines -> Automatic
, GeoGridLinesStyle -> Directive[Thin, Dashed, Gray]
]

enter image description here

$\endgroup$
2
  • 2
    $\begingroup$ I'd recommend to use the projection {"Albers", "StandardParallels" -> {30, 60}}, to decrease distortion between those two standard parallels. In order to get the shape of the original example, use GeoRangePadding -> None. $\endgroup$ – jose Nov 5 '18 at 22:29
  • $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat. $\endgroup$ – Kuba Nov 9 '18 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.