Hi all,
I have a large locator file I need to create. I put the data on a drive with ample space and open a project in ArcGIS Pro 2.7 to that same drive. Used the Create Locator tool to build the file, but, no matter what settings I look at or configuration changes I attempt to make, it processes on the C drive where there is no space and I ultimately run out of space in short order.
ERROR 003088: Not enough disk space to build locator.
Has anybody run into a similar situation and know how to navigate around the issue?
Looking forward to your advise.
Sincerely,
Bryon
The tool documentation Create a locator—ArcGIS Pro | Documentation has:
When creating an address locator with reference data that contains millions of features, it is necessary to have at least 3 to 4 times the size of the data in free disk space on the drive containing your temp directory because files used to build the locator are written to this location before the locator is copied to the output location. If you do not have enough disk space, the tool will fail at some point during execution when it runs out of space. Also, keep in mind that when creating very large locators, you should have a machine with enough RAM to handle large memory-intensive processes.
I would guess it means the system temp folder is being used a staging location, e.g.
C:\Users\Username\AppData\Local\Temp
I think this can be changed with a system environment variable, but am stretching my knowledge a bit in this area. Hopefully this can give you a lead though.
hi there did you find a solution ? i am facing the same issue with a powerfull machine
Are you running it as a geoprocessing tool or a model or calling it from Python?
I have so much RAM and a small county dataset so I set it to "in_memory" to speed it up.
scratch_workspace = workspace = "in_memory"
"create_locator" does some data preparation then calls arcpy.geocoding.CreateLocator
I'll change the workspace and see what it does.
I created empty file GDBs and set workspace and scratch workspace to point at them.
I think maybe where you need to be careful is in settings the locations written for the LOC and SD files, that pushes a lot of data around.
#output goes to locator_file with LOC and LOZ extensions, I use something like
locator_file = "C:/TEMP/locator"
arcpy.geocoding.CreateLocator(
country_code="USA",
primary_reference_data=[
[roads, "StreetAddress"],
[parcels, "Parcel"],
[address_points, "PointAddress"],
# [poi, "POI"],
],
field_mapping=all_mappings,
out_locator=locator_file,
language_code="ENG",
alternatename_tables=[],
alternate_field_mapping=[],
custom_output_fields=[],
precision_type="GLOBAL_HIGH",
)
# Then you have to create an SDDRAFT file and then an SD file
# and again, you control the folder, I use this, obviously put them elsewhere
sddraft_file = "C:\\Temp\locator.sddraft"
sd_file = "C:\\Temp\\locator.sd"
print("Analyzing...")
analyze_messages = arcpy.CreateGeocodeSDDraft(
locator_file,
sddraft_file,
service_name,
copy_data_to_server=True,
summary=summary,
tags=tags,
max_result_size=10,
max_batch_size=500,
suggested_batch_size=150,
overwrite_existing_service=True,
)
if analyze_messages["warnings"] != {}:
print("Warning messages")
pprint.pprint(analyze_messages["warnings"], indent=2)
# Stage and upload the service if the sddraft analysis did not contain errors
if analyze_messages["errors"] == {}:
try:
print("Staging to", sd_file)
results = arcpy.server.StageService(sddraft_file, sd_file)
messages = results.getMessages()
pprint.pprint(messages, indent=2)
print("Uploading to", server)
results = arcpy.server.UploadServiceDefinition(
in_sd_file=sd_file,
in_server=server,
in_folder_type="EXISTING",
in_my_contents="SHARE_ONLINE",
in_public="PUBLIC",
)
messages = results.getMessages()
print("The geocode service was successfully published.")
pprint.pprint(messages, indent=2)
except arcpy.ExecuteError:
print("An error occurred")
print(arcpy.GetMessages(2))
I forgot to mention that i use visual studio 2022 as IDE. I didn't manage to find a solution for ERROR 003088: Not enough disk space to build locator. So now i am using arcgis pro python console and it works ok. (Copy paste the code from visual studio).
Ha ha so you have more disk space when running in Pro than VS, that's kind of weird.
Aside --- I gave up on VS Studio a couple years ago, I think VS Code is better for Python and JavaScript.