|
POST
|
You would have to use geometry objects in order to create the lines that you are looking for. The solution you are looking for sounds like it would require a process below (or close to) if you were to code it for that particular task. There might be a combination of tools that can help you achieve this process, but it can be hard coded as well. Get the start and end vertices of each line and get their x and y coordinates(you can read up on geometry objects here) Use a while loop for each line and convert each start and end vertices to xy coordinates. Get the xy coordinates for each point that falls on the line (may require mathematical calculations to see if the point is between the lines (basically algebra)). Skip the algebra if you are simply looking to create lines based on those points. Create an array using the start xy coordinate and the closest point coordinate as the end coordinate. Use the write geometries to convert array of coordinates to line. Insert newly created line as record into whichever feature class. Repeat process and break when both start and end xy coordinates match the original line. There might be more steps than what I am thinking and other tools but @DanPatterson knows more than I do.
... View more
07-06-2022
05:02 AM
|
1
|
0
|
9026
|
|
POST
|
The activeSlice is a specific key storing all other values that are assigned to that key. Python Dictionaries (w3schools.com)
... View more
07-05-2022
08:23 AM
|
0
|
0
|
5551
|
|
POST
|
You would need to access the activeSlice dictionary(wherever that is being stored), then access the rangeDimensionValue dictionary to set the max within that dictionary. To do that, you would simply need to find where the activeSlice is the key and then access the values within that key. Then access the rangeDimensionValue values to then set the max to the specified value. You may be able to access that particular value as such: "activeSlice"["rangeDimensionValue"]["max"]= maxvalue["max"] I can't tell (based on the png) if those values are in both lists and dictionaries, or a combination of sorts. If you can find the activeSlice key, then you should be able to use the suggestion above to change the max value.
... View more
07-05-2022
06:24 AM
|
0
|
2
|
5577
|
|
POST
|
Hi @anTonialcaraz, I assume that you are using python. If that is the case, another option instead of using replace would be to create a dictionary so that the set values in the dictionary are overwritten to the value that you specify. maxvalue = {"max": 560}
for i, line in enumerate(fileinput.input(OUT_workspace + "\\" + "AE000S560_005M5001P01M041.lyrx", inplace=1)):
#insert line exception below for specific line to update
if i ==(line number to change):
maxvalue["max"] = 570
sys.stdout.write(maxvalue["max"]) Without knowing the code specifics, this is the only suggestion I can come up with at the moment.
... View more
07-05-2022
05:04 AM
|
0
|
4
|
5589
|
|
POST
|
Thank you very much @GKmieliauskas , That seems to do the trick. I don't know why I couldn't figure out the little tidbit that kept holding me up. I am trying to simplify my scripts, using functions, to reduce the amount of code I have to write. Also, I am trying to keep this section of code constant with all my scripts to eliminate the process of recreating baseline data. I don't know if it makes sense to do this or not but just thought to ask.
... View more
03-29-2022
06:53 AM
|
0
|
1
|
4336
|
|
POST
|
Would it be recommended to have to loop through again to look for the database or have it simply check to see if either folder exists? I thought about using os.path.exists to determine the existence of both the database and folder. Depending on which exists; create either one or the other.
... View more
03-29-2022
04:21 AM
|
0
|
0
|
4342
|
|
POST
|
I tried that at first and it keeps returning an error.
... View more
03-28-2022
10:21 AM
|
0
|
0
|
4358
|
|
POST
|
Hi, I have been trying to figure out why I keep running into this strange issue. I am not sure if I programmed the script incorrectly or if it happens to be an issue with establishing the subfolder first. Here is what I have so far. import arcpy
import os
def CreateBaseData(location, names):
subfolder_name = None
database_name = None
subfolder = None
database = None
for name in names:
if '.gdb' in name:
database_name = name
else:
subfolder_name = name
for root, directory, filenames in os.walk(location):
if directory:
if directory[0] in names:
if database_name == directory[0]:
database = os.path.join(root, directory[0])
elif subfolder_name == directory[0]:
subfolder = os.path.join(root, directory[0])
else:
pass
if subfolder is None:
subfolder = os.mkdir(os.path.join(location, subfolder_name))
else:
if database is None:
database = arcpy.CreateFileGDB_management(subfolder, database_name)
return database
# Create folder and file geodatabase
WorkingFolder = r'*'
subfolderName = 'Updates'
databaseName = 'Updates.gdb'
names = [subfolderName, databaseName]
database = CreateBaseData(WorkingFolder, names)
print (database) Here is what I get as a print statement for the first, then second execution. Any help on this would be greatly appreciated.
... View more
03-28-2022
07:28 AM
|
0
|
8
|
4391
|
|
POST
|
I have done something similar to what you are trying to accomplish. The way I went about is: Create/assign a feature class and table with the same field (unique identifier). In the table, set a unique identifier field as a unique id and the other field whatever you want to use to identify the photo. From there, enable attachments for each record in the table using the other field. Use the Table to Domain tool to make it easier to associate each new record as a domain value in the feature class. (Note: it may require editing the table by creating another uniqueID and other field identifier prior to running the tool)
... View more
02-16-2022
12:37 PM
|
0
|
0
|
3343
|
|
POST
|
From what is sounds like, are you trying to get routing information to and from the stops without using the network analyst extension because you only have a basic license? If that is the case, then you would need to use a python script to read the geometries, loop through each road intersection to find the next closest road intersection to the next stop(s), and append to either feature class or table for all of the roads closest to the stop(s). It is possible, but it does require some strong knowledge and understanding of python.
... View more
02-14-2022
01:14 PM
|
0
|
0
|
6812
|
|
POST
|
We are at 10.8 and don't have any issues that that widget. The issue might be with the latest enterprise version. I would definitely report the bug to Esri to let them know.
... View more
01-26-2022
10:59 AM
|
0
|
0
|
2121
|
|
POST
|
Might just be a bug. It works fine in AGO and portal. What version is your enterprise at?
... View more
01-24-2022
09:19 AM
|
0
|
1
|
2149
|
|
POST
|
Hi @Anonymous User, 1 [2134344.1859597526, 2134044.6763881706]
2 [2134716.9647417553, 2134344.1859597526]
3 [2134854.214795336, 2134716.9647417553]
4 [2127143.862105839]
5 [2127231.4413270056]
6 [2127231.4413270056]
7 [2127232.538437672]
8 [2127231.4413270056, 2128202.311432503]
9 [2128202.311432503]
10 [2128489.532314755]
11 [2128489.532314755]
12 [2128489.532314755]
13 [2128488.698326919]
14 [2128544.1339115873]
15 [2128544.1339115873, 2128859.5250130855]
16 [2128859.5250130855]
17 [2128859.80782092]
18 [2128859.5250130855, 2129739.475024838]
19 [2129739.475024838, 2130065.4704358354]
20 [2130065.4704358354]
21 [2130052.789030753]
22 [2130065.4704358354, 2130320.071304586]
23 [2134044.6763881706, 2133934.3380261697]
24 [2133934.3380261697]
25 [2133955.591264505]
2134344.1859597526 [1, 2, 27]
2134044.6763881706 [1, 23]
2134716.9647417553 [2, 3, 29]
2134854.214795336 [3, 31, 33, 37]
2127143.862105839 [4]
2127231.4413270056 [5, 6, 8]
2127232.538437672 [7]
2128202.311432503 [8, 9]
2128489.532314755 [10, 11, 12]
2128488.698326919 [13]
2128544.1339115873 [14, 15]
2128859.5250130855 [15, 16, 18]
2128859.80782092 [17]
2129739.475024838 [18, 19]
2130065.4704358354 [19, 20, 22]
2130052.789030753 [21]
2130320.071304586 [22, 124]
2133934.3380261697 [23, 24, 115247]
2133955.591264505 [25, 26]
2133945.8530950025 [26, 17025, 17026]
2134369.3020512536 [28]
2134720.549380254 [30]
2134848.2853452526 [32]
2134866.82139742 [34, 35]
2134877.9821362533 [36] Here is where I was having specific issues with my script. There are two dictionaries, one comprised of the ObjectID of the line as the key and the line ends (as floating X coordinate) as values, and the other comprised of the line end as the key with the ObjectID of the other line. I was struggling with figuring out how to make this accurate and efficient. After some tinkering, and using your suggestion, here is the what I have come up with as a result. assigned_uniqueIDs = [i]
#IsoID_groups = {}
def correlatingValues(ID):
corrIDs = []
for xcoord in IDValues[ID]:
for OID in LineValues[xcoord]:
if OID != ID:
corrIDs.append(OID)
return corrIDs
for assigned in assigned_uniqueIDs:
if ID_list:
A = [ID_list[0]]
B = 0
while A:
for a in A:
UpdateIsolatedIDs_Lines[a] = assigned
values = correlatingValues(a)
check = [x for x in values if x not in A]
if check:
A = A + check
if a in ID_list:
ID_list.remove(a)
B += 1
if len(A) == B:
break
#IsoID_groups[assigned] = sorted(A)
#print (assigned, A)
i += 1
assigned_uniqueIDs.append(i) This seems to work very well and gets me really close to what I am after. But in terms of efficiency, I don't know if there is a better way. I have noticed there may be some issues with the geometries themselves, which will take some time to fix, but this is the closest thing that I could come up with.
... View more
01-20-2022
06:37 AM
|
1
|
1
|
2399
|
|
POST
|
One option that you can try is creating the exact same field in both the table and feature specifically for assigning unique values and creating the relationship based on those. When you create the relationship (typically I use the one - many relationship when I do these kind of things) you can relate based on this field. Regardless of how the feature is split, that unique value will still remain, keeping the relationship. I can provide an example if needed.
... View more
01-20-2022
04:43 AM
|
0
|
0
|
3321
|
|
POST
|
Hi @Anonymous User, Here is an updated print statement, but I am working, as you suggest, debugging using line breaks. I haven't used those at all so I am trying to configure it as such. 93169 is already assigned 10040713 as isolation ID.
93169 is key in IDValues dictionary with floating [2203858.366813004, 2203850.9137439206] X coordinates as values
The floating 2203858.366813004 is the key in LineValues dictionary with [93168, 93169] line IDs as values
93168 has been assigned 10040713 as value.
93169 has been assigned 10040713 as value.
The floating 2203850.9137439206 is the key in LineValues dictionary with [93166, 93169] line IDs as values
93166 has been assigned 10040713 as value.
93169 has been assigned 10040713 as value. The previous print statement is from a dictionary in which the IDs and Assigned IDs are inverted. Hopefully this gives more detail and in the meantime, I am working on utilizing the line breaks and debugging as I go.
... View more
01-18-2022
12:11 PM
|
1
|
0
|
2407
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Tuesday | |
| 1 | 05-07-2026 01:36 PM | |
| 1 | 02-10-2026 06:09 AM | |
| 1 | 03-04-2026 01:08 PM | |
| 1 | 02-24-2026 12:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|