|
POST
|
I think you might be having a projection issue. Google uses web mercator auxiliary sphere. What projection is your Arc project in? Try getting the project in web mercator before creating the buffers.
... View more
06-02-2021
05:42 PM
|
1
|
0
|
4055
|
|
POST
|
Can someone please point me to a good example for using versioned editing with a C#? I am working on a console application to edit attributes in a sde geodatabase. The below is working for non-versioned tables. Console.WriteLine("start editing");
IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace;
workspaceEdit.StartEditing(false);
workspaceEdit.StartEditOperation();
TestFeature.Value[fieldIndex] = testString;
TestFeature.Store();
workspaceEdit.StopEditOperation();
workspaceEdit.StopEditing(true);
Console.WriteLine("editing stopped"); Thanks!
... View more
04-13-2021
10:50 PM
|
0
|
2
|
1809
|
|
IDEA
|
Please allow the creation of annotation feature classes with arcpy.
... View more
02-15-2021
03:19 PM
|
1
|
0
|
3782
|
|
POST
|
Okay, that is what I feared. The feature class has a number of relationships, so it will be more work than just a straight forward copy and delete. I first have to delete the relationships and then rebuild them after. All doable... On a side note, I wonder if Esri is really copying, deleting, and rebuilding relationships with ArcObjects. I suspect they are just tweaking the database metadata tables like updating the sde.gdb_items table. I am tempted to test in the dev environment. But it is too risky when I go to production 😒
... View more
02-10-2021
03:30 PM
|
0
|
3
|
5193
|
|
POST
|
Is it possible to move a feature class with arcpy from one dataset to another? There is this thread: https://community.esri.com/t5/data-management-questions/move-feature-classes-out-of-feature-dataset/m-p/163438 That talks about the drag and drop option. There is a code example but it does not look like a working solution. There is also this thread: https://community.esri.com/t5/python-questions/arcpy-move-feature-class-into-feature-dataset/m-p/590134#M46276 It talks about using Feature Class to Geodatabase. But this appears to just create a new copy of the feature class in the target dataset.
... View more
02-10-2021
02:19 PM
|
0
|
7
|
5254
|
|
POST
|
I am not sure where to post this question. So, please feel free to suggest a move if necessary. The Environment: We are on ArcMap 10.6.1 with a versioned Oracle SDE The problem: I have a polyline feature class that we have been asked to relate to a stand-alone invoice table. Each table has a feeder ID field with many records for each feeder id. So, each feature should be joined to all others with the same feeder ID. Also, the stand-alone table is read-only, as it is updated nightly by a batch job. I tried a many to many relationships with the Feeder IDs as keys so each row in the relationship table looks something like this: RID POLYLINE_FEEDERID INVOICE_FEEDERID 1 SS1 SS1 2 SS2 SS2 . This works fine until one deletes one of the polylines. Let's say you delete one with a feeder ID of SS2. Then the system deletes the row RDI = 2, breaking the relationship between all other records with a feeder of SS2! It would seem that my only option would be to relate each feature within a feeder ID to each invoice using global ID and invoice IDs as the keys. That way each time you delete a feature the system would only break the relationship for the deleted feature. Is there a better way to do this? It feels like this should be not quite this complex. Thansk!
... View more
01-14-2021
04:48 PM
|
0
|
1
|
1514
|
|
POST
|
I did not. I ended up dropping the python wrapper and just running the SQL in pl/sql developer. If you get it working please post your solution
... View more
10-14-2020
06:07 PM
|
0
|
1
|
1834
|
|
POST
|
But Dan still has a point. I always use raw encoding for paths. r'c:\xxxx\xxxx\xxxx'
... View more
08-25-2020
01:01 PM
|
0
|
0
|
1759
|
|
POST
|
I see that now -- I googled the Counter object right after reading your post. I am going to add it to my python toolbox.
... View more
08-18-2020
04:06 PM
|
0
|
0
|
823
|
|
POST
|
I added comments to the code above. I would get it into a python IDE and step through it with a debugger. Doing this when I am taking on something new speeds up my learning... it takes away the "back box" effect.
... View more
08-17-2020
03:16 PM
|
0
|
0
|
3526
|
|
POST
|
You could use a search cursor to read in the ids and then an update cursor the write the count out the feature class. import arcpy
fc_path = r'C:\my_temp\junk3\geo\fgdb.gdb\wells'
ids = []
with arcpy.da.SearchCursor(fc_path, 'ID') as cursor:
for row in cursor:
ids.append(row[0])
# make empty dict
ids_dict = {}
# get a list of unique ids, e.g. remove duplicates, set does this
# then just convert it back to a list
uids = list(set(ids))
# for each uid make a dict item with the key the uid and an empty list as the value
for uid in uids:
ids_dict[uid] = []
# this is what sets you up for counting. it finds the matching well id keys
# and adds the key to the list value so you get in the dict {'w1': [w1, w1, w1]}
# then all you need to do count the length of the value list.
for id in ids:
ids_dict[id] = ids_dict[id] + [id]
with arcpy.da.UpdateCursor(fc_path, ['ID', 'DUP']) as cursor:
for row in cursor:
for k, v in ids_dict.items():
if row[0] == k and v is not None:
row[1] = len(v)
ids_dict[k] = None
cursor.updateRow(row)
... View more
08-17-2020
10:36 AM
|
2
|
2
|
3527
|
|
POST
|
I am not sure I understand your question. Maybe it would be helpful if we had a little more info... what format is your original data is in? e.g. csv, feature class in a fgdb, database... etc. what is your target format? e.g. feature class in a fgdb can you give us an overview of what you are trying to do? I would use an update cursor to write the info from the dictionary back to a feature class in a fgdb for sure.
... View more
08-14-2020
06:05 PM
|
0
|
4
|
3527
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-04-2024 05:39 PM | |
| 1 | 07-30-2024 09:05 AM | |
| 1 | 07-08-2024 05:32 PM | |
| 1 | 03-20-2024 10:27 AM | |
| 6 | 03-13-2024 03:38 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-12-2025
11:02 AM
|