1
$\begingroup$

I used EntityValue to represent a map of a country.

 EntityValue[Entity["Country", "SouthKorea"], "Polygon"] /.  g_GeoPosition :> g["LongitudeLatitude"]

As a result of the above execution, the bounds are {{126,130},{33.2, 38.6}}. I want to adjust this range to {{126,130},{34.2, 38.6}} to get a Polygon. Any good way?

In fact, I want to remove the island at the bottom of the map of this country. So I want to get polygons for the map body of this country.

$\endgroup$
1
  • $\begingroup$ All three tags on this question were new. Please try to avoid creating entirely new tag names unless really necessary. Try to use existing tags when possible. $\endgroup$
    – Szabolcs
    Jul 26 at 5:51
4
$\begingroup$

First,

Graphics[EntityValue[Entity["Country", "SouthKorea"], "Polygon"] /.  
  g_GeoPosition :> g["LongitudeLatitude"], Frame -> True]

enter image description here

Second,

Graphics[EntityValue[Entity["Country", "SouthKorea"], "Polygon"] /.  
g_GeoPosition :> g["LongitudeLatitude"],PlotRange -> {{126, 129.5}, {34, 39}}, PlotRangeClipping -> True]

enter image description here

$\endgroup$
2
  • $\begingroup$ thank you very much. Exactly the result I wanted. $\endgroup$
    – user21427
    Jul 26 at 11:11
  • $\begingroup$ @user21427. Since this answer is what you wanted, I suggest you accept it $\endgroup$
    – m_goldberg
    Jul 27 at 23:49

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.