1
$\begingroup$

I want to resize the map of the country as below.

region = EntityValue[Entity["Country", "SouthKorea"], "Polygon"] /. g_GeoPosition :> g["LongitudeLatitude"]
newregion = RegionResize[region, 10]

However, newregion often stops with no results. Also, all previously executed information will be erased. This works mostly well for other countries. However, errors often occur in SouthKorea.

What causes RegionResize errors for maps of specific countries?

$\endgroup$
1
  • 1
    $\begingroup$ please report the bug to WRI $\endgroup$
    – Ali Hashmi
    Aug 31 '21 at 6:44
2
$\begingroup$

First I tried your example with "SchematicPolygon". Use separate cells for each of the following commands, if possible. I am showing the output of the last command.

region = EntityValue[Entity["Country", "SouthKorea"], 
   "SchematicPolygon"] /. g_GeoPosition :> g["LongitudeLatitude"]

RegionPlot[region]

newregion = RegionResize[region, 10]

RegionPlot[newregion]

RegionPlot[{region, newregion}]

enter image description here

Wierd behavior

Then I switched various other countries and notebook wouldn't evaluate properly and plot two different countries one on top of the other, unable to reassign region. Evaluation->Quit Kernel->Local was grayed out. So I terminated Mma and restarted. This time I used yet another country, and it remembered the last country. (persistence). Then I tried "SouthKorea" but this time with "Polygon". The image below shows that it can be done.

Obviously, this is strange behavior. I am on Mma 12.2 Win7-x64 8GB. It takes less than 5 seconds to do these calculations.

enter image description here

$\endgroup$
1
  • $\begingroup$ thank you. Helped a lot!! $\endgroup$
    – user21427
    Sep 1 '21 at 1:45

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.