({{, (RefLink[GeoGridDirectionDifference, paclet:ref/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.}, {, (RefLink[GeoGridDirectionDifference, paclet:ref/GeoGridDirectionDifference])[proj,loc,α->β] 
gives the difference between projected and unprojected angles from direction α to direction β.}})

OpenersNotesSection(Spacer1)Details and Options

Geo grid direction difference is a measure of how much angles between geo directions get expanded or contracted during map projection.

(RefLink[GeoGridDirectionDifference, paclet:ref/GeoGridDirectionDifference])[proj,loc,α->β] computes the difference angle ((OverTilde[β])-(OverTilde[α]))-(β-α) where α, β are azimuths defined on the Earth at the given location loc, and (OverTilde[α]), (OverTilde[β]) are the respective projected bearings on the map.

(RefLink[GeoGridDirectionDifference, paclet:ref/GeoGridDirectionDifference])[proj,loc,α] is equivalent to (RefLink[GeoGridDirectionDifference, paclet:ref/GeoGridDirectionDifference])[proj,loc,0->α].

(RefLink[GeoGridDirectionDifference, paclet:ref/GeoGridDirectionDifference])[proj,loc] computes the largest absolute value of (RefLink[GeoGridDirectionDifference, paclet:ref/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 (RefLink[GeoProjectionData, paclet:ref/GeoProjectionData]) and params are parameter rules like "StandardParallels"->{33,60}. (RefLink[GeoProjectionData, paclet:ref/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 (RefLink[GeoPosition, paclet:ref/GeoPosition])[…] or (RefLink[GeoGridPosition, paclet:ref/GeoGridPosition])[…] or as a geo entity (RefLink[Entity, paclet:ref/Entity])[…].

The bearing or azimuthal direction α is an angle measured clockwise from true north. It can be given as a (RefLink[Quantity, paclet:ref/Quantity]) angle, as a number in degrees or as a named compass direction like "North", "NE" or "NEbE".

(RefLink[GeoGridDirectionDifference, paclet:ref/GeoGridDirectionDifference]) threads over its location and direction arguments.

Possible options of (RefLink[GeoGridDirectionDifference, paclet:ref/GeoGridDirectionDifference]) include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (19)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Compute the angular difference induced by the Mollweide projection in the eastward direction at New York:

GeoGridDirectionDifference["Mollweide",(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"]),90]

The angle between the projected north and east directions is about 27.7° smaller than the original 90°:

GeoGraphics[GeoMarker[GeoVector[{(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"])->{1,0},(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"])->{1,90}}],Placed["Dart","Start"]],GeoProjection->{"Mollweide","Centering"->{0,0}},GeoGridLines->Automatic]

OpenersExampleSection1(Spacer1)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 (RefLink[Quantity, paclet:ref/Quantity]) angle:

GeoGridDirectionDifference["Bonne",{80,-40},Quantity[95,"AngularDegrees"]]

Use any other angular unit:

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 (RefLink[Entity, paclet:ref/Entity]) object:

GeoGridDirectionDifference["Albers",(Entity["Paris", Entity["City",{"Paris","IleDeFrance","France"}], "Entity[\"City\", {\"Paris\", \"IleDeFrance\", \"France\"}]", "city"]),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[#,StructuredArray]&

The input can also be given as a (RefLink[QuantityArray, paclet:ref/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]

Check the result graphically:

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[%,StructuredArray]

(RefLink[GeoGridDirectionDifference, paclet:ref/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]//AbsoluteTiming

OpenersExampleSection2(Spacer1)Options  (1)

OpenersExampleSubsection0(Spacer1)GeoModel  (1)

By default, (RefLink[GeoGridDirectionDifference, paclet:ref/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"]

OpenersExampleSection4(Spacer1)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]

You 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[%]//Chop

Take the conformal projections, except for those requiring additional parameters:

conformal=Complement[GeoProjectionData["Conformal"],{"Littrow","BipolarObliqueConicConformal","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:

QuantityArray[GeoGridDirectionDifference[#,locs,Max]&/@conformal]

MinMax[%]//Chop

Flat 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[%,StructuredArray]

GeoGridDirectionDifference["WagnerI",{{-89.99,19},{89.99,79}},-179->179]

Normal[%,StructuredArray]

OpenersExampleSection5(Spacer1)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]

OpenersExampleSection6(Spacer1)Neat Examples  (1)

Make a density plot of angular distortion along the eastward direction for the island of Madagascar:

geopol=EntityValue[(Entity["Madagascar", Entity["Country","Madagascar"], "Entity[\"Country\", \"Madagascar\"]", "country"]),"Polygon"]

mesh=BoundaryMesh@DiscretizeRegion@Map[First]@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]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GeoDirection, paclet:ref/GeoDirection])  ▪  (RefLink[GeoGridUnitDistance, paclet:ref/GeoGridUnitDistance])  ▪  (RefLink[GeoGridUnitArea, paclet:ref/GeoGridUnitArea])  ▪  (RefLink[GeoProjectionData, paclet:ref/GeoProjectionData])  ▪  (RefLink[GeoProjection, paclet:ref/GeoProjection])  ▪  (RefLink[GeoGraphics, paclet:ref/GeoGraphics])  ▪  (RefLink[MomentOfInertia, paclet:ref/MomentOfInertia])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Geodesy, paclet:guide/Geodesy])}, {▪(RefLinkPlain[Maps & Cartography, paclet:guide/MapsAndCartography])}})}})