Select to view content in your preferred language

Rebuilding geocoder published to portal

05-15-2024 07:26 AM
Labels (1)
New Contributor III

Hi, I'm looking to write a script to rebuild a geocoder published to portal 11.2

Something like:


gis = GIS(
url="<portal url>",

gis_servers = gis.admin.servers.list()

server = gis_servers[0]

services ='Geocoders')

address_locator1 = services[0]  #locator to rebuild 1

address_locator2 = services[1]  #locator to rebuild 2

arcpy.geocoding.RebuildAddressLocator(address_locator1) #?


I can access the services and see everything so no issues there. But the reference data for these 2 locators, is in our local production DB.  So I'm not sure how the rebuild function would access the data.

Do I need to write a script that uses an sd draft instead? Or what if I changed the locators reference data to use publicly accessible hosted services? I'm assuming that would work.

Whats best practice? Thank you.


0 Kudos
1 Reply
Esri Regular Contributor

@AaronManuel2 The following help topic references the best practice for updating a locator and the geocode service.

0 Kudos