0

I need to run a geocode, then do some calculations on the results, and then run the geocode again. Since the first geocode result is intermediate data, I tried to use the in_memory directory to speed up the process.

arcpy.geocoding.GeocodeAddresses(table, my_locator, r'in_memory\result_1', 'STATIC', None, '', None)

Then I run some tools like AlterField_management, AddField_management, CalculateField_management, DeleteField_management, and AddGeometryAttributes_management to rearrange/calculate things.

But then when I try to copy this to a file geodatabase, I get an error: the operation was attempted on an empty geometry

So then I tried running CheckGeometry to look at the FC geometry:

arcpy.CheckGeometry_management(r'in_memory\result_1', "check_geometry_result")

And it returns null geometry for every row (about 46,000 rows).

Everything seems to work fine if I write my results to the file geodatabase instead of in_memory, so I don't I think the issue lies in any of my additional calculations ran on the FC resulting from the geocode.

Is it possible to geocode addresses to in_memory? Documentation on this? http://desktop.arcgis.com/en/arcmap/10.5/analyze/modelbuilder/the-in-memory-workspace.htm doesn't seem to have much explanation.

Details:

  1. ArcGIS Pro 2.4
  2. Python 3.6.8
  • @Vince thanks! Fixed I think – siushi Dec 7 '19 at 0:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.