"GeoPosition" (Comparison Method)
Details
- The "GeoPosition" comparison method considers two geodetic positions to be equivalent if the geodesic distance between them is within a given distance tolerance.
- The distance tolerance should usually be set using the Tolerance option in AssessmentFunction. The default value of zero meters allows only machine precision differences. The tolerance should always be a Quantity with units of length.
- The default distance function is GeoDistance, but any other distance metric can be specified for the comparison using the DistanceFunction option in AssessmentFunction.
- When the answer key contains multiple possible positions that are within the tolerance range of an answer, the assessment is based on the closest answer key.
- For convenience, vectors with two or three components are also accepted as input and treated as arguments to GeoPosition.
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Create an AssessmentFunction for GeoPosition comparison with a nonzero tolerance:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-q7aulv

Answers within the tolerance range are marked as correct:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-81ey8o


https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-rtvey1


https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-81r5pe

Even nearby locations are marked as incorrect:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-08sqw5

Only locations with geo positions within machine precision level are accepted:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-cagvsc

Define an assessment for a problem with multiple answers, each with a different score.

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-mv537z


https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-e5jdgz

Show detailed information about the answer, including the final score, which corresponds to the closest answer key within the tolerance:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-72rps8

Answers matching values with negative scores are marked as incorrect:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-b32kig


https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-2uj207

Generalizations & Extensions (1)Generalized and extended use cases
Options (2)Common values & functionality for each option
The Tolerance can be given as any quantity with units of length:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-ykf54m


https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-5qa5xo

Use the TravelDistance instead of the GeoDistance to perform the comparison, including an Echo to see the travel distance:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-gwyu4s


Applications (1)Sample problems that can be solved with this function
Create a geographic AssessmentFunction including cities in the northeast United States:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-llhg3g

Create a QuestionObject for the assessment function:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-dgfvii

Properties & Relations (2)Properties of the function, and connections to other functions
For convenience, vectors with two or three components are also accepted as input and treated as arguments to GeoPosition. Create an assessment function using three different list forms of geo locations:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-fw9cv

See the standardized answer key:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-8gm1v5

The "GeoPosition" method can be inferred only if all values in the answer keys are GeoPosition objects:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-fsh8r7


https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-hbycmb

Possible Issues (1)Common pitfalls and unexpected behavior
The tolerance must be a Quantity with units of length:

https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-8l9rxx



https://wolfram.com/xid/0370hczcl8ji4xrhlmxl3qsr5frm-edb05u
