GeoGridDirectionDifference[proj,loc,β]
gives the difference between the angle from north to direction β on the geo grid obtained with projection proj and the actual angle from north to direction β at location loc.
GeoGridDirectionDifference[proj,loc,αβ]
gives the difference between projected and unprojected angles from direction α to direction β.
GeoGridDirectionDifference
GeoGridDirectionDifference[proj,loc,β]
gives the difference between the angle from north to direction β on the geo grid obtained with projection proj and the actual angle from north to direction β at location loc.
GeoGridDirectionDifference[proj,loc,αβ]
gives the difference between projected and unprojected angles from direction α to direction β.
Details and Options
- Geo grid direction difference is a measure of how much angles between geo directions get expanded or contracted during map projection.
- GeoGridDirectionDifference[proj,loc,αβ] computes the difference angle (
-
)-(β-α) where α, β are azimuths defined on the Earth at the given location loc, and
,
are the respective projected bearings on the map. - GeoGridDirectionDifference[proj,loc,α] is equivalent to GeoGridDirectionDifference[proj,loc,0α].
- GeoGridDirectionDifference[proj,loc] computes the largest absolute value of GeoGridDirectionDifference[proj,loc,αα+90] for any value of α.
- A geo projection can be given as a named projection "proj" with default parameters or as {"proj",params}, where "proj" is any of the entities of GeoProjectionData and params are parameter rules like "StandardParallels"->{33,60}. GeoProjectionData["proj"] gives the default values of the parameters for the projection "proj".
- The location loc can be given as a coordinate pair {lat,lon} in degrees, a geo position object like GeoPosition[…] or GeoGridPosition[…] or as a geo entity Entity[…].
- The bearing or azimuthal direction α is an angle measured clockwise from true north. It can be given as a Quantity angle, as a number in degrees or as a named compass direction like "North", "NE" or "NEbE".
- GeoGridDirectionDifference threads over its location and direction arguments.
- Possible options of GeoGridDirectionDifference include:
-
GeoModel Automatic model of Earth or a celestial body
Examples
open all close allBasic Examples (1)
Compute the angular difference induced by the Mollweide projection in the eastward direction at New York:
GeoGridDirectionDifference["Mollweide", Entity["City", {"NewYork", "NewYork", "UnitedStates"}], 90]The angle between the projected north and east directions is about 27.7° smaller than the original 90°:
GeoGraphics[GeoMarker[GeoVector[{Entity["City", {"NewYork", "NewYork", "UnitedStates"}] -> {1, 0}, Entity["City", {"NewYork", "NewYork", "UnitedStates"}] -> {1, 90}}], Placed["Dart", "Start"]], GeoProjection -> {"Mollweide", "Centering" -> {0, 0}}, GeoGridLines -> Automatic, GeoRange -> Entity["City", {"NewYork", "NewYork", "UnitedStates"}]]Scope (9)
Compute the geo grid direction difference along the northeast direction for a geo projection at your current geo location:
GeoGridDirectionDifference["Albers", Here, 45]These are the default values of the parameters of the "Albers" projection:
GeoProjectionData["Albers"]Specify other values for the parameters of the projection:
GeoGridDirectionDifference[{"Albers", "StandardParallels" -> {0, 10}}, Here, 45]GeoGridDirectionDifference[{"Albers", "Centering" -> {-20, 150}}, Here, 45]Compare any two initial directions with their projected versions:
GeoGridDirectionDifference["Orthographic", GeoPosition[{40, 50}], 45 -> 135]Specify the azimuth as a number of degrees:
GeoGridDirectionDifference["Bonne", {80, -40}, 95]Specify the azimuth as a Quantity angle:
GeoGridDirectionDifference["Bonne", {80, -40}, Quantity[95, "AngularDegrees"]]GeoGridDirectionDifference["Bonne", {80, -40}, Quantity[1.4, "Radians"]]Specify a location using a pair {lat,lon} in degrees:
GeoGridDirectionDifference["ConicEquidistant", {-80.5, 30.32}, Max]Use locations with geo position heads:
GeoGridDirectionDifference["ConicEquidistant", GeoPosition[{-80.5, 30.32}], Max]GeoGridDirectionDifference["ConicEquidistant", GeoPositionXYZ[{1.0942*^6, 192951.754, 6.2*^6}], Max]GeoGridDirectionDifference["ConicEquidistant", GeoGridPosition[{0.714, 0.753}, "Albers"], Max]Specify a location using a geo Entity object:
GeoGridDirectionDifference["Albers", Entity["City", {"Paris", "IleDeFrance", "France"}], Max]Compute the geo grid direction difference for a list of different azimuths at the same location:
GeoGridDirectionDifference["Robinson", {80, -40}, Range[0, 90, 15]]//Normal[#, QuantityArray]&The input can also be given as a QuantityArray object:
% == GeoGridDirectionDifference["Robinson", {80, -40}, QuantityArray[Range[0, 90, 15], "AngularDegrees"]]Find the maximum absolute value of the angular difference of perpendicular directions:
GeoGridDirectionDifference["Mollweide", {80, -40}, Max]ListPlot[GeoGridDirectionDifference["Mollweide", {80, -40}, # -> # + 90]& /@ Range[-180, 180, 10]]Return the projected angular difference of a list of locations in different formats:
proj = "Mollweide";
GeoGridDirectionDifference[proj, {GeoPosition[{10, 40}], GeoGridPosition[{0.286, -0.576}, proj], {85, 178}}, Max]Normal[%, QuantityArray]GeoGridDirectionDifference can efficiently process values for large numbers of locations:
locs = RandomGeoPosition["World", 10 ^ 6];azims = RandomReal[{-180, 180}, 10 ^ 6];GeoGridDirectionDifference["Mollweide", locs, azims]//AbsoluteTimingOptions (1)
GeoModel (1)
By default, GeoGridDirectionDifference returns values for a spherical geo model:
GeoGridDirectionDifference["Armadillo", {50, -100}, 30]Using an ellipsoidal model of Earth produces a slightly different value:
GeoGridDirectionDifference["Armadillo", {50, -100}, 30, GeoModel -> "ITRF00"]The global scale of the reference model does not affect geo direction distortion:
GeoGridDirectionDifference["Armadillo", {50, -100}, 30, GeoModel -> "Moon"]Properties & Relations (6)
The geo grid direction difference varies periodically with the azimuth, with a period of 180 degrees:
Plot[GeoGridDirectionDifference["Albers", {80, 0}, θ], {θ, -180, 360}]Plot[GeoGridDirectionDifference["Orthographic", {25, 50}, 50 -> θ], {θ, -180, 360}]Compute the azimuths of the minimal and maximal geo grid direction differences:
proj = "Orthographic";
p = GeoPosition[{25, 50}];
f[α1_Real, α2_Real] := QuantityMagnitude@GeoGridDirectionDifference[proj, p, α1 -> α2]NMaximize[f[α1, α2], {α1, α2}]NMinimize[f[α1, α2], {α1, α2}]Compute the maximum value of the geo grid direction difference for perpendicular directions:
proj = "Bonne";
p = GeoPosition[{10, 120}];GeoGridDirectionDifference[proj, p, Max]Check explicitly that the values agree when you compute them numerically:
f[α_Real] := QuantityMagnitude@GeoGridDirectionDifference[proj, p, α -> α + 90]NMaximize[f[α], {α}]NMinimize[f[α], {α}]Take the cylindrical projections, except for those requiring additional parameters or not given in normal aspect:
cylindrical = Complement[GeoProjectionData["Cylindrical"], {"Cassini", "ObliqueMercatorNGS", "CylindricalSatelliteTracking"}]Choose 100 random geo locations:
locs = RandomGeoPosition["World", 100]Check that cylindrical projections do not distort the perpendicularity of the north and east directions:
QuantityArray[GeoGridDirectionDifference[#, locs, 90]& /@ cylindrical]MinMax[%]//ChopTake the conformal projections, except for those requiring additional parameters:
conformal = Complement[GeoProjectionData["Conformal"], {"Littrow", "BipolarObliqueConicConformal", "LambertConicConformalNGS", "ObliqueMercatorNGS", "SpaceObliqueMercator"}]Choose 100 random geo locations:
locs = RandomGeoPosition["World", 100]Check that the geo grid direction difference is zero at all the chosen points:
data = QuantityArray[GeoGridDirectionDifference[#, locs, Max]& /@ conformal]MinMax[%]//ChopFlat polar projections have maximal geo grid angle difference at the poles if the azimuths define a meridian:
GeoGridDirectionDifference["Equirectangular", {{-89.99, 79}, {89.99, 79}}, 179 -> -179, GeoModel -> 1]Normal[%, QuantityArray]GeoGridDirectionDifference["WagnerI", {{-89.99, 19}, {89.99, 79}}, -179 -> 179]Normal[%, QuantityArray]Possible Issues (1)
If a geo location cannot be projected, then the geo grid direction difference cannot be computed either:
GeoGridPosition[GeoPosition[{20, 120}], "Orthographic"]GeoGridDirectionDifference["Orthographic", GeoPosition[{20, 120}], 90]This location is not on the half-Earth covered by the "Orthographic" projection with default center:
GeoGraphics[GeoRange -> "World", GeoProjection -> "Orthographic", GeoGridLines -> Automatic]Neat Examples (1)
Make a density plot of angular distortion along the eastward direction for the island of Madagascar:
geopol = EntityValue[Entity["Country", "Madagascar"], "Polygon"]mesh = BoundaryMesh[GeoGridPosition[geopol, "Mollweide"]]angularDistortion[x_, y_] := GeoGridDirectionDifference["Mollweide", GeoGridPosition[{x, y}, "Mollweide"], 90] ;DensityPlot[QuantityMagnitude[angularDistortion[x, y]], {x, y}∈mesh, PlotLegends -> Automatic, AspectRatio -> Automatic]Tech Notes
Related Guides
History
Text
Wolfram Research (2019), GeoGridDirectionDifference, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoGridDirectionDifference.html.
CMS
Wolfram Language. 2019. "GeoGridDirectionDifference." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GeoGridDirectionDifference.html.
APA
Wolfram Language. (2019). GeoGridDirectionDifference. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoGridDirectionDifference.html
BibTeX
@misc{reference.wolfram_2026_geogriddirectiondifference, author="Wolfram Research", title="{GeoGridDirectionDifference}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/GeoGridDirectionDifference.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_geogriddirectiondifference, organization={Wolfram Research}, title={GeoGridDirectionDifference}, year={2019}, url={https://reference.wolfram.com/language/ref/GeoGridDirectionDifference.html}, note=[Accessed: 15-June-2026]}