|
POST
|
I'm not sure if this the right place to post my question. I'm working on a Citizen Problem Reporter app. There's a Geoprocessing tool called Send Emails. I'm stuck on the Send Email Notifications section (pg. 34) question 9, 10: https://www.esri.com/content/dam/esrisites/en-us/media/pdf/learn-arcgis/configuring-citizen-problem-reporter.pdf How do I set this up? I'm able to view/edit the HTML it's referring to. I need help deciphering the two small paragraphs in questions 9 & 10.
... View more
09-27-2019
09:35 AM
|
3
|
8
|
5058
|
|
POST
|
I thought I had everything set up right, but I continually get this error message when submitting my report. Are there any obvious reasons why this is?
... View more
09-23-2019
12:14 PM
|
0
|
3
|
2691
|
|
BLOG
|
Amy, I was wondering where you added your app password? I have gmail and have created an app pasword, but I'm a little confused as to what I should do with it.
... View more
09-13-2019
02:21 PM
|
0
|
0
|
11160
|
|
POST
|
Rachel, Thanks. I went ahead and used a SQL expression to select all the signs that were not 2/7 --> exported them. Then I switched the selection in the attributes so as to only get the 2/7 signs. This I exported. Then I did a Spatial Join on the two feature classes. So, now the only extra fields are for the BackSide. I'll mark your former reply correct!
... View more
08-13-2019
11:44 AM
|
0
|
0
|
11483
|
|
POST
|
Hi Rachel, That was really helpful. Thanks a lot. I was able to create the new feature class with fields for both FrontSide and BackSide. Now I'm trying to figure out how to join this new feature class to all the points with the last digits being anything but 1/6, 2/7. These are the signs that are by themselves (i.e. nothing on the back). I exported the rest of the points to a feature class of its own. I'm thinking this would be a Join Features task, not a Spatial Join?
... View more
08-13-2019
08:18 AM
|
0
|
2
|
11482
|
|
POST
|
Hi Rachel, Thanks for the reply. Scenario 2 is what I'm after more or less. There's a field called "Post_Number" in the attributes, it's 7 digits. When the point/sign has something on back the last digit is either a 2 or a 7. In turn, to indicate the front of the sign the last digit is either a 1 or a 6. For example, this is the same sign as two different points: Is there a way to combine them based on distance while preserving the attributes?
... View more
08-12-2019
08:41 AM
|
0
|
4
|
11482
|
|
POST
|
Hello, I'm wondering how to combine points that are within a small distance from each other, but are from the same feature class. The points represent signs on a road. When the feature was originally created an additional point was created if the sign had something on the back-- so, two points for the same sign. But, the tricky thing is each point was given a unique number. My question is how can I bring these points together and at the same time preserve the attributes? In ArcGIS Pro, I've tried arcpy.MergeLayers_geoanalytics, but that doesn't seem to work because it requires two layers. I've also tried arcpy.Integrate_management, but this treats the points within a specified distance as vertices, and sort of pulls them on top of each other. In this screen shot is an example of two signs with a point for the front of the signs and a point of the backs. I'm looking to combine these somehow?
... View more
08-12-2019
07:35 AM
|
0
|
6
|
11816
|
|
POST
|
Lance, Thanks. I changed the sde variable to a network directory sde connection file: sde = r'\\gisfile\GISstaff\Jared\connectionadmin.sde\gisedit.DBO.dFIRM_2019_Effective' It threw an error: ERROR 000733: Output Feature Class: Same as input Input Features
Failed to execute (CopyFeatures). I wonder if this has to do with env.overwriteOutput not being too reliable. EDIT: That was the wrong dataset name. It should be: sandbox.DBO.dFIRM_2019_Effective I ran it again with this and it gave me the schema lock error: ERROR 000464: Cannot get exclusive schema lock. Either being edited or in use by another application or service.
Failed to execute (CopyFeatures). I have nothing open except for Pyscripter? And nobody in my office is logged in as gisadmin?
... View more
08-07-2019
11:49 AM
|
0
|
1
|
6246
|
|
POST
|
This question is based off of another one I just had. I can't seem to update a feature dataset in a sql server enterprise geodatabase. I have sysadmin user role access to the database. One thing I've tried is copying the path of the connection file from an ArcPro project and using that in the script. This particular script here works perfect if I use it on a file geodatabase inside a folder. Basically, I'm not sure how to connect to the enterprise geodatabase. """
update the feature classes in the feature dataset gisedit.DBO.dFIRM_2019_Effective
from the shapefiles in this directory:
\\gisfile\GISsources\Federal\FEMA\DFIRM\EffectiveProducts\SHP\17197C_WillCo_FIRMdb
"""
import arcpy
from arcpy import env
import os
#shapefile variable
shp = r'\\gisfile\GISsources\Federal\FEMA\DFIRM\
EffectiveProducts\SHP\17197C_WillCo_FIRMdb'
#sde connection file variable
sde = r'C:\Users\jpilbeam\AppData\Local\Temp\ArcGISProTemp11396\
d532de7f-5c8c-43c9-94bc-3cf9407b9505\gissql.sde\dFIRM_2019_Effective'
env.workspace = shp
#populate the fcList
fcList = arcpy.ListFeatureClasses()
env.workspace = sde
env.overwriteOutput = True
#iterate list of shapefiles and copy to sde feature dataset
for shapefile in fcList:
in_shapefile = os.path.join(shp, shapefile)
out_featureclass = os.path.splitext(shapefile)[0]
print('Copying %s to %s' %(in_shapefile, out_featureclass))
arcpy.CopyFeatures_management(in_shapefile, out_featureclass)
##
print("done") Error: Traceback (most recent call last):
File "\\gisfile\GISstaff\Jared\Python Scripts\ArcGISPro\dFIRM.py", line 30, in <module>
arcpy.CopyFeatures_management(in_shapefile, out_featureclass)
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 2948, in CopyFeatures
raise e
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 2945, in CopyFeatures
retval = convertArcObjectToPythonObject(gp.CopyFeatures_management(*gp_fixargs((in_features, out_feature_class, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3), True)))
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 506, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000733: Output Feature Class: Same as input Input Features
Failed to execute (CopyFeatures).
EDIT: I forgot to mention that the shapefiles and the features in the dataset have the same names. I need to update the dataset every month with these shapefiles.
... View more
08-06-2019
12:18 PM
|
0
|
4
|
7139
|
|
POST
|
Lance Cole Right, those paths are set right in my actual code. Here are the files I'm testing on. Ultimately, I'm updating a feature dataset in the sql server database using a sde connection file. Current Code: """
update the feature classes in the feature dataset gisedit.DBO.dFIRM_2019_Effective
from the shapefiles in this directory:
\\gisfile\GISsources\Federal\FEMA\DFIRM\EffectiveProducts\SHP\17197C_WillCo_FIRMdb
"""
import arcpy
from arcpy import env
import os
shp = r'\\gisfile\GISstaff\Jared\Test\shapefiles'
gdb = r'\gisfile\GISstaff\Jared\Test\TestFGDB.gdb\dFIRM_2019_Effective'
env.workspace = shp
fcList = arcpy.ListFeatureClasses()
env.workspace = gdb
env.overwriteOutput = True
for shapefile in fcList:
print(shapefile)
in_shapefile = os.path.join(shp, shapefile)
print(in_shapefile)
out_featureclass = os.path.splitext(shapefile)[0]
print(out_featureclass, "\n")
print('Copying %s to %s' %(in_shapefile, out_featureclass))
arcpy.CopyFeatures_management(in_shapefile, out_featureclass)
##
print("done")
... View more
08-02-2019
08:17 AM
|
0
|
1
|
5977
|
|
POST
|
Lance, The CopyFeatures function failed: ERROR 000733: Output Feature Class: Same as input Input Features
Failed to execute (CopyFeatures). There were no errors up to that point. The print statement on your line 17 printed this: Copying pathto\Test\shapefiles\S_BASE_INDEX.shp to S_BASE_INDEX Apparently, it doesn't like that the shapefiles and the feature classes have the same names.
... View more
08-02-2019
07:11 AM
|
0
|
3
|
5977
|
|
POST
|
Joe, I attempted to put together what I thought you were saying more or less. So far, I haven't got it to work. I put the error below the code. I thought I'd try deleting the feature classes in the dataset first, then copy the shapefiles into that dataset. import arcpy
from arcpy import env
import os
#directory of shapefiles
shps = r'pathto\Test\shapefiles'
#directory of FCs in dataset
dataset = r'pathto\TestFGDB.gdb\dFIRM_2019_Effective'
#create lists for shapefiles and FCs
shpList = arcpy.ListFeatureClasses()
fcList = arcpy.ListFeatureClasses()
#iterate FC list, delete FCs, copy shapefiles to dataset
for fc in fcList:
arcpy.Delete_management(dataset, "FEATURECLASS") #(in_data, data_type)
arcpy.CopyFeatures_management(shpList, dataset) #(in_features, out_feature_class)
print("done") line 15, in <module>
for fc in fcList:
TypeError: 'NoneType' object is not iterable
... View more
08-01-2019
11:18 AM
|
0
|
5
|
5977
|
|
POST
|
Is there a way I can copy shapefiles in a directory to an Enterprise Geodatabase Feature Dataset in a stand-alone script? As a monthly update, the shapefiles would replace/update feature classes with the same names in a feature dataset. I've attempted to copy a shapefile using an SDE connection file with arcpy.CopyFeatures. The script ran but nothing happened. import arcpy
from arcpy import env
import os
ws = env.workspace = r'path\to\34512.shp'
out_ws = r'path\to\gissql(2).sde'
fcList = arcpy.ListFeatureClasses(ws)
for shapefile in fcList:
out_featureclass = os.path.join(out_ws, os.path.splitext(shapefile)[0])
arcpy.CopyFeatures_management(shapefile, out_featureclass)
... View more
07-31-2019
02:26 PM
|
0
|
10
|
7304
|
|
POST
|
That did it, thanks! for root, dirnames, filenames in os.walk(im): #iterate directory
for fname in filenames:
if fname.endswith(('.JPG', '.jpg')):
with open(os.path.join(root, fname), 'rb') as image: #file path and name
exif = exifread.process_file(image)
dt = str(exif['EXIF DateTimeOriginal']) #get 'Date Taken' from JPG
ds = time.strptime(dt, '%Y:%m:%d %H:%M:%S')
nt = time.strftime("%Y-%m-%d",ds)
newname = fname[:-4].replace(' ','_').replace('(','').replace(')','').replace('.','') + '_' + nt + ".jpg"
#print(newname)
image.close()
os.rename(os.path.join(root,fname), os.path.join(root,newname))
... View more
07-24-2019
06:57 AM
|
0
|
0
|
3193
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 04-20-2026 01:20 PM | |
| 1 | 07-24-2025 01:27 PM | |
| 1 | 11-13-2025 08:22 AM | |
| 1 | 11-12-2025 08:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
3m ago
|