POST
|
Hello, Please a screenshot below. I have ArcGIS pro, portal, and online. For this, I am using ArcGIS Pro and it's signed in to ArcGIS online. By using enrich tool, where is the data source coming from? does ESRI do their own surveys? Where is that data set coming from though - is it census, etc?? It is not clear. I read some info stated business analyst, esri or online. Please clarify. Thank you for support and time.
... View more
12-21-2023
09:26 AM
|
0
|
0
|
285
|
POST
|
@RonaldHaug Hello thank you for the info. I am rusty. i was trying to pull data but i am unable to. it shows only table of total population. and how do i set up heat map? please kindly advise. thank you.
... View more
12-19-2023
01:04 PM
|
0
|
1
|
338
|
POST
|
Hello all. I have ArcGIS Desktop, GP tool, ArcGIS Pro /online/portal, python, enterprise. GIS Map of the City, with points for elderly residents. Those point clusters should start to create a heat map like visual that can show where the highest concentration of elderly residents live. The points for the trolly stops and public transit stops should be the easiest points to source and are there purely for context about nearby transit options the clusters might have available. This person identified several age bands for the data (maybe color coded) 60-70, 71-80, => 81. Some potential data sets we might be able to use to source the demographic info were parks data (silver club members, current - but that will be a small pool), potentially voter registration, golden passport members. Those were just some ideas that came up - we're open to any additional data sets that can help us inform the outcome we're looking for. Please kindly advise. Thank you for your support and your time. Alex
... View more
12-18-2023
11:40 AM
|
0
|
3
|
429
|
POST
|
@Robert_LeClair Thank you for your reply. I tried to run enrich tool included distance as 0 from point shapefile. the result was error. I also do have ArcGIS Insight. Do you have steps to recommend?
... View more
12-06-2023
10:22 AM
|
0
|
1
|
322
|
POST
|
Hello, I have ArcGIS Pro, and ArcGIS Online. I have a question regarding the point shapefile transit stop in city boundary. Someone wants to see a GIS Map of the City, with points for elderly residents. Those point clusters should start to create a heat map like visual that can show where the highest concentration of elderly residents live. The points for the trolley stops and public transit stops should be the easiest points to source and are there purely for context about nearby transit options the clusters might have available. identified several age bands for the data (maybe color coded) 60-70, 71-80, => 81. Some potential data sets we might be able to use to source the demographic info were parks data (silver club members, current - but that will be a small pool), potentially voter registration, golden passport members. Using Age: 5 years increments population senior citizen 60+. I found tools Enrich and Buffer. Is it required to input distance or can it be without? Please need your advice. Thank you for your time and support. Alex
... View more
12-06-2023
09:31 AM
|
0
|
3
|
393
|
POST
|
Hello @RhettZufelt Thank you for your reply. Do I also need to input UNC path on add argument optional since it is not letter C:?
... View more
03-16-2023
09:27 AM
|
0
|
1
|
1269
|
POST
|
Hello, Thank you for your reply. the add argument is already add full path. by full path, I have different letter than C: and it is already set up map network. I am gonna try using UNC as per @RhettZufelt .
... View more
03-16-2023
09:09 AM
|
0
|
0
|
1273
|
POST
|
Hello all, I have ArcGIS Pro 3.0, window task scheduler and python 27. I am not expertise with window task scheduler. Please see screenshots and error below. It is working successful when I run python script manually. But when I tried to run window task scheduler, I got error messages. I am not sure what to do. Please kindly assist. Thank you so much in advance. ERROR MESSAGES PYTHON SCRIPT CODE import arcpy
import csv
import os
from datetime import date
from datetime import datetime
matchTableName = r"ElevationCertificatesAttachmentMatchTable.csv"
docFolder = r"Q:\2023\IMPORTED TO GIS"
matchField = "MatchID"
pathField = "Filename"
#change this date to the disired value
processFilesAddedOnDate = date.today()
# iterate through each .pdf file in the directory and write a row to the table
for (root, dirs, files) in os.walk(docFolder):
workingFolder = root
matchTableNamePath = os.path.join(root, matchTableName)
# create a new Match Table csv file
if os.path.exists(matchTableNamePath):
os.remove(matchTableNamePath)
writer = csv.writer(open(matchTableNamePath, "w", newline=''), delimiter=",")
# write a header row (the table will have two columns: ParcelID and Picture)
writer.writerow([matchField, pathField, 'fullPath'])
for f in files:
if '.pdf' in f:
#if datetime.strptime(os.path.getctime(os.path.join(root, f)),"%m/%d/%Y") >= processFilesAddedOnDate:
if date.fromtimestamp(os.path.getctime(os.path.join(root, f))) >= processFilesAddedOnDate:
#print(processFilesAddedOnDate)
#print(date.fromtimestamp(os.path.getctime(os.path.join(root, f))))
fileNameToAddress = f.replace(".pdf", "")
fileNameToAddress = fileNameToAddress.replace(" ", " ");
fileNameToAddress = fileNameToAddress.replace("nw", "NW")
try:
firstPartUntilNW = fileNameToAddress.split("NW")[0].strip().split(" ")
restAfterNW = fileNameToAddress.split("NW")[1].strip()
#print(firstPartUntilNW, len(firstPartUntilNW))
#print(restAfterNW)
fileNameToAddressWithNoPermitNumber = ""
if len(firstPartUntilNW) == 2:
fileNameToAddressWithNoPermitNumber = firstPartUntilNW[1]+" NW "+restAfterNW
if len(firstPartUntilNW)== 1:
fileNameToAddressWithNoPermitNumber = firstPartUntilNW[0]+" NW "+restAfterNW
#print(fileNameToAddressWithNoPermitNumber)
writer.writerow((fileNameToAddressWithNoPermitNumber,f, os.path.join(root, f)))
except:
continue
del writer
# Set the workspace environment and run add attachment
arcpy.env.workspace = r'C:\Users\AppData\Roaming\Esri\ArcGISPro\Favorites\test.sde'
arcpy.management.AddAttachments('sde.TEST.TEST', 'ADDR', matchTableNamePath, "MatchID", "Filename", workingFolder)
... View more
03-15-2023
01:39 PM
|
0
|
8
|
1346
|
POST
|
Hello all, I have ArcGIS Pro 3.0 and python 27. I am not expertise with code. Please see error and code below. It is working fine when using "processFilesAddedOnDate = datetime.strptime('01/01/2023', '%m/%d/%Y')". But when I switched to "processFilesAddedOnDate = date.today()", I got an error message. I am not sure what to do. Please kindly assist. Thank you so much in advance. ERROR MESSAGE = RESTART: M:\ArcGIS\ArcGIS\Projects\EC\PROD2023.py Traceback (most recent call last): File "M:\ArcGIS\ArcGIS\Projects\EC\PROD2023.py", line 33, in <module> if datetime.fromtimestamp(os.path.getctime(os.path.join(root, f))) >= processFilesAddedOnDate: TypeError: can't compare datetime.datetime to datetime.date >>> PYTHON SCRIPT CODE import arcpy
import csv
import os
from datetime import date
from datetime import datetime
matchTableName = r"ElevationCertificatesAttachmentMatchTable.csv"
docFolder = r"Q:\2023\IMPORTED TO GIS"
matchField = "MatchID"
pathField = "Filename"
#change this date to the disired value
#processFilesAddedOnDate = datetime.strptime('01/01/2023', '%m/%d/%Y')
processFilesAddedOnDate = date.today()
# iterate through each .pdf file in the directory and write a row to the table
for (root, dirs, files) in os.walk(docFolder):
workingFolder = root
matchTableNamePath = os.path.join(root, matchTableName)
# create a new Match Table csv file
if os.path.exists(matchTableNamePath):
os.remove(matchTableNamePath)
writer = csv.writer(open(matchTableNamePath, "w", newline=''), delimiter=",")
# write a header row (the table will have two columns: ParcelID and Picture)
writer.writerow([matchField, pathField, 'fullPath'])
for f in files:
if '.pdf' in f:
#if datetime.strptime(os.path.getctime(os.path.join(root, f)),"%m/%d/%Y") >= processFilesAddedOnDate:
if datetime.fromtimestamp(os.path.getctime(os.path.join(root, f))) >= processFilesAddedOnDate:
#print(os.path.getctime(os.path.join(root, f)).strftime("%m/%d/%Y")+ ' ' + processFilesAddedOnDate.strftime("%m/%d/%Y"))
fileNameToAddress = f.replace(".pdf", "")
fileNameToAddress = fileNameToAddress.replace(" ", " ");
fileNameToAddress = fileNameToAddress.replace("nw", "NW")
try:
firstPartUntilNW = fileNameToAddress.split("NW")[0].strip().split(" ")
restAfterNW = fileNameToAddress.split("NW")[1].strip()
#print(firstPartUntilNW, len(firstPartUntilNW))
#print(restAfterNW)
fileNameToAddressWithNoPermitNumber = ""
if len(firstPartUntilNW) == 2:
fileNameToAddressWithNoPermitNumber = firstPartUntilNW[1]+" NW "+restAfterNW
if len(firstPartUntilNW)== 1:
fileNameToAddressWithNoPermitNumber = firstPartUntilNW[0]+" NW "+restAfterNW
#print(fileNameToAddressWithNoPermitNumber)
writer.writerow((fileNameToAddressWithNoPermitNumber,f, os.path.join(root, f)))
except:
continue
del writer
# Set the workspace environment and run add attachment
arcpy.env.workspace = r'C:\Users\AppData\Roaming\Esri\ArcGISPro\Favorites\test.sde'
arcpy.management.AddAttachments('sde.123.test', 'ADDR', matchTableNamePath, "MatchID", "Filename", workingFolder)
... View more
02-24-2023
01:24 PM
|
0
|
2
|
2228
|
POST
|
@DanPatterson Thank you for the information. I tried this method and it doesn't work. I found a different method for sde file workspace location added above line "acrpy.management.addattachments" and it was successful. # Set the workspace environment and run add attachment
arcpy.env.workspace = r'C:\Users\AppData\Roaming\Esri\ArcGISPro\Favorites\test.sde'
... View more
02-15-2023
12:21 PM
|
0
|
0
|
852
|
POST
|
@DanPatterson Thank you for your prompt response. I ran it again and I got another error message below. I don't think I wrote the fullpath correctly. I am trying to set up using python scrip to set up in task scheduler. is it possible to set up ArcGIS Pro Notebook to window task scheduler? the goal is to have it run by task scheduler. Please kindly advise. = RESTART: M:\test\ArcGIS\Projects\EC\IMPORTEC.py Traceback (most recent call last): File "M:\test\ArcGIS\Projects\EC\IMPORTEC.py", line 53, in <module> arcpy.management.AddAttachments(r"C:\Users\AppData\Roaming\Esri\ArcGISPro\Favorites\test.sde", "sde.123.test", "ADDR", matchTableNamePath, "MatchID", "Filename", workingFolder) TypeError: AddAttachments() takes from 0 to 6 positional arguments but 7 were given >>>
... View more
02-10-2023
10:57 AM
|
0
|
0
|
928
|
POST
|
Hello all, I have ArcGIS Pro 3.0 notebook and python 27. I am not expertise with code. Please see error and code below. I exported from ArcGIS Pro notebook to Python script. It is working fine when run on ArcGIS Pro notebook. But when I tried to run Python script, I got an error message. I am not sure what to do. Please kindly assist. Thank you so much in advance. PYTHON SCRIPT CODE from arcgis.gis import GIS
import arcpy
import csv
import os
from datetime import date
from datetime import datetime
matchTableName = r"CertificatesAttachmentMatchTable.csv"
docFolder = r"Q:\2022\IMPORTED TO GIS"
matchField = "MatchID"
pathField = "Filename"
#change this date to the disired value
processFilesAddedOnDate = datetime. strptime('06/01/2022', '%m/%d/%Y')
#processFilesAddedOnDate = date.today()
# iterate through each .pdf file in the directory and write a row to the table
for (root, dirs, files) in os.walk(docFolder):
workingFolder = root
matchTableNamePath = os.path.join(root, matchTableName)
# create a new Match Table csv file
if os.path.exists(matchTableNamePath):
os.remove(matchTableNamePath)
writer = csv.writer(open(matchTableNamePath, "w", newline=''), delimiter=",")
# write a header row (the table will have two columns: ParcelID and Picture)
writer.writerow([matchField, pathField, 'fullPath'])
for f in files:
if '.pdf' in f:
if datetime.fromtimestamp(os.path.getctime(os.path.join(root, f))).strftime("%m/%d/%Y") >= processFilesAddedOnDate.strftime("%m/%d/%Y") :
fileNameToAddress = f.replace(".pdf", "")
fileNameToAddress = fileNameToAddress.replace(" ", " ");
fileNameToAddress = fileNameToAddress.replace("nw", "NW")
try:
firstPartUntilNW = fileNameToAddress.split("NW")[0].strip().split(" ")
restAfterNW = fileNameToAddress.split("NW")[1].strip()
#print(firstPartUntilNW, len(firstPartUntilNW))
#print(restAfterNW)
fileNameToAddressWithNoPermitNumber = ""
if len(firstPartUntilNW) == 2:
fileNameToAddressWithNoPermitNumber = firstPartUntilNW[1]+" NW "+restAfterNW
if len(firstPartUntilNW)== 1:
fileNameToAddressWithNoPermitNumber = firstPartUntilNW[0]+" NW "+restAfterNW
#print(fileNameToAddressWithNoPermitNumber)
writer.writerow((fileNameToAddressWithNoPermitNumber,f, os.path.join(root, f)))
except:
continue
del writer
arcpy.management.AddAttachments("sde.123.test", "ADDR", matchTableNamePath, "MatchID", "Filename", workingFolder) ERROR MESSAGE = RESTART: M:\test\ArcGIS\Projects\EC\IMPORTEC.py Traceback (most recent call last): File "M:\test\ArcGIS\Projects\EC\IMPORTEC.py", line 52, in <module> arcpy.management.AddAttachments("sde.123.test", "ADDR", matchTableNamePath, "MatchID", "Filename", workingFolder) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 874, in AddAttachments raise e File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 871, in AddAttachments retval = convertArcObjectToPythonObject(gp.AddAttachments_management(*gp_fixargs((in_dataset, in_join_field, in_match_table, in_match_join_field, in_match_path_field, in_working_folder), True))) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Dataset: Dataset sde.123.test does not exist or is not supported Failed to execute (AddAttachments).
... View more
02-10-2023
10:01 AM
|
0
|
4
|
957
|
POST
|
I ran it manually from task scheduler, and it is working. It seems like configuration issue with windows task. I am not sure where to narrow it down. It hasn't been changed.
... View more
03-22-2022
01:54 PM
|
0
|
0
|
1303
|
POST
|
Hello @BlakeTerhune Please see screenshots and python script. i also set it up on task scheduler. it was working running since September 2021 until stop recently. I haven't change any script and task scheduler. For some reasons, my zip file 'PaFiles.gdb' stopped working. I found out that the last time inside that zip file, it ran populated on Jan. 2022 but everything else is fine. Please advise. Thank you for your help. from arcgis.gis import GIS
# Python Standard Library Modules
from pathlib import Path, PurePath
from zipfile import ZipFile
public_data_item_id = '123'
anon_gis = GIS(username="123", password="123")
data_item = anon_gis.content.get(public_data_item_id)
data_path = Path('C:\123')
if not data_path.exists():
data_path.mkdir()
zip_path = data_path.joinpath('PAData.zip')
extract_path = data_path.joinpath('PADataDatasets')
with ZipFile(zip_path, 'r') as zip_ref:
zip_ref.extractall(extract_path)
data_item.download(save_path=data_path)
print (PurePath(zip_path))
from pathlib import Path, PurePath
from zipfile import ZipFile
data_path = Path('C:\123\PADataDatasets\PA_Data')
if not data_path.exists():
data_path.mkdir()
zip_path = data_path.joinpath('PaFiles.gdb.zip')
extract_path = data_path.joinpath('PaFiles.gdb')
with ZipFile(zip_path, 'r') as zip_ref:
zip_ref.extractall(extract_path)
print (PurePath(zip_path))
... View more
03-22-2022
07:56 AM
|
0
|
2
|
1309
|
POST
|
Hello, For user conference 2022, I am unable to find a proposal or justification letter. I need it to submit to my employer for approval. It has been posted on the website UC in the past UC, and now I can't find it. Please kindly advise. Thank you, Alex
... View more
03-18-2022
07:35 AM
|
0
|
1
|
898
|
Title | Kudos | Posted |
---|---|---|
1 | 07-25-2018 12:53 PM | |
1 | 08-06-2018 12:27 PM | |
1 | 07-06-2018 01:00 PM | |
1 | 05-04-2018 08:52 AM | |
1 | 07-30-2021 10:26 AM |