3
$\begingroup$

Using Vers. 11.3.0, I've prepared Maps of the various Japanese Prefectures (ken). Here, I create 3 such maps, as follows:

ken = EntityValue[EntityValue[Entity["Country", "Japan"], "AdministrativeDivisions"]];

kenname = EntityValue[  EntityValue[Entity["Country", "Japan"], "AdministrativeDivisions"], "Name"];


Table[DynamicGeoGraphics[{GeoStyling["ReliefMap", FaceForm[Opacity[.6], Red]], EdgeForm[{Red, Thick}], GeoZoomLevel -> 10, EntityValue[ken[[1, i]], "Polygon"],    Frame -> {True, Black, Thick}, FrameLabel -> Text[EntityValue[ken[[1, i]], "Name"]], GeoScaleBar -> {"Metric"}, GeoLabels -> Text[kenname[[i]]], ImageSize -> {500, 500}}], {i, 1, 3}]

I get my maps, but with a few issues I am unable to resolve:

1) How do I get the GeoLabels to appear? Ideally, these prefectural names should be in a larger block text than the city names and placed in the center of the polygon? I tried to follow comments from a similar issue appearing in another question about GeoLabels, but couldn't make the suggestions work.

2) Why do my scale bars not appear on the map at any zoom? Aichi (first map) is small so would have expected it to have appeared at least in this map.

3) Is there a way to get more accurate polygons for these political subdivisions or improve on those that are curated with these administrative subdivisions? Those drawn from CountryData, outline coastal margins poorly as one increases the zoom level.

4) Is there a way to tint the interior of the polygon using a color with low opacity so that the relief map shows through but is tinted, say "Red" as I am trying to do without success using FaceForm?

5) Is there a way to generate both Japanese (Kanji) labels (such as appear for some of the larger cities), as well instead of the English (Romanji) labels that are intrinic to the background street map? I'd really like to place these side by side, since Kanji for Japanese place names are hard to read and learn.

$\endgroup$
0
$\begingroup$

I now have a way to address points 1) and 5) above, with the following code:

ken = EntityValue[EntityValue[Entity["Country", "Japan"],"AdministrativeDivisions"]];


kenname = ToUpperCase[First[StringSplit[#, ","]]] & /@ EntityValue[ EntityValue[Entity["Country", "Japan"], "AdministrativeDivisions"], "Name"];

kennameK = {"愛知県", "秋田県", "青森県", "千葉県", "愛媛県", "福井県", "福岡県", "福県","岐阜県", "群馬県", "広島県", "北海道", "兵庫県", "茨城県", "石川県", "岩手県", "香川県", "鹿児島県", "神奈川県", "高知県", "熊本県", "京都府", "三重県", "宮城県", "宮崎県", "長野県","長崎県", "奈良県", "新潟県", "大分県", "岡山県", "沖縄県", "大阪府", "佐賀県", "埼玉県",  "滋賀県", "島根県", "静岡県", "栃木県", "徳島県", "東京府", "鳥取県", "富山県", "和歌山県",  "山形県", "山口県", "山梨県"};


Column[Table[
DynamicGeoGraphics[{GeoStyling["ReliefMap", 
 FaceForm[Opacity[.3], Green]], EdgeForm[{Black, Thick}], 
GeoZoomLevel -> 10, EntityValue[ken[[i]], "Polygon"], 
Frame -> {True, Black, Thick}, 
FrameLabel -> Text[EntityValue[ken[[i]], "Name"]], 
GeoScaleBar -> {"Metric"}, GeoLabels -> True, 
ImageSize -> {500, 500}}, 
Epilog ->Inset[Style[kenname[[i]] ~~ "\n" ~~ kennameK[[i]], 20, Bold, 
  FontTracking -> "Extended"], ImageScaled[{.5, .5}]]], {i, 1,3}]]

This is a workaround using Epilog to place the GraphLables, as I have still not been able to get the GraphLabels to work. This takes advantage of Mathematica's ability to utilize Unicode directly.

Here, I have given only the first three prefectures in alphabetic order by restricting the range of i to 3 for purposes of example.

However, this raises additional issues, such as that text size is static, even as the maps are dynamically zoomed, the Kanji text can be made confusing by text in the GeoGraphics image itself, and the name of Gunma Prefecture as given in Wolfram Alpha as Gumma, which is not the preferred romanji-ization. Note, the need for the FontTracking -> "Extended" option since otherwise the text runs together.

$\endgroup$

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.