Geocoding Table with Anonymized Addresses & Lat/Lon

2273
19
Jump to solution
11-28-2022 10:31 AM
WalidAlmasri1
Occasional Contributor

Hello, I am trying to set up a process to map locations to a street centerline by either an address or or by lat/lon if no address exists or if the address cannot be found.  I have created a geocoder that only uses the Street Address Role and have a process set up to change addresses from 1234 N Main to 1200 N Main in an effort to anonymize them.  All locations have a lat/lon even if no address exists.  The geocoder is configured properly and geocodes the events to the street centerline with the address.  The issue I am having is that the geocoder will not locate events by lat/lon where no addresses match can be found.  Even if I only specify the geocoder to use the Coordinate System Category in the Geocode Table dialogue box, it will return zero matches.

Just wondering if anyone has any input on how I can geocode based on lat/lon.  Everything I've tried seems to not work.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
ShanaBritt
Esri Regular Contributor

@WalidAlmasri1 If the Address field is the input address field and it contains 'Null' values for the record, there is no input that is geocoded, so the record with a 'Null' value will be unmatched. I would suggest moving the coordinate pair to the address field, by selecting all of the records that have 'Null' values, the using Calculate Field concatenate the Lat and Lon fields into the Address field. [Lon] + ","+ [Lat] Then geocode the table with the locator that has the Coordinates category enabled.

View solution in original post

19 Replies
jcarlson
MVP Esteemed Contributor

You should be able to use X/Y in the Rematch Addresses tool. Have you tried that?

- Josh Carlson
Kendall County GIS
0 Kudos
WalidAlmasri1
Occasional Contributor

Yes, but unfortunately, this will become an automated process that will run daily, so there will be no interaction for manual matching.  We already map the data internally by lat/lon and locations that do not have a lat/lon from creation get moved to a fixed location depending on the district they are assigned.

I'm looking publish the data publicly, which is why I am altering the addresses and hoping to use lat/lon where no address exists.

0 Kudos
jcarlson
MVP Esteemed Contributor

Perhaps there is a way with the ArcGIS Python API? arcgis.features.GeoAccessor.from_df() will geocode the input table, and you can specify the geocoder used. There is also from_xy(), which would handle the lat/lon input.

So perhaps something like this? Haven't tested this out, but it might be a starting point.

import arcgis
import pandas as pd

# load your address table as a DataFrame; this will depend on its format, location, etc

# get the blank addresses
no_addrs = df[df['address_field'].isna() == True]

# get addresses
addrs = df[df['address_field'].isna() == False]

sdf_addrs = arcgis.features.GeoAccessor.from_df(addrs, 'address column', 'your geocoder')

sdf_noaddrs = arcgis.features.GeoAccessor.from_xy(no_addrs, 'lon', 'lat')

# merge into one dataframe
geocoded = pd.concat([sdf_addrs, sdf_noaddrs], ignore_index=True)

# then export / upload as needed

 

- Josh Carlson
Kendall County GIS
0 Kudos
WalidAlmasri1
Occasional Contributor

Thanks, I will look into this option!

0 Kudos
WalidAlmasri1
Occasional Contributor

Maybe I should simplify the question.  Can a geocoder geocode lat/lon or XY's?  Because the geocoders I create seem to not be able to perform that function. 

0 Kudos
ShanaBritt
Esri Regular Contributor

Building a locator with the Create Locator or Create Feature Locator tools suppors global search for coordinates (latitude/longitude, MGRS, DD, or USNG). Support for coordinate searching is disabled or enabled under Categories to support on the Geocoding options page of the Locator Properties dialog box for the locator. What is the format of the coordinates you are using? Can you enter the same coordinates into the Locate pane and get results returned by the StreetAddress role locator you created? What is the coordinate system of the locator (the reference data)?

Also, are you not able to use Make XY Event Layer to generate points from the coordinates?

-Shana 

0 Kudos
WalidAlmasri1
Occasional Contributor

Hello @ShanaBritt  Making an event layer works out fine, but that's not what I am trying to do.  We have many records that map an exact location and I am trying to geocode masked addresses (to hundred block - EX: 2352 = 2300) back to the street centerline.  Most of the locations do geocode back to the centerline, but many that do not have an address, but have Lat/Lon, to do not get processed by the geocoder even with coordinate category selected.  I have investigated other methods like reverse geocoding the layer, which yields better results (sort of), but also causes issues when the reverse geocode goes to the wrong street since it was closer than where the address specifies.

I'm really trying to find how precise data is anonymized and I'm not having very good luck it seems.

0 Kudos
ShanaBritt
Esri Regular Contributor

It's possible to search for Street blocks, which is described here for StreetAddress role, https://pro.arcgis.com/en/pro-app/3.0/help/data/geocoding/introduction-to-locator-roles.htm#ESRI_SEC.... You will need ArcGIS Pro 2.7 or later to build a locator that supports searching for street blocks, for example "100 block of New York St, Redlands, CA". How do you have the block address formatted in your input address table? You will need to modify your address table to change addresses from "1234 N Main" to '1200 block of N Main' in order to get the matches you are looking for. You can also test this out using the following tutorial and the test addresses at the bottom of the tutorial. https://pro.arcgis.com/en/pro-app/latest/help/data/geocoding/tutorial-create-a-locator.htm#

0 Kudos
WalidAlmasri1
Occasional Contributor

@ShanaBritt Correct, I do have the addresses as "700 Block E Olive Ave" for example.  Those will geocode to the centerline, but if there is no address (null) the locator does not resort to plotting the lat/lon of the data:

See below:

WalidAlmasri1_0-1671667996562.png

I can create an event layer just fine with this test layer.

Also, my geocoding settings:

WalidAlmasri1_1-1671669290750.png

 

0 Kudos