Geographic
data is commonly described by pairsof X-Y
coordinates on the surface of the Earth, such as longitude
and latitude. This is the type of spatial
information that underlies the shapefiles
used in the previous two sections, but it
may also show up in simple tables. GPS receivers
also describe
your location using X-Y coordinates.
Since this tutorial will be using specific maps and data, the first step is to make your own copy of the tutorial data.
Set Up: Getting the Tutorial Data
In the Windows Explorer, navigate to the network drive K: (aka \\Software\Winsoft), open the folder Maps, and then open the folder Introduction to GIS.
Drag the folder mappingcoordinates and its contents to either:
your network drive U:, e.g. into the folder My Documents; or
the local hard drive C:, e.g. onto your Desktop.
Since some — but not all — of the ArcGIS components have trouble handling names with spaces or special symbols, do not rename the folders or files.
In the dialog Add Data, navigate into the folder mappingcoordinates; if necessary, make a new connection to it (see Constructing and Sharing Maps for details).
In the folder mappingcoordinates, click on the file countries.shp.
Click on the button Add.
ArcMap will now display a map of the countries of the world:
Move the cursor across the map, and notice the two changing numbers
in the lower right corner of the window (here
95°20'"W 57°49'52.523"S). This pair of X-Y coordinates
are the longitude and latitude of the tip of the
cursor, to be described next.
Geographic coordinate systems, describing positions on the surface of the Earth in latitude and longitude, are the most common representation of spatial data.
Since the time of the Ancient Greeks it has been known that the Earth was a spherical object rather than a flat surface.
Though it was suggested millennia ago that the Earth rotates once a day, this fact was not widely accepted until the 17th century, and was not firmly established until the 19th century.
The Earth's rotation defines certain reference points and circles that we can use to determine our position on its surface.
The Earth's rotation axis is a line that passes through the the North Pole, the South Pole, and the center of the Earth.
The Equator is a circle on the Earth's surface that's perpendicular to its axis and equidistant from its poles:
It is useful and important to be able to precisely specify positions on the Earth's surface: to compare positions, calculate distances, and in general navigate from one point to another.
So, a pair of numbers or geographic coordinates are used that are similar to the x and y Cartesian coordinates in a plane, but designed for a sphere.
These two numbers, latitude and longitude, are angles measuring south-to-north and west-to-east, respectively.
Any circle parallel to the Equator is called a parallel of latitude.
The angle (with vertex at the center of the Earth) between a given parallel of latitude and the Equator describes that parallel and any point on it, and is called the latitude.
So, the North Pole is at 90° north latitude, the Equator itself is 0° latitude, and the South Pole is 90° south latitude.
Amherst is located at 42.37° north latitude.
Southern latitudes are often expressed as negative values, particularly in computer applications such as GIS.
One degree of latitude corresponds to a distance of 111 Km (69 miles) across the Earth's surface.
Any semicircle passing through the poles is called a meridian of longitude.
One of these is designated as the Prime Meridian, usually
the one passing through the Royal Observatory
in Greenwich, England (just outside London).
The angle (with vertex at the center of the Earth) along the Equator between a given meridian and the Prime Meridian describes that meridian and any point on it.
So Amherst is located at 72.52° west longitude.
Western longitudes are often expressed as negative values, particularly in computer applications such as GIS.
Note that the antimeridian can be described by either 180° west
longitude or 180° east
longitude.
One degree of longitude at the Equator also corresponds to 111 Km; but this gets progressively smaller as one moves towards the poles, eventually shrinking to zero (varying as the cosine of latitude).
In the seventeenth century, Isaac Newton suggested that, because the Earth is rotating and not perfectly rigid, it will bulge slightly at its equator.
So, the Earth is not precisely spherical, but instead is an oblate ellipsoid, like a squashed beachball.
Precise measurements put the equatorial and polar diameters of the Earth at 12,756 Km and 12,713 Km, respectively, a difference of only 43 Km (0.34%).
This small oblateness can still effect the positioning of maps, so it must be taken into account.
In addition, the Earth has substantial variations in the elevation of its surface from point to point:
The peak of Mt. Everest is 9 Km above sea level.
The deepest point of the Marianna Trench is 11 Km below sea level.
(4)
Because gravity depends on the mass of the Earth, there are small
variations in gravitational force across its
surface, which are reflected by local sea level
(because fluids will move in response). The geoid is
an equal-gravity surface that includes local
sea level but also continues into continental
areas, as shown in the image above. The GOCE
satellite has provided detailed measurements
of the geoid, whose variations are displayed
in exagerated form in this mp4 movie:
Because the Earth's surface is so rough, fitting it in the best way with an ellipsoid depends on where you want to map it!
A datum is a choice of ellipsoid to model the Earth's surface, viz. the location of its center, its size, and its orientation.
Many datums have been defined; U.S. maps commonly use the North American Datum of 1927 (NAD27), and more recently, NAD83.
With the expansion of international travel and commerce, worldwide
standards have been adopted, such as the World Geodetic System
of 1984 (WGS84), which is based on the geoid.
Note that this means that a measurement of latitude and longitude will depend on which datum you use!
You should therefore always ascertain the datum when you've been given geographic data (NAD83 for Amherst, above).
The datum is the foundation of a geographic data set's spatial reference; let's look at an example:
Once a datum has been chosen as a model of the Earth, it is straightforward to reproduce its features on a globe.
For many purposes it's much more useful to represent the Earth on a flat surface, such as paper or a computer screen.
Such a flattened representation of the Earth is called a map.
The flattening process is known as a projection.
Map projections are similar to other projections you may be familiar with, such as projecting a slide or transparency onto a screen.
There are three common, general ways to "flatten" the Earth: Planar, Conic, and Cylindrical:
Planar Projection: hold a plane surface up to the Earth,
and project outward in some way, as shown
below left.
This type of projection is commonly used to represent the Earth as a globe.
This includes one common variant, the Vertical
Perspective Projection shown at the right, which is used by Google
Earth to provide a "birds-eye view" of the
Earth.
Question: What's missing in
the vertical perspective, in comparison to
the orthographic projection
at left? This could also be described as
"something" that's present but limiting the
view.
Conic Projection: wrap a cone around the Earth:
(1)
then cut it along one side and flatten it:
(1)
Cylindrical Projection: wrap a cylinder around the Earth:
(1)
and again cut it along one side and flatten it:
(1)
There are also many other, more complicated, projections that are used
for certain purposes.
Projection surfaces can be tangent to the Earth's surface
(touching it along one standard point or standard
curve),
as in all of the images above, or secant to
it (intersecting at one or two standard curves),
as in the following images:
For each of these surfaces, there are a number of different ways to project the Earth's features onto them.
Any projection will necessarily distort some aspect of geography:
distance: all projections distort distance in some way.
shape: some projections can preserve angles and therefore small shapes, and are said to be conformal.
area: some projections can preserve relative area, and are called equal-area.
Warning: No projection can be both conformal and equal-area.
A famous example is the Mercator projection (right (1)),
a conformal coaxial cylindrical projection that
makes navigation easier by preserving directions,
but severely distorts area near the poles. Because
it also maintains shapes over
small regions, it is used by Google
Maps.
Another common example is the Plate Carrée projection (below), also a coaxial cylindrical projection that preserves (longitude, latitude) by simply mapping it to (x, y); however, it is neither conformal nor equal-area (though it is equidistant north-south).
Question: When bringing in data defined only in terms of geographic coordinates, ArcMap uses a default projection. Can you tell what it is?
Any distortion introduced by a projection will be smallest near the standard points
or curves where the projection surface touches
the Earth's surface.
Non-global maps will therefore generally use a projection that minimizes
distortion in the region of interest.
Regions that are elongated east-west are commonly represented by coaxial conic projections (touching along parallels).
Regions
that are elongated north-south are commonly represented
by transverse cylindrical
projections (touching along meridians).
Regions that are not elongated one way or the other may be represented
by concentric planar projections.
(4)
If the map will cover a relatively wide area, secant
projections are generally used, as in the image above, since
they even out the distortion around the multiple
standard curves.
Once the map orientation is determined,
one must choose between other characteristics
such as whether it should be conformal or equal
area.
For example, here are two different coaxial
conic projections:
Lambert Conformal Conic (right (1))
Albers Equal-Area Conic (below, standard parallel = 45°)
The Transverse Mercator projection
(below) is a common example of a conformal transverse cylindrical
projection, in this case designed for use around
the prime meridian or the antimeridian.
The
spatial reference of the map displayed by
ArcMap is determined by the data frame, which is
indicated by the stack-of-layers icon and
the default name Layers(click-pause-click
on the name to change it).
All layers in a data frame will be projected in the same way;
essentially, it's "the map".
A data frame's spatial reference is initially determined by
the first layer added to it; in the Setup this was the layer countries.shp.
In ArcMap,
in the Table of Contents,
double-click on the frame of interest,
e.g. Layers.
In the dialog Data Frame Properties,
click on the tab Coordinate
System.
In the list Select a Coordinate System:,
in the sublist Predefined,
you'll find a large collection of possible
datums and projections. Navigate
through the various possibilities
by clicking on the + and – before
their names to open and close them:
Geographic
Coordinate Systems lists
various datums, all of which are
displayed with the default
projection.
Projected
Coordinate Systems provides
a large collection of projections
based on different datums.
Choose one, for example Projected
Coordinate Systems > World > Robinson (world).
Note that the selected spatial reference
is shown
in detail in the section Current
Coordinate System:.
Click the button Apply to
see the effect on the map.
When you are finished, click the button OK.
A number of additional projections are available to display
the entire world in what are sometimes more usable formats.
A map projection, being flat, will often be given its own set of Cartesian map coordinates.
The origin is generally chosen to be far west and south of the region of interest.
Both coordinates (x, y) then increase towards the east and north, and are therefore always positive numbers.
(x, y) are known as the easting and northing, respectively.
The origin is typically defined by the false easting and false northing, which are the map coordinates of the standard points or curves that define the projection.
Map coordinates are generally measured in linear units such as feet or meters.
State Plane Coordinates are defined by each individual state to provide a highly accurate (< 0.01%) system of mapping for surveying, etc.
Current State Plane Coordinates are based on the NAD83 datum and two conformal secant projections, Lambert Conic or Transverse Mercator, and use units of meters.
(4)
The low distortion requires state plane maps to be no more than 158 mi across, so most states use more than one projection to cover their area, breaking at county boundaries.
Massachusetts State Plane Coordinates are based on two Lambert Conic projections, one for the Mainland Zone (most of the state) and the other for the Island Zone (Dukes and Nantucket Counties — the Elizabeth Islands and Martha's Vineyard, and Nantucket Island):
The Universal Transverse Mercator system provides a uniform way to describe any non-polar location on the Earth with good accuracy (< 0.08%).
The Earth is divided into sixty narrow north-south strips, each six degrees of longitude wide and extending from 80° S. Latitude to 84° N. Latitude:
The zones are numbered from west to east, starting with 1 from 180° W. Longitude, and are individually mapped with a transverse mercator projection centered on the zone.
The central meridian of each zone is assigned a false easting of 500,000 meters, and the Equator is assigned a false northing of zero meters in the northern hemisphere, and 10,000,000 meters in the southern hemisphere.
Massachusetts is covered by Zones 18N and 19N (3).
As a world-oriented coordinate system, UTM is usually used with the
WGS84 datum (though not always).
UTM is also the basis of the new U.S.
National Grid system being used by
the Department of Homeland Security.
To accurately represent mapped data on a computer screen, and to ensure that it can successfully be used with other data, it must have a spatial reference defined for it, which includes a datum, possibly a projection, and a coordinate system.
The spatial reference determines how the map's positions should be interpreted for display on the screen.
The spatial reference is described in a standard format that is provided
with the data in a file with the extension .prj,
and is said to be a part of its metadata (data
about data).
Sometimes the .prj file will be missing, and the spatial
reference must be manually assigned.
In order to simultaneously display two or more sets of GIS data with different spatial references, some of them must be recast to a common spatial reference.
Because each spatial reference is based on a particular datum and possibly also a projection, switching spatial references can involve a complicated mathematical process:
Switching datums is generally more complicated than
simply unprojecting and reprojecting, so approximations
are usually made that can introduce small errors.
ArcGIS has full support for multiple spatial references, and will automatically reproject data sets so that they are all displayed with the same reference.
However, because of the complexity of datum transformations, ArcGIS
(usually) will not automatically transform one datum
to another.
Instead, when data is added to a map that has a different datum, ArcGIS
puts up a dialog warning of potential issues
and giving you the option to pick a transformation.
The one exception is NAD 1927 to NAD 1983, for which there is an accepted
standard.
If you are adding a layer to an existing
map that has a different datum, e.g.
the states layer
we worked with in the previous class
and the
world map in UTM coordinates previously
selected,
you will be warned about transformation
issues.
In ArcMap,
in the toolbar Standard,
click on the button Add
Data.
In the dialog Add
Data, navigate into the
folder mappingcoordinates.
Add the new layer, e.g. states.shp.
Note
that a transformation request appears
in the dialog Geographic Coordinate Systems Warning;
click on the button Transformations….
In the dialog Geographic Coordinate System Transformations,
click on the menu Using:;
compare the various transformations,
and choose one.
The numbers in the illustrated case describe
the displacement of the datum's center
(dx, dy, dz), its rotation (rx, ry, rz),
and the scaling of its size (s); you
can see the shift is about 1 meter or
so.
Click on the
button OK.
Back in the
dialog Geographic Coordinate Systems Warning,
click
on the button Close,
and the new layer will appear in
the correct location.
Zoom into the edges of one
layer, e.g. states.shp,
and see how well it lines up with
the boundaries of the other layer,
e.g. countries.shp(but
be aware that the latter is not as
detailed a set of data).
Let's
see what happens when you add a layer that
doesn't have a spatial reference defined
for it to the current map:
In ArcMap,
in the toolbar Standard,
click on the button Add
Data.
In the dialog Add
Data, you should still be
in the folder mappingcoordinates;
add the layer masscounties.shp.
The dialog Unknown
Spatial Reference will appear
and warn you that this layer is "missing
spatial reference information" and "cannot
be projected".
Click on the button OK.
ArcMap
will use this layer's position data as if
it were intended for the current frame's
projection.
Question: Can
you understand this positioning using
what you've learned about projections?
In order to fix this layer (the
next procedure), you must first remove
it from your map, by right-clicking on
it in the Table of Contents,
and in its contextual menu clicking on
the menu itemRemove.
Quite often a layer will lack a .prj file, and you'll
need to manually assign it a coordinate system.
Ideally the source will provide this information
in another format (typically just a text description).
To assign or alter the coordinate system of a layer, you must use the
ArcCatalog software,
which is designed for the management of individual
layers, in particular their metadata.
To start ArcCatalog:
If you are already
in ArcMap,
look in the toolbar Standard
and click on the button ArcCatalog.
Otherwise:
Click
on the menu Start;
Point at the menu item All Programs;
If you
are in the public labs, point
at the menu item Course-related;
Then point at the menu item ArcGIS;
Click
on the menu item ArcCatalog.
When ArcCatalog finishes loading, it will
display a hierarchy of your connected folders
in its left pane:
Navigate to the layer of interest,
e.g. masscounties.shp.
If necessary, make a new connection first by
going to the toolbar Standard and
clicking on the button Connect
to Folder.
In the left pane, click
on the file of interest, and the right pane
will display information about the
layer.
Note the tabs above the right pane; click
on the tab Preview, and a map of the layer
will appear.
In
the left pane, double-click on the layer
to review its properties.
In the dialog Shapefile Properties,
click on the tab XY Coordinate System,
and note that its name is “Unknown”.
To set the layer's spatial reference, you
can either select a specific coordinate system
from Arc's predefined collection, or you
can import one from another layer:
To choose a specific coordinate system:
Click
on the button Select…,
and the dialog Browse for
Coordinate System will
appear.
As
with data frames,
navigate through the collection
of geographic and projected
coordinate systems, and click
on the correct one, e.g. NAD
1983 StatePlane Massachusetts
Mainland FIPS 2001.prj,
Click on the button Add.
To import a coordinate system:
Click
on the button Import…,
and the dialog Browse for
Coordinate System will
appear.
Navigate through the file
hierarchy to find a layer
with the desired spatial
reference (often a neighbor),
and click on it.
Click on the button Add.
Back in the dialog Shapefile
Properties, click on the button OK.
Now repeat the previous exercise, and the Massachusetts counties should
be in their correct location.
As noted above, the location of the cursor
on the map in the current map coordinates
is displayed in the lower right corner
of the map window,
and they will change as you
move the cursor over the map.
Questions: In what
units are the current coordinates?
Where on the map are they near zero?
It's sometimes useful to change the displayed units; as with the
map itself, this is controlled by the data
frame that holds
your layers.
In ArcMap ,
in the toolbar Tools,
click on tool Measure,
and the
dialog Measure will
appear. Move it around so you
can see the map pane.
To measure
a distance:
Click
on the menu Choose Units,
then point at the menu item Distance ,
and finally choose a unit, e.g. Kilometers.
Click
on the the tool Measure Line.
In the map pane, click
at the starting point
of your measurement,
then click on any intervening
points, and finally double-click
on the end point.
The length
of each segment will
be displayed as you go,
and the total length
will also be displayed.
To measure an area:
Click on the menu Choose Units,
then point at the menu
item Distance ,
and finally choose a
unit, e.g. Hectares.
Click
on the the tool Measure an Area.
In the map pane, click
at the starting point
of your measurement,
then click on any intervening
points, and finally double-click
on the end point (this
doesn't have to be the
starting point).
The length
of each segment will
be displayed as you go,
and the total perimeter
will also be displayed,
along, of course, with
the area.
Warning: Remember that distances and
areas are usually distorted by map projections,
and can therefore have different values
in different projections (often by huge
amounts)!
Map distortion is also important when
displaying scale
bars on a layout; they
will usually only be perfectly accurate
along standard parallels and meridians,
and are best avoided if the map covers
a much larger area.
In ArcMap,
in the menu View, select the
item Layout View.
In the Table of Contents,
double-click on the frame of interest, e.g. Layers.
In the dialog Data Frame Properties:
Click on the tab Grids.
Click on the button New Grid….
In the dialog page Grids and Graticules Wizard:
In the area Which do you want to create?,
click on the button Graticule: divides map by meridians and parallels (the
other options are as described above).
In the field Grid name, you can
choose a name for the grid, to distinguish it if you create more
than one.
Click on the button Next >.
In the dialog page Create a graticule:
In the area Appearance, click
on the button Graticule and labels.
The
other options don't create a full grid but let you have,
along the edges, Tick
marks and labels or Labels only.
In the area Intervals, type in
the spacing of the graticule lines for both parallels of latitude
and meridians of longitude (these are initially set to a suggested
value based on the map scale).
Click on the button Next >.
In the dialog page Axes and labels:
In the area Axes, you can choose
whether to have both major and minor tick marks, and the
style of lines.
In the area Labeling, you can
select the style of the text along the edges.
Click on the button Next >.
In the dialog page Create a graticule:
in
the area Graticule Properties, usually
you will want to click on the button Store as a fixed grid that updates with changes to the data frame,
at least until you're certain about the final view of the map.
The
other option, Store as a static graphic that can be edited,
won't update automatically, but you can edit the grid
with the graphics tools, e.g. to remove specific
grid lines.
In the area Neatline, you
can choose to have an additional border outside of the
labels by clicking on the button Place
a border outside the grid.
Click on the button Finish.
Back in
the dialog Data Frame Properties,
click on the button OK.
If you later want to change some of these properties, repeat
steps (1), (2), and (3a), then click on the button Properties….
Geographic
data is commonly in the form of simple
text tables describing points on
the surface of the Earth. The tables
consist of a pair of spatial coordinates
(e.g. latitude and longitude) in
each row, and possibly a feature
label and other data. Such data is
common in books and journals in all
areas of research, whether archaeology
or biology. This is also the simplest
format of data downloaded from
GPS receivers.
Tables can be in a number of different file formats but all sharing
the same simple layout, as described
in the document Mapping Geographically
Named Data in the section
Geographically
Named Data and also in the section Formatting
Tables for Joins.
An example is this collection of Massachusetts
waterfalls copied from geology.com into
the comma-separated values file MassachusettsWaterfalls.csv:
Waterfall,County,Latitude,Longitude,USGS Map
Bash Bish Falls,Berkshire,42.114722,-73.493333,Bash Bish Falls
Bear Rock Falls,Berkshire,42.061389,-73.436111,Bash Bish Falls
Campbell Falls,Berkshire,42.045833,-73.233333,South Sandisfield
The Cascade,Worcester,42.285833,-71.863889,Worcester North
… , … , … , … , …
Important: When you compile tabular
coordinate data, make certain you note
its spatial reference! The source for
the data above says it is extracted from
USGS maps, which implies that it is NAD
1983, but they are not explicit (e.g.
it could actually come from older maps
and therefore be NAD 1927).
In ArcMap,
in the toolbar Standard, click on
the button Add
Data.
In the dialog Add Data,
navigate into the folder with
the table to be added, e.g. mappingcoordinates.
Double-click on the table to be added, e.g the text file MassachusettsWaterfalls.csv.
If ArcMap notices formatting errors
in the document, it will at this
point complain about them (hopefully
in an informative way) and refuse
to add the document.
In the menu Tools , select the item Add XY Data….
In the dialog Add XY Data,
in the menu Choose a table from the map or browse for another table:,
select the added file.
Note the
adjacent button Browse,
which is an alternative to adding
the data as in Steps (2) - (4);
however, it won't do any error
checking.
In the area Specify the fields for the X and Y coordinates: ,
in the menus X Field: and Y Field:, choose
the correct columns, e.g. Longitude and Latitude.
In the area Coordinate System of Input Coordinates ,
click on the button Edit….
In the dialog Spatial Reference Properties,
choose the correct spatial reference
for the data as described in Procedure
5: Steps (7) and (8) (e.g. NAD 1983).
Back in the dialog Add XY Data,
click on the button OK .
ArcMap will likely complain that The
Table Does Not Have Object-ID
Field, but you can dismiss this
complaint by clicking on the
button OK.
In Step (4), the Table of Contents switched
its view to Source because
the table was initially not mappable.
Click
on the bottom tab Display to
see the mappable items,
and you'll see that a new layer
was added here with the suffix "Events".
As with geocoded
data, an events layer is constructed
on the fly, with its details
stored in the map document. It is therefore
somewhat limited in its abilities,
e.g. items are not selectable.
To
save the events layer as an independent
shapefile, right-click on the
layer to open its contextual
menu, point at the menu item Data,
then in the submenu that appears
click on the menu item Export Data….
In the dialog Export Data,
in the menu Export, choose All features .
In the button set Use the same coordinate system as:,
choose between retaining this layer's source data (the
default) or using the spatial reference of the
data frame.
Near the text field Output shapefile or feature class:
Click on the button Browse;
In the dialog Saving Data,
navigate to an appropriate location for the new data set,
e.g. the folder mappingcoordinates;
Give the new layer a descriptive name, e.g. Massachusetts
Waterfalls.shp;
Click on the button Save.
Back in the dialog Export Data,
click
on the button OK.
The dialog ArcMap will
now appear, asking if you want to add the exported layer to
the map; click your preference Yes or No.
A useful source of coordinate-based
data is the United States Geological
Survey's Geographic
Name Information Service, which
has an extensive list of domestic
features and their coordinates, including
many historic sites that no longer
exist. Another is the National Geospatial-Intelligence
Agency's Geonet
Names Server, which provides
a similar service for foreign names.
These sites don't provide their
data in an easy-to-use,
downloadable format, however,
which is also true of many other
web sites.
Look up the information you want to map.
For the GNIS, the procedure is:
In the sidebar, click on the link Search.
In the web page GNIS
Feature Search, click on the
menu State and
choose one, e.g. Massachusetts.
The menu County will
then be populated with the possibilities,
so you can pick one, e.g. Hampshire.
In the list Feature
Class, choose one, e.g. School.
If you want, in the text field Feature
Name you
can type some or all of the of the
name of what you are looking for,
e.g. Amherst.
Click on the button Send
Query.
In the page GNIS
Search Results, click
on the link View & Print
all; this will display
all of the data on a single page,
but may take a while if there
are many names.
Save the entire page as
an HTML file and then open it with Excel;
its table structure will be preserved (for
the most part*). If you
are using an Internet browser other than
Firefox, the data in this table can also
be copied and pasted into Excel as a table
(but this may leave hidden data behind*).
Very commonly latitude and longitude will
be written in Degrees-Minutes-Seconds notation.
However, for ArcGIS to properly interpret
them, all longitudes and latitudes
must be expressed in decimal degrees, with
a minus sign if they are west or south. Excel's
text functions can be used to make this conversion
for you. For example:
In the USGS example above, latitude and
longitude are written in a fixed-width
Degrees-Minutes-Seconds notation, and
the following expressions can be used
to separate the pieces and turn them
into decimal degrees:
Enter these formulae into two new cells
in the same row as the first feature;
Change the variables
lat and lon into
cell references by double-clicking
on them and then single-clicking
the appropriate cell;
Select these two cells and everything
below them through the last row of
data, and:
with Mac Excel or Windows
Excel 2004, menu Edit > Fill > Down ,
or
with Windows Excel 2007, menu Home >Editing > Fill ▾ > Down.
For example, if Feature Name is
in cell A1, Middlefield
School will
be in cell A2,
its latitude and longitude would
be in cells F2 and G2,
respectively, and the variables
lat and lon should
be changed to F2 and G2.
Of course DMS coordinates will usually
be written with punctuation, deg° min'
sec" dir.
To convert such data in Excel:
Select one column of coordinates and
copy it to a new column at the end of
the table;
Split the coordinate into four parts,
one for each part of the coordinate:
with Mac Excel or Windows
Excel 2004, menu Data > Text
to Columns…, or
with Windows Excel 2007, menu Data >Data Tools > Text
to Columns;
Repeat steps (a) and (b) for the second
coordinate;
Remove
the punctuation from all
of these columns by selecting them and
then:
with Mac Excel or Windows
Excel 2004, menu Edit > Replace or
with Windows Excel 2007, menu Home >Editing > Find
& Select ▾ > Replace…;
Enter this formulae
into each of two new cells in the same
row as the first feature:
Change the variables deg, min, sec,
and dir into
cell references to the latitude and longitude
components by double-clicking on
the former and then single-clicking the
appropriate cell;
Select these two cells and everything
below them through the last row of data,
and:
with Mac Excel or Windows
Excel 2004, menu Edit > Fill > Down ,
or
with Windows Excel 2007, menu Home >Editing > Fill ▾ > Down.
*One flaw in Excel's
interpretation of HTML is when a table cell
contains certains line-breaking tags such
as <br> and <div>,
and it introduces new rows instead of its
own version of line breaks.
For example,
the data provided by the Geonet International
Names Server includes both DMS as well as
decimal degree data (though the latter is
hidden until one clicks on the cell or loads
it into Excel). All four values are stored
in one cell, and when it's imported into
Excel what was one row turns into four.
There
are a few ways to fix this problem, one of
which is to first edit the html file with
a text editor to remove these tags. An Excel-oriented
approach follows:
In the first data row, in an empty
cell, type = and
then click on the cell containing
the decimal latitude. Repeat in the
next cell over for the decimal longitude.
For example, if a Geonet file has
its feature name in cell A2,
but its decimal latitude and longitude
are in cells D4 and D5,
then cells
F2 and G2 would
contain the text =D4 and =D5 (but
displayed as evaluated in the image
below):
To apply these formulae to rest of the
data, select
these two new cells and everything below
them through the last row of data, and:
with Mac Excel or Windows
Excel 2004, menu Edit > Fill > Down ,
or
with Windows Excel 2007, menu Home >Editing > Fill ▾ > Down.
Copy these two columns and replace their
formulae with the actual values by:
with Mac Excel or Windows
Excel 2004, menu Edit > Paste Special…,
and in the dialog Paste
Special click
on the button Values and
then the button OK.
with Windows Excel 2007, menu Home >Clipboard > Paste ▾ >Paste Values.
Select every data row in the table,
including the header, and remove
any merging of the cells:
with Mac Excel or Windows
Excel 2004, menu Format > Cells…,
or
with Windows Excel 2007, menu Home >Cells > Format ▾ > Format Cells…;
Then in the dialog Format
Cells, click
on the tab Alignment,
uncheck the boxs Merge
Cells and Wrap
Text, and click on the
button OK.
Then sort by the latitude:
with Mac Excel or Windows
Excel 2004, menu Data > Sort…,
or
with Windows Excel 2007, menu Home >Editing > Sort & Filter ▾ > Custom Sort…;
Then in the dialog Sort,
make sure the item My data has headers is
selected, and in the menu Sort by,
choose the latitude column,
e.g. (Column F),
and click on the button OK.
All of the feature names should
now be together in a group that starts
with the correct decimal latitudes,
probably in the middle somewhere,
and you can delete the other rows
(they will be grouped by either the
DMS latitude, DMS longitude, or
decimal longitude, which are extraneous
values for the sort column).
You will sometimes find other data formats on the Internet,
including KML files and GPX files. These are both text
documents, but they are structured in way that ArcGIS
doesn't (yet) know how to interpret. (KML might be inside
of KMZ; change the file extension to ZIP and then you
can open it and pull out the KML file.) The website GPSVisualizer.com is
a useful tool for converting these and other formats
to the output format plain text
table,
which contains tab-separated values. If you save
this with a TAB file extension, ArcGIS will be able to
open it as described above.