GeoGraphicsのオプションで,表示する緯線および経線を指定する.
GeoGridLines
GeoGraphicsのオプションで,表示する緯線および経線を指定する.
詳細
- 次は,GeoGridLinesに使える設定値である.
-
None 測地線格子は描かない Automatic 自動的に測地線格子を描く n 緯線と経線のおよその本数 Quantity[…] 角度量の倍数位置に置かれた測地線格子 {latgrid,longrid} 緯度と経度に別々に指定された測地線格子 - Automatic設定の場合,測地線格子は,通常は小数表示で桁数が最小になる座標の点に置かれる.
- 次の格子線オプションを,経度/緯度座標のそれぞれに与えることができる.
-
None 測地線格子は描かない Automatic 測地線格子の位置を自動的に選択する n 緯線と経線のおよその本数 Quantity[…] 角度量の倍数位置に置かれた測地線格子 {x1,x2,…} 指定位置に測地線格子を描く {{x1,style1},…} 指定されたスタイルの測地線格子 func xmin, xmaxに適用して測地線の格子オプションを得るための関数 - 経度あるいは緯度に正の整数 n が指定された場合は,「適切な」測地線格子が生成されるように,さまざまなヒューリスティックが適用される.結果として,実際に表示される格子の本数は厳密に n ではなくなることがある.
- GeoGridLines->n あるいはGeoGridLines->Automaticのとき,表示される格子の本数は,緯線と経線で異なることがある.
- Quantity指定については,角度量のみがサポートされている.
- 測地線格子関数 func[xmin,xmax]は,その他の任意の測地線格子オプションを返すことがある.
- AbsoluteOptionsを使ってAutomatic設定の際のGeoGridLines指定に使われる経緯度の明示的なリストを抽出することができる.
- GeoGridLinesStyleを使って測地線格子のスタイルを設定することができる.
例題
すべて開く すべて閉じる例 (4)
GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> Automatic, GeoBackground -> "Plain"]GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> {Range[0, 50, 5], Range[-150, -40, 10]}, GeoGridLinesStyle -> Yellow]GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> Automatic, GeoGridLinesStyle -> Directive[Thick, Dashed, Orange]]GeoGraphics[GeoModel -> "Mars", GeoGridLines -> Quantity[15, "AngularDegrees"], GeoProjection -> "WinkelTripel"]スコープ (9)
GeoGridLinesの位置 (5)
GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> Automatic]GeoGraphics[{Polygon[EntityClass["Country", "Europe"]]}, GeoGridLines -> Automatic]GeoGraphics[{GeoStyling[LightRed], Polygon[Entity["Country", "China"]]}, GeoBackground -> GeoStyling["ReliefMap"], GeoGridLines -> Automatic]GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> {Range[20, 50, 5], None}, GeoGridLinesStyle -> Gray]GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> {None, Range[-150, -40, 10]}, GeoGridLinesStyle -> Magenta]GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> {Range[20, 50, 5], Range[-150, -40, 10]}, GeoGridLinesStyle -> Yellow]GeoGraphics[Entity["Country", "UnitedStates"], GeoGridLines -> 20, GeoGridLinesStyle -> Orange]GeoGraphics[Entity["Country", "UnitedStates"], GeoGridLines -> {4, 20}, GeoGridLinesStyle -> Directive[Thin, Orange]]GeoGraphics[Entity["Country", "UnitedStates"], GeoGridLines -> Quantity[5, "AngularDegrees"], GeoGridLinesStyle -> Orange]GeoGridLinesのスタイリング (4)
GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> {{{20, Red}, {30, Orange}, {40, Yellow}, {50, Green}, {60, Blue}}, None}, GeoGridLinesStyle -> Black]With[{p = CountryData["UnitedStates", "CenterCoordinates"]}, GeoGraphics[Entity["Country", "UnitedStates"], GeoGridLines -> {{{p[[1]], Red}}, {{p[[2]], Blue}}}, GeoBackground -> "StreetMapNoLabels", GeoGridLinesStyle -> Black]
]GeoGridLinesStyleを使って全体的な測地線格子のスタイルを指定する:
GeoGraphics[Polygon[EntityClass["Country", "SouthAmerica"]], GeoGridLines -> Automatic, GeoGridLinesStyle -> {Blue, Orange}]個別にスタイル付けされた測地線格子をGeoGridLinesStyleとともに使うことができる(優先順位は前者が高い):
GeoGraphics[Polygon[EntityClass["Country", "SouthAmerica"]], GeoGridLines -> {{-60, {-50, Directive[Thick, Yellow]}, -40, -30, -20, -10, 0, 10, 20, 30}, {-90, -80, -70, {-60, Directive[Thick, Green]}, -50, -40, -30, -20}}, GeoGridLinesStyle -> {Blue, Orange}]各方向の xmin値および xmax値に適用される格子関数を指定する:
grids[min_, max_] := Table[If[EvenQ[i], {i, Red}, {i, Blue}], {i, Ceiling[min], Floor[max], 1}]GeoGraphics[Entity["Country", "Australia"], GeoGridLines -> grids]アプリケーション (2)
30°の倍数のところに実線を引き,10°の倍数のところに破線を引く:
styles[m_] := Table[{c, If[Mod[c, 30] == 0, Directive[Thick, Black], Dashed]}, {c, -m, m, 10}];GeoGraphics[GeoGridLines -> {styles[90], styles[180]}, GeoRange -> "World"]GeoGraphics[GeoGridLines -> Automatic, GeoProjection -> "Bonne", GeoRange -> "World"]AbsoluteOptions[%, GeoGridLines]特性と関係 (2)
GeoGraphics[EntityClass["Country", "Europe"], GeoGridLines -> Automatic, GeoBackground -> GeoStyling["ReliefMap"], GeoGridLinesStyle -> Blue]GeoGraphics[EntityClass["Country", "Europe"], GeoGridLines -> Automatic, GeoGridLinesStyle -> Orange]AbsoluteOptionsを使ってAutomatic設定で使われる格子を得る:
GeoGraphics[GeoRange -> "World", GeoGridLines -> Automatic]AbsoluteOptions[%, GeoGridLines]考えられる問題 (4)
GeoGridLinesスタイルに加えてGeoGridLinesStyleを指定すると,結果が変わることがある:
GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]]}, GeoGridLines -> {{{20, Red}, {30, Orange}, {40, Yellow}, {50, Green}, {60, Blue}}, None}, GeoGridLinesStyle -> #]& /@ {Opacity[1], Automatic}GeoGraphics[Entity["Country", "UnitedStates"], GeoGridLines -> Quantity[5, "AngularDegrees"]]GeoGraphics[Entity["Country", "UnitedStates"], GeoGridLines -> Quantity[500, "Kilometer"]]いくつかの測地関数についての整数の引数とオプション設定は,メートル単位の距離(あるいは半径)として解釈される:
With[{city = Entity["City", {"Rugby", "NorthDakota", "UnitedStates"}]}, GeoGraphics[{GeoDisk[city, 4.4*^6], Red, PointSize[Large], Point[city]}, GeoRange -> 4.5*^6, GeoGridLines -> Automatic]]しかし,整数の測地線格子指定は,表示すべき「適切な」グリッドラインのおよその本数を示す:
GeoGraphics[Entity["City", {"Rugby", "NorthDakota", "UnitedStates"}], GeoGridLines -> 5, GeoGridLinesStyle -> Pink]GeoPathを使って測地線の測地座標をインタラクティブに表示する:
GeoGraphics[{Table[Tooltip[GeoPath[{"Meridian", lon}], Row[{"lon = ", lon, Degree}]], {lon, -180, 180, 30}], Table[Tooltip[GeoPath[{"Parallel", lat}], Row[{"lat = ", lat, Degree}]], {lat, -90, 90, 15}]}, GeoProjection -> "Bonne"]おもしろい例題 (3)
GeoGraphics[GeoRange -> "World", GeoGridLines -> {Table[{RandomReal[{-90, 90}], Hue[RandomReal[]]}, {30}], Table[{RandomReal[{-180, 180}], Hue[RandomReal[]]}, {30}]}]With[{region = Entity["Country", "Australia"]}, With[{ranges = Append[#, 1]& /@ Round[GeoBounds[region]]}, GeoGraphics[{Polygon[region]}, GeoGridLines -> Range@@@ranges, GeoGridLinesStyle -> Directive[Opacity[.5], Yellow], GeoBackground -> GeoStyling["ReliefMap"]]
]
]Length[large = CityData[{Large, "UnitedStates"}]]largest = TakeLargest[EntityValue[large, "Population", "EntityAssociation"], 15]pos = CityData[#, "Coordinates"]& /@ Keys[largest];
points = Tooltip[Point[#1], #2]&@@@Transpose[{GeoPosition /@ pos, Keys@largest}];アメリカ合衆国の地図を,経緯度線が大都市を通るようにして表示する:
GeoGraphics[{Polygon[Entity["Country", "UnitedStates"]], PointSize[Medium], points}, GeoGridLines -> Transpose[pos], GeoBackground -> "ReliefMap", GeoGridLinesStyle -> GrayLevel[0.2, 0.5]]テクニカルノート
関連するガイド
-
▪
- 地図と地図製作
テキスト
Wolfram Research (2014), GeoGridLines, Wolfram言語関数, https://reference.wolfram.com/language/ref/GeoGridLines.html.
CMS
Wolfram Language. 2014. "GeoGridLines." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GeoGridLines.html.
APA
Wolfram Language. (2014). GeoGridLines. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoGridLines.html
BibTeX
@misc{reference.wolfram_2026_geogridlines, author="Wolfram Research", title="{GeoGridLines}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/GeoGridLines.html}", note=[Accessed: 08-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_geogridlines, organization={Wolfram Research}, title={GeoGridLines}, year={2014}, url={https://reference.wolfram.com/language/ref/GeoGridLines.html}, note=[Accessed: 08-November-2026]}