Select to view content in your preferred language

Set offset for street address role locator

3646
12
Jump to solution
02-17-2021 01:25 PM
Labels (2)
JoeBorgione
MVP Emeritus

I've  looked in the online help, googled, and have created a new locator thinking I have missed something.  Is there a way to set an offset in a street address role locator?  (ArcGIS Pro 2.6)

Edited to add:  Looks like in 2.7 it's available.  https://pro.arcgis.com/en/pro-app/latest/help/data/geocoding/tips-for-improving-geocoding-quality.ht...

 

JoeBorgione_0-1613597929180.png

 

 

@BradNiemand 

That should just about do it....
0 Kudos
1 Solution

Accepted Solutions
BradNiemand
Esri Regular Contributor

Joe,

 

The ability to edit the side offset and end offset was added at Pro 2.7.

 

Brad

View solution in original post

12 Replies
DanPatterson
MVP Esteemed Contributor

is it one of those weird ones like....

The location that contains an offset distance from the found address, for example, 30 yards south from 342 Main St. This is only supported for locators created with the Create Address Locator tool.


... sort of retired...
0 Kudos
JoeBorgione
MVP Emeritus

Create Address Locator is so passe. Since we are strictly a Pro shop, I use only use Create Locator.  After 2.6 the old style address locators are no longer supported, and I'm guessing that was part of the motivation to add setting the offset at 2.7.

You know how much I love to upgrade versions. Here goes...  😱

That should just about do it....
0 Kudos
DanPatterson
MVP Esteemed Contributor

The quote was from 2.7 help as well


... sort of retired...
0 Kudos
BradNiemand
Esri Regular Contributor

Joe,

 

The ability to edit the side offset and end offset was added at Pro 2.7.

 

Brad

IanMackenzie
Emerging Contributor

FYI.   Display Options including side offset will disappear when you disable   "Street Address" as a geocoding match option (Geocoding options >> Match Options >> Categories to support).  This is something you might do, for example, if you only want that particular locator to work for reverse geocoding within a composite locator.  Even though the display option is inaccessible the offset still applies when you reverse geocode (point will jump the set distance to side of line when you click on map).  If you want to set the offset you need to do this before you turn off the match option.  In my case I wanted the point to remain on the line as I am only using this "sub"locator to return the street name on a reverse geocode.  So I set the offset to 0 and then changed the match options. This is the case as recently as v 3.0.

0 Kudos
JoeBorgione
MVP Emeritus

Just upgraded to 2.7:  While I haven't created a new locator I can adjust the offset to existing ones that were created in 2.6 which is cool

@BradNiemand  are the offset properties available in arcpy?

 

That should just about do it....
0 Kudos
DanPatterson
MVP Esteemed Contributor

Locator—ArcGIS Pro | Documentation  short read


... sort of retired...
0 Kudos
JoeBorgione
MVP Emeritus

I've used the locator class as the finishing touch to a create locator script:

# -*- coding: utf-8 -*-
"""
Created on Fri Dec 18 10:06:14 2020

@author: jborgione

Single Role Street Address Locator
"""

import arcpy

arcpy.env.overwriteOutput = True
arcpy.SetLogHistory(False)

''' Set the stage and create the locator'''

locatorDir = r'N:\GIS\Geocoding'
locatorName = 'SingleRoleStreetAddressLocator'
outLocator = f'{locatorDir}\{locatorName}'

language = 'ENG'
country = 'USA'

inTable = "https://pathTo/rest/services/internalDrive/FeatureServer/9 StreetAddress;"
          
          
          
fieldMapping =  "'StreetAddress.HOUSE_NUMBER_FROM_LEFT 9.FROMADDR_L';"\
                "'StreetAddress.HOUSE_NUMBER_TO_LEFT 9.TOADDR_L';"\
                "'StreetAddress.HOUSE_NUMBER_FROM_RIGHT 9.FROMADDR_R';"\
                "'StreetAddress.HOUSE_NUMBER_TO_RIGHT 9.TOADDR_R';"\
                "'StreetAddress.STREET_PREFIX_DIR 9.PREDIR';"\
                "'StreetAddress.STREET_NAME 9.NAME';"\
                "'StreetAddress.STREET_SUFFIX_TYPE 9.POSTTYPE';"\
                "'StreetAddress.STREET_SUFFIX_DIR 9.POSTDIR';"\
                "'StreetAddress.CITY_LEFT 9.INCMUNI_L';"\
                "'StreetAddress.CITY_RIGHT 9.INCMUNI_R';"\
                "'StreetAddress.METRO_AREA_LEFT 9.UNINCCOM_L';"\
                "'StreetAddress.METRO_AREA_RIGHT 9.UNINCCOM_R';"             
                
arcpy.geocoding.CreateLocator(country, inTable, fieldMapping, outLocator, language)

''' With the locator now created, use the new locator class to set values
    of various properties'''

locatorPath = f'{outLocator}.loc'
locator = arcpy.geocoding.Locator(locatorPath)

locator.matchOutOfRange = False
locator.minCandidateScore = 80
locator.minMatchScore = 85
locator.categories = 'Street Address,Intersection'
locator.reverseGeocodeFeatureTypes = 'StreetInt,StreetAddress'
locator.updateLocator()  

 

That should just about do it....
0 Kudos
BradNiemand
Esri Regular Contributor

Joe,

 

This is not currently supported for arcpy.  We have an issue in our backlog to get it added in an upcoming release.

 

Brad