|
POST
|
Yes, its up and running, but its an internal/org app.
... View more
12-14-2018
10:43 AM
|
1
|
0
|
2584
|
|
POST
|
Hey Shauna, Great to hear. I reinstalled again and now have an environment for 2.7 in Anaconda. Now I want to have a second environment for Pro with Python 3.6. Can I just copy my env file from Pro and pluck it into my Anaconda env folder as I did for 2.7 or do I need to do something else? Any suggestions?
... View more
12-13-2018
04:36 PM
|
0
|
0
|
1502
|
|
POST
|
This was a great idea. I ended up using some Dojox/Charting stuff, which was extremely complicated, but it did the trick. Wish I had thought of this earlier. Thanks.
... View more
12-13-2018
04:31 PM
|
1
|
2
|
2584
|
|
POST
|
I was successfully able to reinstall Anaconda for 2.7 without conflicting with my ArcGIS 10.5 installation. I can now import arcpy, pandas, numpy, etc... but I am missing a few outside packages that I had installed in the for my ArcGIS 2.7 environment. For example, the library 'addfips' could not be added using conda. I believe I added it previously using `pip` which is already installed in my Anaconda environment. Is there any conflict that could be caused by using fips with my Anaconda environment? Just wanted to check before trying.
... View more
11-09-2018
08:38 AM
|
0
|
1
|
1193
|
|
POST
|
Unfortunately, the copy of ArcGIS Pro that I have didn't come with Anaconda. Originally, I had to install it separately for 3.65 and copy the env folder from Pro and past it into the Anaconda env file in order to get arpy to work. I am thinking that I can do something similar for Anaconda with 2.7 if I can figure out where the env for Arc 10.5 is located.
... View more
11-08-2018
11:08 AM
|
0
|
1
|
1910
|
|
POST
|
I recently uninstalled Anaconda due to a conflict with my pandas packages. I use to have it configured with my ArcGIS Pro Python 3.65 environment. Now I want to reinstall it, but for my ArcGIS Desktop 10.5/ Python 2.7 environment. I need to have an environment that has both the arcpy , pandas, and arcgis libraries/mods in it (which my current 2.7/ArcMap 10.5 does). How can I install Anaconda for 2.7 without overwriting or interfering with my current ArcGIS 10.5/ Python 2.7 environment AND set up my arcpy/arcgis/pandas within that new Anaconda environment? If I wanted to copy my current Arc - Python 2.7 env folder, where would I find it (ex: C:\Python27\ArcGIS10.5)?
... View more
11-08-2018
10:44 AM
|
0
|
3
|
3513
|
|
POST
|
I have a goal: take a feature class, make a layer for further processing and select some of the records by attribute, Should be simple, but I am having multiple problems. Note: I am working in a Python 2.65/ArcGIS 10 environment (may be cause of some of these issues). I start with my gdb master_dict = {'Alabama': ['01009', '01013'], ...} statePath = "<...>/gdb/master_merge_footprints.gdb" I want to iterate through the gdb and find specific features based on state names. This part works. I can even print the fields just to test that the feature class exists: stateNames = ['Alabama', 'Alaska'...] for name in stateNames: arcpy.env.workspace = statePath featureclasses = arcpy.ListFeatureClasses() fip_merge_list = [] for fc in featureclasses: if name in fc: print fc fipslist = (master_dict[name]): for fip in fipslist: ### Here's where the problem occurs Here is where the problem occurs. As I mentioned if I've tried several things to make sure that fc exists, including fieldnames = [field.name for field in arcpy.ListFields(fc)] . I am able to print the field names and verify that the field for the where clause also exists. I create a hard output path to an existing gdb just to make sure the process will work. When I run this however, nothing shows up in my gdb when I check in ArcMap. I can manually run a selectByAttributes function in ArcMap directly on this fc as well. select = arcpy.MakeFeatureLayer_management(fc, statePath + "/%s_temp_lyr_%s"%(name, fip),"FIPS_CODE = '%s'"%(fip)) The process runs and doesn't throw an error, but nothing is showing in my gdb. So I tried just using the SelectLayerByAttributes_management with fc and it throws an error: select_1 = arcpy.SelectLayerByAttribute_management (fc, "NEW_SELECTION", "FIPS_CODE = '%s'"%(fip)) Traceback (most recent call last): File "", line 1, in select_1 = arcpy.SelectLayerByAttribute_management (fc, "NEW_SELECTION", "FIPS_CODE = '%s'"%(fip)) File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 4259, in SelectLayerByAttribute raise e ExecuteError: Failed to execute. Parameters are not valid. The value cannot be a feature class ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer. Failed to execute (SelectLayerByAttribute). So, I can't make a layer from my feature class, I can't select by attributes, and I am stuck. I have manually verified that the feature class exists (both in Python and ArcMap), I have verified that the field exists, and I have verified that the fip exists. Any advice on what I am doing incorrectly here?
... View more
10-29-2018
08:32 AM
|
0
|
1
|
2011
|
|
POST
|
I am running a line of code in a Python 2.7 environment using arcpy.SelectLayerByAttribute_management : fl_haz_selects = arcpy.SelectLayerByAttribute_management(S_Fld_Haz_Ar, "NEW_SELECTION", "\"DFIRM_ID\" = '{}'".format(fipC)) It runs perfectly fine in Python 3.6. Now I am getting the following errors. What am I doing incorrectly here? Note: S_FLD_Haz_Ar is a shapefile. Do I just need to make it into a layer? I am trying to avoid making a physical layer. Traceback (most recent call last): File "", line 3, in File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\management.py", line 7713, in SelectLayerByAttribute raise e ExecuteError: Failed to execute. Parameters are not valid. The value cannot be a feature class ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer. Failed to execute (SelectLayerByAttribute).
... View more
10-24-2018
07:37 AM
|
0
|
1
|
4210
|
|
POST
|
The only difference that I can see in my JSON data is that the geometry comes after the attributes in features. But this was working up until yesterday.
... View more
10-17-2018
03:59 PM
|
0
|
1
|
5237
|
|
POST
|
Nope. Same results. Could this be related to the geometry of the temp layers?
... View more
10-17-2018
03:45 PM
|
0
|
1
|
1982
|
|
POST
|
I've tried this in both my Python script using: arcpy.env.workspace = directory + "/gdb" path = "<filepath for json file>" fc = arcpy.JSONToFeatures_conversion(path, os.path.join("cslf.gdb", "cslf_{}".format(today))) As well as using the manual JSONToFeatures tool in my toolbox in ArcMap (under Conversions) just using the same file. Both give me the exact same error.
... View more
10-17-2018
02:18 PM
|
0
|
3
|
5237
|
|
POST
|
Oh, sorry. I didn't include that because it didn't seem relevant but it's at the top under my `import` statements: today = datetime.datetime.today().strftime('%Y%m%d') which returns a tring: Out[1] '20181017'
... View more
10-17-2018
02:12 PM
|
0
|
3
|
1982
|
|
POST
|
I keep getting a 001558: Error parsing .json file. According to ESRI documentation for that error, "the JSON must have at least the geometryType, spatialReference, fields, and features (with geometry and attributes) property." I checked my .json file and it appeared to have all that but I want to see an example of a proper format. Can anyone give me a proper example of hwo ESRI want a file to look. Below is what my .json file looks like: {"displayFieldName": "CSLF_ID","fieldAliases": {...},"geometryType": "esriGeometryPolygon","spatialReference": { "wkid": 102100, "latestWkid": 3857},"fields": [...],"features": [ {"attributes": {...}, "geometry": {...} },...]}
... View more
10-17-2018
12:57 PM
|
0
|
5
|
6229
|
|
POST
|
I am trying to run a union on a feature class (master_merge_footprints_20181011) and 2 temporary layers made from selected features (using select by attributes and then create layer from selection) from shapefiles (Prelim_S_Fld_Haz_Ar_13245 and S_Fld_Haz_Ar) Here's the code snippet from the result (which worked): arcpy.Union_analysis(in_features="Prelim_S_FLD_HAZ_AR_0637 #;Prelim_S_Fld_Haz_Ar_13245 #;'S_Fld_Haz_Ar selection' #;master_merge_footprints_20181011 #", out_feature_class="C:/Users/jbridwell/Documents/ArcGIS/Default.gdb/New_FLD_HAZ_AR_Union", join_attributes="ALL", cluster_tolerance="", gaps="NO_GAPS") However, when I try a similar process in my script, I keep getting RuntimeError: Object: Error in executing tool. I though there might be a lock or something network related (the files are from a folder connection in a network drive) on one of the files, so I restarted my whole computer, but that was not the issue. Here is the traceback and the relevant portion of the code. Does anyone have any ideas as to what the problem might be or how to get it to run? Note: both Traceback: In [29] wkflw2_union = arcpy.Union_analysis(["master_merge_20181011", nfhl_fld_haz_features], "wkflw2_union_output", "ALL") Traceback (most recent call last): File "<ipython-input-28-37797fd2b95a>", line 1, in <module> wkflw2_union = arcpy.Union_analysis(["master_merge_20181011", nfhl_fld_haz_features], "wkflw2_union_output", "ALL") File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\analysis.py", line 734, in Union raise e File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\analysis.py", line 731, in Union retval = convertArcObjectToPythonObject(gp.Union_analysis(*gp_fixargs((in_features, out_feature_class, join_attributes, cluster_tolerance, gaps), True))) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 496, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) RuntimeError: Object: Error in executing tool Code: wkflw2_union_output = "C:/Workspace/Sandbox/MapChangeProject/master_Map_Change_Report_App/gdb/selects.gdb/wkflw2_union_{}".format(today)
master_merge = "C:/Workspace/Sandbox/MapChangeProject/master_Map_Change_Report_App\gdb\selects.gdb\master_merge_footprints_{}".format(today)
wkflw2_union = arcpy.Union_analysis([master_merge, nfhl_fld_haz_features, prelim_fld_haz_features], wkflw2_union_output)
... View more
10-17-2018
08:39 AM
|
0
|
5
|
2232
|
|
POST
|
I have a list to hold the iterated results of running arcpy.MakeFeatureLayer and 'arcpy.CopyFeatures` geoprocesses. selectList = []
fip = '13245'
for fc in featureclasses:
select = arcpy.MakeFeatureLayer_management(fc, "temp_lyr","FIPS_CODE = '{}'".format(fip))
arcpy.env.workspace = "C:/Workspace/Sandbox/selects.gdb"
selectFeatures = arcpy.CopyFeatures_management(select, "select_{}".format(fip))
selectList.append(selectFeatures) When I print(selectList) it gives me a weird list of results: [<Result'C:\\Workspace\\Sandbox\\MapChangeProject\\selects.gdb\\select_13245'>, <Result 'C:\\Workspace\\Sandbox\\MapChangeProject\\selects.gdb\\select_06037'>] What I want to do is merge all of these results together into one feature like this: arcpy.Merge_management(selectList, "merge") What am I doing wrong here and how do I get my results into a format that will work for my merge?
... View more
09-05-2018
02:14 PM
|
0
|
2
|
1202
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-19-2021 01:41 PM | |
| 1 | 11-05-2019 07:44 AM | |
| 1 | 11-05-2019 09:58 AM | |
| 1 | 01-06-2021 05:41 AM | |
| 1 | 12-24-2020 06:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-19-2022
10:13 PM
|