manual python
DESCRIPTION
manual pythonTRANSCRIPT
7/17/2019 Manual Python
http://slidepdf.com/reader/full/manual-python 1/2
UU ss ii nn gg AArr cc GG II SS DD ee ss kk tt oo pp
112200
You •rst create a domain and enter the codes and descriptions, or specify the numeric range. A coded value domaincan apply to any type of attribute—text, numeric, date, and so on. The domain type must match the data type you’re
creating the domain for (if the •eld is integer, the domain type must also be integer).
You then associate the domain with a •eld in one or more feature classes or tables in the geodatabase.
TT oo cc rr ee aa tt ee a
a dd oo mm aa
i
i nn ,, rr ii gg hh tt --cc ll ii cc kk
tt hh ee g
g ee oo dd aa
tt aa bb aa
s
s ee ii nn tt hh ee CC aa
tt aa ll oo gg
tt rr ee ee a
a nn dd cc ll ii cc kk PP rr oo pp ee rr tt ii ee ss
.. SS ee ll ee cc tt
tt hh ee DD oo mm aa ii nn ss tt aa bb oo nn tt hh ee DD aa tt aa bb aa ss ee
P
P rr oo pp ee rr tt ii ee ss
d
d i
i a
a l
l o
o g
g
b
b o
o x
x .
.
De•ning a code domain—select Coded
VV aa l
l u
u ee ss
i
i n
n
tt hh ee D
D o
o mm aa
i
i n
n
TT y y pp ee b
b o
o xx ..
De•ning a range domain—select Range in the
D
D o
o mm aa
i
i n
n
TT y y pp ee b
b o
o xx ..
E
E n
n t
t e
e r
r
t
t h
h e
e
n
n a
a m
m e
e
a
a nn dd dd ee
s
s cc rr ii pp tt ii oo nn
C
C
l
l
i
i
c
c
k
k
i
i
n
n
t
t
h
h
e
e
b
b
o
o
x
x
t
t
o
o
select the •eld type
E
E n
n t
t e
e r
r
t
t h
h e
e
m
m i
i n
n i
i m
m u
u m
m
a
a n
n d
d
mm aa x
x ii mm uu mm v
v a
a ll uu ee
s
s
f
f o
o rr t
t h
h e
e
rr aa n
n g
g e
e
EE nn tt ee rr t
t hh ee
cc oo dd ee
v
v a
a l
l u
u e
e s
s
a
a n
n d
d
dd ee s
s cc rr ii pp tt ii oo nn ss
C
C ll ii cc kk a
a nn y y ww
hh ee rr ee
ii nn t
t hh ee
row to select the •eld
C
C
l
l
i
i
c
c
k
k
t
t
h
h
i
i
s
s
b
b
o
o
x
x
t
t
o
o
s
s
e
e
l
l
e
e
c
c
t
t
t
t
h
h
e
e
d
d
o
o
m
m
a
a
i
i
n
n
f
f
r
r
o
o
m
m
t
t
h
h
e
e
l
l
i
i
s
s
t
t
After creating a domain, associate it with a •eld by
a
a cc cc ee ss
s
s i
i n
n g
g
tt hh ee p
p rr oo pp ee rr tt ii ee ss
ff oo rr tt hh ee ff ee aa tt uu rr ee cc ll aa
s
s s
s
o
o rr
tt aa bb ll ee .. RR ii gg hh tt --cc ll ii cc kk tt hh ee ff ee aa
tt uu rr ee cc ll aa s
s s
s i
i nn tt hh ee CC aa
tt aa l
l o
o g
g
tt rr ee ee ,, cc ll ii cc kk PP rr oo pp ee rr tt ii ee ss ,, a
a nn dd s
s ee ll ee cc tt tt hh ee FF ii ee ll dd ss
tt aa bb ..
7/17/2019 Manual Python
http://slidepdf.com/reader/full/manual-python 2/2
22 •
• GG ee oo gg rr aa pp hh ii cc DD aa tt aa MM aa nn aa gg ee mm ee nn tt
112211
Domains are created at the geodatabase level (for the entire geodatabase rather than for a feature dataset or individualfeature class) so they can be assigned to any of the feature classes or tables in the geodatabase. For example, a single
paving type domain could be assigned to both a Paving_type attribute in a highways feature class and a Surface_type
attribute in a streets feature class. Domains are managed using the Domains property page, which can be accessed
from the geodatabase’s properties dialog box, or from the Feature Class or Table Properties dialog box. The Domains
property page can be used to delete an attribute domain from the geodatabase or modify an existing domain.
Code domains constrain the values you can enter when editing attributes in ArcMap—a drop-down menu lets you
choose from the valid attribute values. A range domain doesn’t constrain the value that can be entered, but when you
validate your edits, any values that are outside the range will generate a warning so you can •x the error (see ‘Checking
y yoouurr ddaattaa ff oorr eerrrroorrss’’ iinn CChhaapptteerr 33) )..
U
U
s
s
i
i
n
n
g
g
s
s
u
u
b
b
t
t
y
y
p
p
e
e
s
s
t
t
o
o
a
a
s
s
s
s
i
i
g
g
n
n
d
d
e
e
f
f
a
a
u
u
l
l
t
t
v
v
a
a
l
l
u
u
e
e
s
s
a
a
n
n
d
d
d
d
o
o
m
m
a
a
i
i
n
n
s
s
S
S
u
u
b
b
t
t
y
y
p
p
e
e
s
s
a
a
r
r
e
e
b
b
a
a
s
s
e
e
d
d
o
o
n
n
c
c
a
a
t
t
e
e
g
g
o
o
r
r
i
i
e
e
s
s
o
o
r
r
c
c
l
l
a
a
s
s
s
s
e
e
s
s
w
w
i
i
t
t
h
h
i
i
n
n
a
a
f
f
e
e
a
a
t
t
u
u
r
r
e
e
c
c
l
l
a
a
s
s
s
s
o
o
r
r
t
t
a
a
b
b
l
l
e
e
,
,
a
a
n
n
d
d
a
a
r
r
e
e
a
a
w
w
a
a
y
y
o
o
f
f
a
a
s
s
s
s
i
i
g
g
n
n
i
i
n
n
g
g
d
d
e
e
f
f
a
a
u
u
l
l
t
t
v
v
a
a
l
l
u
u
e
e
s
s
and attribute domains without having to create separate feature classes or tables for each category. For example, in a
water network, it may be that transmission water mains can have a pressure between 40 and 100 psi, while distribution
water mains can have a pressure between 50 and 75 psi. Rather than creating separate feature classes for transmission
and distribution water mains, you’d create two subtypes—“transmission mains” and “distribution mains”—within the
water mains feature class. You could then assign different range domains for the water pressure •eld to each. Subtypes
ccaann aallssoo bbee uusseedd ttoo aassssiiggnn ddiiff ff eerreenntt ttooppoollooggy y rruulleess ttoo ddiiff ff eerreenntt tty yppeess ooff ff eeaattuurreess wwiitthhiinn aa ff eeaattuurree ccllaassss ((sseeee tthhee pprreevviioouuss section, ‘Ensuring spatial data integrity’).
The subtype for a feature in a feature class or a record in a table is determined by its subtype code value. The •eld
you’re using to de•ne subtypes must be short or long integer. If the values are currently stored as text attributes in
the table (as category values often are), you’ll need to add an integer •eld to the table and assign a numeric code to
each category value (see ‘Adding •elds and calculating attribute values’ in Chapter 5). For example, if you’re creating
subtypes for a parcel feature class using a general landuse code, and the categories are “residential,” “non-residential,”
and “undeveloped,” you’d need to add a new •eld to the feature class and assign an integer value to each feature based
on its landuse category—say 0, 1, and 2, respectively. You’d then use this new •eld to create the subtypes.
When editing a •eld with a code domain (in ArcMap), the attribute value is selected
f
f
r
r
o
o
m
m
a
a
d
d
r
r
o
o
p
p
-
-
d
d
o
o
w
w
n
n
l
l
i
i
s
s
t
t
.
.
WW ii tt hh oo uu tt tt hh ee dd oo mm aa i
i nn ,, vv aa
l
l u
u ee ss
hh aa vv ee tt oo bb ee tt y y pp ee dd
ii nn .. NN oo tt o
o nn ll y y dd oo ee ss
tt hh ee dd oo mm aa ii nn s
s a
a vv ee tt ii mm ee ,, ii tt
a
a
l
l
s
s
o
o
h
h
e
e
l
l
p
p
s
s
p
p
r
r
e
e
v
v
e
e
n
n
t
t
d
d
a
a
t
t
a
a
e
e
n
n
t
t
r
r
y
y
e
e
r
r
r
r
o
o
r
r
s
s
.
.