P. 1
44704326 Manual Arcgis

44704326 Manual Arcgis

|Views: 17|Likes:
Published by Liliana Ursu

More info:

Published by: Liliana Ursu on Jan 23, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/01/2013

pdf

text

original

Adding the X and Y coordinates of the centroids of polygons is similar to
adding X and Y coordinates to a point layer. With your attribute table open,
go to options, add new field called “X,” type “Double.” Right click at the top
of your new column and go to “Calculate Values…” Check “Advanced” and
type the following in the first box (that says “Pre-logic VBA Script Code”):

Then type “dblX” in the smaller text box (that says “X =”) in the text box
directly under the X field name. Click “ok.” Follow the same steps to create
and calculate a Y field, changing the Xs in the VB script to Y.

You can check the new XY coordinates by mapping them. With you table
open, click on “Options,” and go to “Export.” Say “yes” and add the new
table to your existing map, then close the table. From the tools menu, go to
“Add XY Data” and select your table from the drop down menu (ArcMap will
probably have done this for you already). Click “ok.” Your table of contents
should now show a new point layer that represents the centroid of your
polygon layer.

The script for calculating XY centroids can be found in ArcGIS Desktop Help
by clicking on the “search” tab, the typing “making field calculations.” Ac-
cessing the script this way will allow you to copy and paste the script.

Dim dblX As Double
Dim pArea As IArea
Set pArea = [Shape]
dblX = pArea.Centroid.X

HIllIER | USInG ARcVIEw 9.2

69

joInIng tableS

You can link map features to their attributes in GIS but only when your at-
tributes are in the same file as your geographic data. Often you will have
attributes stored in a separate table that you will need to join to a shapefile
in order to symbolize your map with the data. You might think of a shapefile
as a series of containers that can hold attribute data. Often you will obtain
shapefiles that have no attribute data—in effect, empty containers. This is
especially common with census data, when you will often obtain shapefiles
for census tracts and blockgroups in separate files from the census attribute
data (SF1 or SF3).

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->