Geocoding …what is it good for? Alex Rodriguez [email protected] 605-773-5688.

34
Geocoding …what is it good for? Alex Rodriguez [email protected] 605-773-5688

Transcript of Geocoding …what is it good for? Alex Rodriguez [email protected] 605-773-5688.

Page 1: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Geocoding

…what is it good for?

Alex [email protected]

Page 2: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Geocoding defined:

"Geocoding" is the process of matching records in two databases:

your address database (without map position information)

and a reference street database/layer (with map position information).

Before geocoding:

After geocoding:

Address Zone X-Coord Y-Coord2425 E Pawn St 57501 -100.318837 44.35275

Address Zone X-Coord Y-Coord2425 E Pawn St 57501

Page 3: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Why geocode?

Location, location, location...

• Emergency Response/Management Fire Police Medical• Retail Sales Taxes: In/Out of city Marketing Where are my customers? Where do I advertise?• Real Estate House Statistics/Locations Market/Sales analysis

• Criminal analysis Crime statistics Crime analysis (what crimes happen where?) Crime prevention (registered sex offenders)• Demographic Analysis w/Census Statistics• Labor Statistics w/Census Statistics• Health/Human Services Where are illnesses occurring?

How can geocoding serve your agency?

Page 4: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

So how do I geocode?

Supplies:• ArcView 3.x or• ArcView 8.x• Road Layer with appropriate attributes with geocode index built• A table of addresses to be geocoded

…show me.Scissors (rounded tip)gluerulerconstruction paper…adult supervision

Page 5: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Set up the road layer:

Theme > properties > geocoding1) Select the Address Style2) assign field names3) Build the geocode index*

* build the geocode indexif it isn’t already built

ArcView 3.x

Page 6: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Get the address table:

Tables > Add > pierresample.dbf

Address in one field...

ArcView 3.x

Page 7: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Set up the geocode environment:

View > Geocode Address...

The source street layerIf there is an external road table

The style of address used

The table containing the addresses to be geocoded

The field in that table containing the addressThe field in that table containing the zone*

* Zone in our case refers to a Zip Code

Field to use for labelsDistance to offset from the street centerline

Street Alias Tables NameThe output shapefile location and name

Define all the geocoding parameters:

Set scoring parameters

ArcView 3.x

Page 8: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Set up the geocode environment:

Define all the scoring parameters:

Launch the geocoder

ArcView 3.x

Page 9: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Manage the results:

Rematch records:• All records• Selected records• Partial match records• No match records

Modify parameters:• All records• Selected records• Partial match records• No match records

Interactive Match:

ArcView 3.x

Page 10: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Interactive Match:

For each address

Interactively choosethe best match

ArcView 3.x

Page 11: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

For all your efforts:

A new shapefile

ArcView 3.x

Page 12: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

For all your efforts:

With an attribute table - Match Status - Match Score - Match Side - Lat/Long Coordinates (stored in the “Shape” field)

Add the Lat/Long values: - Set the table to editable - Add fields (x-coord, y-coord) - Calculate each field (x-coord = Shape.GetX) (y-coord = Shape.GetY) - Save the changes

ArcView 3.x

Page 13: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

What if I’m running ArcView 8.x?

It’s basically the same thing. Just a different interface…

…walk this way...

Page 14: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Set up the geocoding environment:

In ArcCatalog:

Create a new Geocoding Service

ArcView 8.x

Page 15: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Set up the geocoding environment:

In ArcCatalog:

Select the Service type*

This is the typical addressstyle for addresses in the US

* File vs GDB Geocoding Service:• File: Build a geocoding service (index) from a shapefile road layer• GDB: Build a geocoding service (index) from a GeoDatabase road layer

ArcView 8.x

Page 16: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Set up the geocoding environment:

Name the service

Pick the road layer

Assign the fields

Set scoringoptions

Set outputoptions

Select outputfields

ArcView 8.x

Page 17: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Set up the geocoding environment:

In ArcCatalog:

You now have a new Geocoding Service

ArcView 8.x

Page 18: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Use the new Geocoding Service:

Tools > Geocoding > Geocode Addresses...

ArcView 8.x

Page 19: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Use the new Geocoding Service:

Add the new Geocoding Service to your project

ArcView 8.x

Page 20: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Use the new Geocoding Service:

Add the new Geocoding Service to your project

The geocoding service we just created

ArcView 8.x

Page 21: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Use the new Geocoding Service:

Find the address table to be matched

Assign the field names

Define output Shapefile/Feature Class

Define Geocoding options

Define Geometry options

ArcView 8.x

Page 22: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Use the new Geocoding Service:

Define geometry options:

Use what spatial referencefor the output shapefile?

ArcView 8.x

Page 23: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Use the new Geocoding Service:

Define geocoding options:

Define alias table

Set scoring parameters

We don’t use intersections

Define output options

Define output attribute options

ArcView 8.x

Page 24: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Manage the results:

Rematch records:• All records• Selected records• Partial match records• No match records

Modify parameters:• All records• Selected records• Partial match records• No match records

Interactive Match:

ArcView 8.x

Page 25: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

For each address

Interactively choosethe best match

Manage the results:

ArcView 8.x

Page 26: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

For all your efforts:

A new shapefile

ArcView 8.x

Page 27: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

For all your efforts:

In the output table...

ArcView 8.x

Page 28: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Geocoding Pitfalls:

There are many things that can cause an address not to be geocoded:• Irregular addresses• Improperly attributed road layer• Incompletely attributed road layer• PO Boxes can’t be geocoded• Lat/Long values are the result of mathematical calculations …please explain• Murphy’s Geocoding Law...

Your geocoding results are only as good as your data...

Page 29: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Geocoding Pitfalls:

Irregular addresses:

• One Twenty Three Main St, 57501• 456 US Hwy 281 South, 57301• P O Box 234, 57501

The geocoding machine will have problems normalizing these addresses.The first consideration for the geocoding machine is to normalize the address. The road layer has been identified as having fields that represent: - Left/Right address ranges - Prefix Direction - Prefix Street Type - Street Name - Suffix Type - Suffix Direction - Left/Right Zone (Zip Code)The geocoding machine will have problems identifying which parts of theseaddresses to assign to each of these address parts. - “One Twenty Three” - won’t qualify as a house ‘number’ - “US Hwy 281” - won’t qualify as a single street name. As a result the parts get assigned incorrectly - “P O Box 234” - won’t be normalized correctly. There is no ‘house number’

Page 30: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Improperly attributed road layer:

Geocoding Pitfalls:

East Maple St.100 198101 199

Address to be matched: “135 E Maple Street”

Maple Street in thereal world:

Maple Street in thedatabase: FAddL TAddL FAddR TAddR PreDir PreType Name SuffDir SuffType ZoneL ZoneR

100 198 101 129 Maple Street 57501 57501

Incorrect address range

Missing prefix direction

Page 31: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Incompletely attributed road layer:

East Maple St.100 198101 199

Address to be matched: “135 E Maple Street”

Maple Street in thereal world:

Maple Street in thedatabase: FAddL TAddL FAddR TAddR PreDir PreType Name SuffDir SuffType ZoneL ZoneR

100 101 Maple 57501 57501

Geocoding Pitfalls:

Missing attribute information

Page 32: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Lat/Long values are the result of mathematical calculations

Geocoding Pitfalls:

Geocoded address: 150 E Maple St

100 198

199101 East Maple St.

The geocoding machine will find a match and determine that the lat/long values for this address isexactly half way along the line and on the left.

Without providing an offset distance for the geocoding machine, that coordinate pair will put thehouse in the center of the street.

Another element for consideration in the calculations is the ‘squeeze distance’. The squeeze distance tellsthe geocoding machine that no address is to appear within a certain distance of the end of the street. This prevents addresses from appearing at the end of the street and on the cross street.

squeeze

East Maple St

offset

100 E Maple St

Result: The Lat/Long values are not gospel.

Page 33: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Geocoding Pitfalls:

Murphy’s Geocoding Law: Nobody has the perfect dataset and there are always irregular addresses. If you get 100% matches all the time - someone is lying!

Page 34: Geocoding …what is it good for? Alex Rodriguez alex.rodriguez@state.sd.us 605-773-5688.

Thanks for coming, drive safely...

• Questions?• Comments? . . .• War Stories?

Alex [email protected]