
(This is the same documentation which ships with the product.)
ZIP Code Download's Distance Wizard provides functionality for calculating the distance between two points on Earth's surface. Combined with a database of ZIP/postal code coordinates, Distance Wizard can help perform many practical tasks, such as locating nearby storefronts or presenting geo-targeted ads to visitors.
Standard Edition is faster than competitors' products and easy to use. Professional Edition boasts ultra-high performance and is bundled with smart boundary technology to greatly enhance the speed of your database queries.
For example, to find all the postal codes in North America (US, Canada, Mexico) within 10 miles of 58271 (Pembina, North Dakota, USA, located a few miles from the Canadian border), your application would query over a million rows of data and process several calculations for each row to find maybe a dozen postal codes that are within 10 miles.
The Professional Edition calculates smart boundaries and exponentially reduces the number of rows involved from millions to just dozens, making it dramatically faster. View the complete examples to see how it works with some sample data.
These tools comprise a small code library of two main parts:
The ZIP Code Download Distance Wizard can be utilized in 14 different languages and platforms including:
This documentation explains how to use the language of your choice to work with the API. It also includes usable sample source code.
There is a language filter at the top to display content for your specific platform.
Below is an overall comparison of the Standard and Professional editions of Distance Wizard.
| Distance Wizard Standard Edition |
Distance Wizard Professional Edition |
|
| Calculates distance between two coordinates on Earth | ![]() |
![]() |
| Integrates with ZIP Code Download's ZIP Code Databases | ![]() |
![]() |
| Integrates with my own table of location data | ![]() |
![]() |
| Enables faster database queries with smart boundary technology | ![]() |
![]() |
| Ultra-high performance | ![]() |
![]() |
| Recommended for high-volume websites and applications | ![]() |
![]() |
| Execution time | ![]() |
|
Below is a technical comparison, showing which API features are available (classes, functions, etc) in each edition.
| Distance Wizard Standard Edition |
Distance Wizard Professional Edition |
|
| DistanceWizard class To calculate distance |
![]() |
![]() |
| BoundaryWizard class For fast database queries |
![]() |
![]() |
| Boundary class To improve performance |
![]() |
![]() |
| Coordinate class To represent location |
![]() |
![]() |
| Measurement enum For miles/kilometers |
![]() |
![]() |
NOTICE: Standard Edition lacks the speed-enhancing smart boundaries. Running database queries to determine distances will require tens of thousands of queries and calculations. However, with the Professional Edition, only a few dozen queries are performed. For large-scale applications, consider upgrading to Distance Wizard Professional.
Distance Wizard Standard is comprised of three classes/concepts:
Since this library deals with coordinates on Earth's surface, the wizard make calculations based on the surface of a sphere.
In general, there are two main portions of this API: one that calculates four boundaries around an original coordinate given a radius, and one that calculates the distance between two coordinates.
These portions are represented by the following two classes:
Once constructed, these objects have methods to perform their calculations.
BoundaryWizard exists to make quick and efficient database queries by setting certain limitations on what should be queried. DistanceWizard performs calculations between two geolocational points.
Since this library deals with coordinates on Earth's surface, the wizards make calculations based on the surface of a sphere.
The Coordinate class eases grouping of a set of latitude and longitude values.
Latitude and longitude can be thought of as x,y values:
(latitude, longitude)
There is no Coordinate class or concept in this API for database query languages. Individual latitude/longitude values are passed in as arguments instead of relying on Coordinate objects like in most programming languages. For examples, see DistanceWizard and BoundaryWizard pages.
ASP/VBA/VB6 Construction of a Coordinate
Dim myCoordinate: Set myCoordinate = New Coordinate
myCoordinate.Initialize 37.332418, -122.030039
Using the Coordinate struct in C
Coordinate coord;
coord.Latitude = 37.332418;
coord.Longitude = -122.030039;
Initializing a Coordinate component in ColdFusion
<cfobject name="coord" component="cfcs.Coordinate">
<cfset coord1.init(37.332418, -122.030039)>
Constructor Syntax
new Coordinate(double LatitudeDegrees, double LongitudeDegrees)
double LatitudeThe latitude (x-value) of the coordinate.
double LongitudeThe longitude (y-value) of the coordinate.
double Latitude()Gets the latitude (x-value) of the coordinate.
Returns
The latitude value of the coordinate in degrees as a double.
double Longitude()Gets the longitude (y-value) of the coordinate.
Returns
The longitude value of the coordinate in degrees as a double.
boolean Equals(Coordinate coordinate)Compares this coordinate object with the argument, based on whether its latitude and longitude values are the same.
Parameters
Type Name Description Coordinate coordinate The other coordinate to compare this coordinate with. Returns
Boolean TRUE if the coordinates have the same latitude and longitude. Returns boolean FALSE otherwise.
int Equals(Coordinate coordinate)Compares this coordinate object with the argument, based on whether its latitude and longitude values are the same.
Parameters
Type Name Description Coordinate coordinate The other coordinate to compare this coordinate with. Returns
1, as true, if the coordinates have the same latitude and longitude. Returns 0, as false, otherwise.
boolean EqualTo(Coordinate coordinate)Compares this coordinate object with the argument, based on whether its latitude and longitude values are the same.
Parameters
Type Name Description Coordinate coordinate The other coordinate to compare this coordinate with. Returns
Boolean TRUE if the coordinates have the same latitude and longitude. Returns boolean FALSE otherwise.
int Equals(Coordinate coordinate1, Coordinate coordinate2)Compares this coordinate object with the argument, based on whether its latitude and longitude values are the same.
Parameters
Type Name Description Coordinate coordinate1 The first coordinate to compare. Coordinate coordinate2 The other coordinate to compare. Returns
1 if the coordinates have the same latitude and longitude. Returns 0 otherwise.
void Initialize [latitude], [longitude] This is a Sub routine and only exists in ASP, VBA, and VB6. It merely assigns values to the object.Sets the values of latitude and longitude for this coordinate to represent. Since constructors in ASP, VBA, and VB6 cannot accept arguments, this is the preferred alternative. This is a Sub and should not have parenthasees or assignment operators.
Parameters
Type Name Description double latitude The latitude value to represent. Must be between -180 and +180. double longitude The longitude value to represent. Must be between -180 and +180. Returns
void
void init(numeric latitude, numeric longitude) This initialization function exists only in ColdFusion and should be called just once to set its values.Sets the values of latitude and longitude for this coordinate to represent. Since constructors in ColdFusion do not accept parameters, this is the conventional alternative.
Parameters
Type Name Description numeric latitude The latitude value to represent. Must be between -180 and +180. numeric longitude The longitude value to represent. Must be between -180 and +180. Returns
void
The Measurement enumeration is used to represent two different units of measure:
ASP
Dim Measure: Set Measure = New Measurement
Dim unit1: unit1 = Measure.Miles
Dim unit2: unit2 = Measure.Kilometers
C
Measurement unit1 = Miles;
Measurement unit2 = Kilometers;
C#
var unit1 = Measurement.Miles;
var unit2 = Measurement.Kilometers;
C++
Measurement unit1 = Measurement::Miles;
Measurement unit2 = Measurement::Kilometers;
ColdFusion
<cfobject name="measure" component="cfcs.Measurement">
<cfset unit1 = measure.Miles>
<cfset unit2 = measure.Kilometers>
Java
Measurement unit1 = Measurement.Miles;
Measurement unit2 = Measurement.Kilometers;
MS SQL Server
DECLARE @unit1 varchar(12), @unit2 varchar(12);
SELECT @unit1 = 'Miles';
SELECT @unit2 = 'Kilometers';
MySQL 5.0+
SET @unit1 = 'Miles';
SET @unit2 = 'Kilometers';
Oracle 9+
DECLARE unit1 VARCHAR2(12) := 'Miles';
unit2 VARCHAR2(12) := 'Kilometers';
BEGIN
NULL;
END;
/
Perl
my $measure = new Measurement();
my $unit1 = $measure->{Miles};
my $unit2 = $measure->{Kilometers};
PHP
$unit1 = Measurement::MILES;
$unit2 = Measurement::KILOMETERS;
VB.NET
Dim unit1 As Measurement = Measurement.Miles;
Dim unit2 As Measurement = Measurement.Kilometers;
Visual Basic 6
Dim unit1 As Measurement: unit1 = Measurement.Miles
Dim unit2 As Measurement: unit2 = Measurement.Kilometers
VBA
Dim unit1 As Measurement: unit1 = Measurement.Miles
Dim unit2 As Measurement: unit2 = Measurement.Kilometers
The Boundary class is a very simple value class which holds four geolocational lines: two lines of latitude, and two lines of longitude. They are figured by a BoundaryWizard object.
A Boundary looks like the representation below.
double NorthGets the northern-most boundary line (a line of latitude).
double SouthGets the southern-most boundary line (a line of latitude).
double EastGets the eastern-most boundary line (a line of longitude).
double WestGets the western-most boundary line (a line of longitude).
double North()Gets the northern-most boundary line (a line of latitude).
Returns
The northern-most boundary line.
double South()Gets the southern-most boundary line (a line of latitude).
Returns
The southern-most boundary line.
double East()Gets the eastern-most boundary line (a line of longitude).
Returns
The eastern-most boundary line.
double West()Gets the western-most boundary line (a line of longitude).
Returns
The western-most boundary line.
All lines of latitude and longitude are expressed in decimal degrees.
You shouldn't ever need to create a Boundary. Use the BoundaryWizard's method CalculateBoundary() to obtain a Boundary.
The BoundaryWizard class is used to find four geolocational lines around an origin given a certain radius.
General Constructor Syntax
new BoundaryWizard
CalculateBoundary(@latitude, @longitude, @distance, @measure)Finds the boundary around a coordinate or point of origin given a latitude, longitude, radius, and unit of measure.
Parameters
Type Name Description decimal(18, 15) latitude The specific latitude value around which the boundary should be computed. decimal(18, 15) longitude The specific longitude value around which the boundary should be computed. decimal(18, 10) distance The distance, in the specified unit of measure, around which the boundary will be computed. varchar(12) measure The unit of measure for distance provided using a Measurement value. Returns
A table containing the four values of the boundary around the given origin: "north", "south", "east", "west". The north and south lines are the upper and lower lines of latitude in decimal degrees. The east and west lines are the left and right lines of longitude in decimal degrees.
CalculateBoundary(latitude, longitude, distance, measure)Finds the boundary around a coordinate or point of origin given a latitude, longitude, radius, and unit of measure.
Parameters
Type Name Description decimal(18, 15) latitude The specific latitude value around which the boundary should be computed. decimal(18, 15) longitude The specific longitude value around which the boundary should be computed. decimal(18, 10) distance The distance, in the specified unit of measure, around which the boundary will be computed. varchar(12) measure The unit of measure for distance provided using a Measurement value. Returns
A table containing the four values of the boundary around the given origin: "north", "south", "east", "west". The north and south lines are the upper and lower lines of latitude in decimal degrees. The east and west lines are the left and right lines of longitude in decimal degrees.
CalculateBoundary(latitude, longitude, distance, measure)Finds the boundary around a coordinate or point of origin given a latitude, longitude, radius, and unit of measure.
Parameters
Type Name Description NUMBER latitude The specific latitude value around which the boundary should be computed. NUMBER longitude The specific longitude value around which the boundary should be computed. NUMBER distance The distance, in the specified unit of measure, around which the boundary will be computed. VARCHAR2(12) measure The unit of measure for distance provided using a Measurement value. Returns
A Boundary type object that holds the four geolocational boundaries. See the documentation page for Boundary to view its member functions.
Boundary CalculateBoundary(Coordinate origin, double distance, int measure)Finds the boundary around a coordinate or point of origin.
Parameters
Type Name Description Coordinate origin The specific coordinate or location around which the boundary should be computed. double distance The distance, in the specified unit of measure, around which the boundary will be computed. Measurement measure The unit of measure for distance provided using a Measurement value. Returns
The boundary around the origin coordinate.
ASP Basic Usage
<!--#include file="UnitConverter.asp" -->
<!--#include file="Boundary.asp" -->
<!--#include file="Measurement.asp" -->
<!--#include file="Coordinate.asp" -->
<!--#include file="BoundaryWizard.asp" -->
<%
' Set up our coordinates
Dim originCoord: Set originCoord = New Coordinate
originCoord.Initialize 37.332418, -122.030039
' Sample radius (boundary) calculation
Dim boundCalc: Set boundCalc = New BoundaryWizard
Dim Measure: Set Measure = New Measurement
Dim radius
Set radius = boundCalc.CalculateBoundary(originCoord, 25, Measure.Miles)
Response.Write("Northern boundary: " & radius.North & "<br />")
Response.Write("Southern boundary: " & radius.South & "<br />")
Response.Write("Eastern boundary: " & radius.East & "<br />")
Response.Write("Western boundary: " & radius.West & "<br />")
%>
C Basic Usage
#include <stdlib.h>
#include "BoundaryWizard.h"
int main()
{
// Set up; simulate data entry.
Coordinate originCoord;
originCoord.Latitude = 37.332418;
originCoord.Longitude = -122.030039;
// SAMPLE USAGE OF BOUNDARY CALCULATOR
Boundary radius = CalculateBoundary(originCoord, 25, Miles);
printf("Northern boundary: %f\n", radius.North);
printf("Southern boundary: %f\n", radius.South);
printf("Eastern boundary: %f\n", radius.East);
printf("Western boundary: %f\n\n", radius.West);
getch();
return 0;
}
C# Basic Usage
using System;
using ZipCodeDownload.Wizards;
public sealed class Program
{
private static void Main(string[] args)
{
BoundaryWizard boundCalc = new BoundaryWizard();
// Radius calculation
Boundary radius = boundCalc.CalculateBoundary(new Coordinate(37.332418, -122.030039),
25.0,
Measurement.Miles);
Console.WriteLine("Northern boundary: " + radius.North);
Console.WriteLine("Southern boundary: " + radius.South);
Console.WriteLine("Eastern boundary: " + radius.East);
Console.WriteLine("Western boundary: " + radius.West);
Console.ReadLine();
}
}
C++ Basic Usage
#include <iostream>
#include <stdlib.h>
#include "BoundaryWizard.h"
using namespace std;
using namespace ZipCodeDownload::Wizards;
int main()
{
// Set up
Coordinate originCoord = Coordinate(37.332418, -122.030039);
// Actual usage of class
BoundaryWizard boundCalc = BoundaryWizard();
Boundary radius = boundCalc.CalculateBoundary(originCoord, 25, Measurement::Miles);
// Example output
cout << "Northern boundary: " << radius.North() << endl;
cout << "Southern boundary: " << radius.South() << endl;
cout << "Eastern boundary: " << radius.East() << endl;
cout << "Western boundary: " << radius.West() << endl << endl;
system("PAUSE");
return 0;
}
ColdFusion Basic Usage
<!-- Simulate data entry; establish our coordinate origin. -->
<cfobject name="coord" component="cfcs.Coordinate">
<cfset coord.init(37.332418, -122.030039)>
<!-- Create our service object. -->
<cfobject component="cfcs.BoundaryWizard" name="boundcalc">
<!-- Calculate the boundary. -->
<cfset bounds = boundcalc.CalculateBoundary(coord1, 25.0, measure.Miles)>
<cfoutput>
Northern boundary: #bounds.North()#<br />
Southern boundary: #bounds.South()#<br />
Eastern boundary: #bounds.East()#<br />
Western boundary: #bounds.West()#
</cfoutput>
Java Basic Usage
import wizards.*;
public class Sample {
public static void main(String[] args)
{
BoundaryWizard boundCalc = new BoundaryWizard();
// Set up sample coordinate
Coordinate originCoord = new Coordinate(37.332418, -122.030039);
// Sample radius calculation
Boundary radius = boundCalc.CalculateBoundary(originCoord, 25.0, Measurement.Miles);
System.out.println("Northern boundary: " + radius.North());
System.out.println("Southern boundary: " + radius.South());
System.out.println("Eastern boundary: " + radius.East());
System.out.println("Western boundary: " + radius.West());
}
}
Basic Usage for MS SQL
SELECT * FROM dbo.CalculateBoundary(37.332418, -122.030039, 25, 'Miles');
Basic Usage for MySQL 5.0+
CALL CalculateBoundary(37.332418, -122.030039, 25, 'Miles');
Oracle 9+
DECLARE bound Boundary;
BEGIN
bound := CalculateBoundary(37.332418, -122.030039, 25.0, 'Miles');
dbms_output.put_line('Northern boundary: ' || bound.North());
dbms_output.put_line('Southern boundary: ' || bound.South());
dbms_output.put_line('Eastern boundary: ' || bound.East());
dbms_output.put_line('Western boundary: ' || bound.West());
END;
/
Perl Basic Usage
#!/usr/bin/perl
package main;
use Coordinate;
use Measurement;
use BoundaryWizard;
# Simulate data entry by setting up coordinate
my $coord = new Coordinate(37.332418, -122.030039);
# Represent our units of measure
my $measure = new Measurement();
# Create the Boundary Wizard
my $boundWizard = new BoundaryWizard();
# Calculate the actual boundary
my $boundary = $boundWizard->CalculateBoundary($coord1, 25.0, $measure->{Miles});
print "Northern boundary: ".$boundary->North()."\n";
print "Southern boundary: ".$boundary->South()."\n";
print "Eastern boundary: ".$boundary->East()."\n";
print "Western boundary: ".$boundary->West();
exit;
PHP Basic Usage
<?php
require_once("BoundaryWizard.php");
$boundCalc = new BoundaryWizard();
// Simulate data entry
$latitude = 37.332418;
$longitude = -122.030039;
// Desired radius (in miles)
$radius = 25.0;
$coord = new Coordinate($latitude, $longitude);
$boundary = $boundCalc->CalculateBoundary($coord, $radius, Measurement::MILES);
echo "Northern boundary: " . $boundary->North() . "<br />";
echo "Southern boundary: " . $boundary->South() . "<br />";
echo "Eastern boundary: " . $boundary->East() . "<br />";
echo "Western boundary: " . $boundary->West();
?>
VB.NET Basic Usage
Imports System
Imports ZipCodeDownload.Wizards
Public NotInheritable Class Program
Public Shared Sub Main()
Dim boundCalc As New BoundaryWizard()
' Sample radius calculation
Dim radius As Boundary = boundCalc.CalculateBoundary( _
New Coordinate(37.332418, -122.030039), _
25, _
Measurement.Miles)
' Sample usage of results
Console.WriteLine("Northern boundary: " & radius.North)
Console.WriteLine("Southern boundary: " & radius.South)
Console.WriteLine("Eastern boundary: " & radius.East)
Console.WriteLine("Western boundary: " & radius.West)
Console.ReadLine()
End Sub
End Class
Usage in Visual Basic 6
Sub Sample()
' Set up our coordinate
Dim originCoord As Coordinate
Set originCoord = New Coordinate
originCoord.Initialize 37.332418, -122.030039
' Sample radius (boundary) calculation
Dim boundCalc: Set boundCalc = New BoundaryWizard
Dim radius: Set radius = boundCalc.CalculateBoundary(originCoord, 25, Measurement.Miles)
Debug.Print "Northern boundary: " & radius.north
Debug.Print "Southern boundary: " & radius.south
Debug.Print "Eastern boundary: " & radius.east
Debug.Print "Western boundary: " & radius.west
End Sub
VBA Basic Usage
Sub Program()
' Set up our coordinate
Dim originCoord As Coordinate
Set originCoord = New Coordinate
originCoord.Initialize 37.332418, -122.030039
' Sample radius (boundary) calculation
Dim boundCalc: Set boundCalc = New BoundaryWizard
Dim radius: Set radius = boundCalc.CalculateBoundary(originCoord, 25, Measurement.Miles)
Debug.Print "Northern boundary: " & radius.north
Debug.Print "Southern boundary: " & radius.south
Debug.Print "Eastern boundary: " & radius.east
Debug.Print "Western boundary: " & radius.west
End Sub
The example above should output these numeric values (exact formatting and precision varies per platform):
OUTPUT
Northern boundary: 37.6938359147632
Southern boundary: 36.9710000852368
Eastern boundary: -121.575490873859
Western boundary: -122.484587126141
A Boundary object is returned from the CalculateBoundary method. It contains two lines of latitude and two lines of longitude. See the documentation for the Boundary class for more information.
The DistanceWizard performs a calculation to determine the distance in a desired unit of measure between two given Coordinates on a sphere.
Constructor Syntax
new DistanceWizard
CalculateDistance(@latitude1, @longitude1, @latitude2, @longitude2, @measure)Calculates the distance between two geolocational points given those points and a unit of measure.
Parameters
Type Name Description decimal(18, 15) latitude1 The latitude value of the first/origin coordinate. decimal(18, 15) longitude1 The longitude value of the first/origin coordinate. decimal(18, 15) latitude2 The latitude value of the second/relative coordinate. decimal(18, 15) longitude2 The longitude value of the second/relative coordinate. varchar(12) measure The unit of measure for distance provided using a Measurement value. Returns
A distance between the two coordinates in decimal degrees.
CalculateDistance(latitude1, longitude1, latitude2, longitude2, measure)Calculates the distance between two geolocational points given those points and a unit of measure.
Parameters
Type Name Description decimal(18, 15) latitude1 The latitude value of the first/origin coordinate. decimal(18, 15) longitude1 The longitude value of the first/origin coordinate. decimal(18, 15) latitude2 The latitude value of the second/relative coordinate. decimal(18, 15) longitude2 The longitude value of the second/relative coordinate. varchar(12) measure The unit of measure for distance provided using a Measurement value. Returns
A distance between the two coordinates in decimal degrees.
CalculateDistance(latitude1, longitude1, latitude2, longitude2, measure)Calculates the distance between two geolocational points given those points and a unit of measure.
Parameters
Type Name Description NUMBER latitude1 The latitude value of the first/origin coordinate. NUMBER longitude1 The longitude value of the first/origin coordinate. NUMBER latitude2 The latitude value of the second/relative coordinate. NUMBER longitude2 The longitude value of the second/relative coordinate. VARCHAR2(12) measure The unit of measure for distance provided using a Measurement value. Returns
A distance between the two coordinates in decimal degrees as a NUMBER.
double CalculateDistance(Coordinate origin, Coordinate relative, int measure)Finds the distance on a sphere from the Coordinate origin to the Coordinate relative.
Parameters
Type Name Description Coordinate origin The first, or starting, coordinate from which to compute distance. Coordinate relative The second, or ending, coordinate to which to compute distance. int measure The unit of measure for distance using a Measurement value. Returns
The distance between the two coordinates on a sphere as a double (a numeric value).
ASP Basic Usage
<!--#include file="UnitConverter.asp" -->
<!--#include file="Measurement.asp" -->
<!--#include file="Coordinate.asp" -->
<!--#include file="DistanceWizard.asp" -->
<%
' Set up our coordinates
Dim originCoord, relativeCoord
Set originCoord = New Coordinate
originCoord.Initialize 37.332418, -122.030039
Set relativeCoord = New Coordinate
relativeCoord.Initialize 30.41922, -97.656097
' Used to represent units of measure
Dim Measure: Set Measure = New Measurement
' Sample distance calculation
Dim distCalc: Set distCalc = New DistanceWizard
Dim distance
distance = distCalc.CalculateDistance(originCoord, relativeCoord, Measure.Miles)
Response.Write("<br /><br />Distance: " & distance)
%>
C Basic Usage
#include <stdlib.h>
#include "DistanceWizard.h"
int main()
{
// Set up; simulate data entry.
Coordinate originCoord, relativeCoord;
originCoord.Latitude = 37.332418;
originCoord.Longitude = -122.030039;
relativeCoord.Latitude = 30.41922;
relativeCoord.Longitude = -97.656097;
// SAMPLE USAGE OF DISTANCE CALCULATOR
double distance = CalculateDistance(originCoord, relativeCoord, Miles);
printf("Distance: %f", distance);
getch();
return 0;
}
C# Basic Usage
using System;
using ZipCodeDownload.Wizards;
public sealed class Program
{
private static void Main(string[] args)
{
// Sample distance calculation
DistanceWizard distCalc = new DistanceWizard();
double distance = distCalc.CalculateDistance(
new Coordinate(37.332418, -122.030039),
new Coordinate(30.41922, -97.656097),
Measurement.Miles);
Console.WriteLine("Distance: " + distance);
}
}
C++ Basic Usage
#include <iostream>
#include <stdlib.h>
#include "DistanceWizard.h"
using namespace std;
using namespace ZipCodeDownload::Wizards;
int main()
{
// Set up
Coordinate originCoord = Coordinate(37.332418, -122.030039);
Coordinate relativeCoord = Coordinate(30.41922, -97.656097);
DistanceWizard distCalc = DistanceWizard();
// Perform calculation
double distance = distCalc.CalculateDistance(originCoord, relativeCoord, Measurement::Miles);
cout << "Distance in Miles: " << distance << endl;
system("PAUSE");
return 0;
}
ColdFusion Basic Usage
<!-- Set up our utility/service components. -->
<cfobject name="distcalc" component="cfcs.DistanceWizard">
<cfobject name="measure" component="cfcs.Measurement">
<!-- Create our coordinates. -->
<cfobject name="coord1" component="cfcs.Coordinate">
<cfobject name="coord2" component="cfcs.Coordinate">
<cfset coord1.init(