POST
|
I came across the same problem, and it directed me to here https://pro.arcgis.com/en/pro-app/help/projects/open-a-project.htm. It seems opening the same project within the same directory at the same time causes this issue. Therefore it happens when multiple users try to work on the project within the shared network drive. FYI: In case you control the project by standalone python in Jupyter notebook with opening the project in ArcGISPro app at the same time, once you close the app and try to open the project in app again, it will happen. After you close all Jupyter windows, you could successfully open the project in ArcGISPro app.
... View more
07-19-2019
07:19 PM
|
2
|
0
|
4094
|
POST
|
Hello, I really appreciate if anyone can help me out with this. I want to calculate network distance from each subject (n=8000) to a facility (n=290) . Each subject is supposed to go to one specific facility which is in their town. Therefore, my approach was to 1. create point FC of subjects with the field "townname" which identifies where a subject lives. 2. create point FC of facilities with the field "townname" which identifies where a facility locates at. 3. execute MakreRouteAnalysisLayer by using field mapping However after many attempts, only around 100 lines are created as output. I want to have 8000 lines as output which each line has distance value to the associated facility. If anyone could give any suggestions on this, I would really appreciate. My codes below: env.overwriteOutput = True # calculate distance from subject to associated hospital inPath1 = r"C:\Users\kenta\OneDrive\GISData_Import\ADF2012_DISSOLVE.gdb" inPath2 = r"G:\ResearchProjects_data\gen_cohre\geocode.gdb" inPath3 = r"G:\ResearchProjects_data\gen_cohre\Walkabiliy_Indices.gdb" outPath = r"G:\ResearchProjects_data\gen_cohre\Walkability_final.gdb" network = os.path.join(inPath1, "ADF", "ADF_ND") stops_home = os.path.join(inPath3, "hospital") stops_work = os.path.join(inPath2, "subject") layer_name = "hosDistance" out_routes_featureclass = os.path.join(outPath,"hosRoutes") travel_mode = "Driving Time" #Create a new Route layer. result_object = arcpy.na.MakeRouteAnalysisLayer(network, layer_name, travel_mode) #Get the layer object from the result object. #The route layer can now be referenced using the layer object. layer_object = result_object.getOutput(0) #Get the names of all the sublayers within the route layer. sublayer_names = arcpy.na.GetNAClassNames(layer_object) #Stores the layer names that we will use later stops_layer_name = sublayer_names["Stops"] routes_layer_name = sublayer_names["Routes"] #Before loading the subject home and hospital locations as route stops, set #up field mapping. Map the "townname" field from the input data to #the RouteName property in the Stops sublayer, which ensures that each #unique townname will be placed in a separate route. field_mappings = arcpy.na.NAClassFieldMappings(layer_object, stops_layer_name) field_mappings["RouteName"].mappedFieldName = "townname" #Add the home and hospital locations as Stops. The same field mapping #works for both input feature classes because they both have a field called #"townname" arcpy.na.AddLocations(layer_object, stops_layer_name, stops_home, field_mappings, "") arcpy.na.AddLocations(layer_object, stops_layer_name, stops_work, field_mappings, "", append="APPEND") #Solve the route layer. arcpy.na.Solve(layer_object) # Get the output Routes sublayer and save it to a feature class routes_sublayer = layer_object.listLayers(routes_layer_name)[0] arcpy.management.CopyFeatures(routes_sublayer, out_routes_featureclass)
... View more
05-22-2019
07:56 PM
|
0
|
0
|
289
|
POST
|
Mervyn, Thank you so much for your step by step guide. I apologize for not giving details of my dataset and process. I will explain what dataset i have in detail and also my attempts followed your guide. 1st,, converted .gpx file to feature class, and it generated point fc. 2nd, I converted this point fc to line fc by using Point to Lines tool. 3rd, I followed your instruction: use Intersect tool. But nothing could be created. 4th, I did Spatial Join using the result for both target and join feature. 5th, ~GPX3 was created but no data. I know that issue might be the line fc created in step 2nd does not have attributes rather than 1 row. Therefore, i tried the similar procedure by using point fc. 1st, used Intersect tool for point fc. 2nd, Spatial Join with line fc. (Join one to many, Intersect). 3rd, line fc created with "Join_Count" field, but all values are equal to 1. I thought this would have generated "Join_Count" field with number of overlapped points, and could have symbolized the parts of the line based on this value, but it did not happen. I wonder the original gps dataset has an issue of missing some important elements that can be used for my desired visualization. I'm sorry for the long notes, but can you give me suggestions on what might be potential issues? Thank you so much. I really appreciate your time and help! Kenta
... View more
12-27-2018
06:03 PM
|
0
|
1
|
1033
|
POST
|
Thank you Mervyn. I tried Spatial Join with the lines and points (One to many, Intersect). But the field Join_Count created in output line feature was all equal to 1. Do you have any idea on what i might possibly be missing? Thanks in advance for your help.
... View more
12-26-2018
08:13 PM
|
0
|
3
|
1033
|
POST
|
I'm trying to plot GPS data in ArcGIS pro for the first time. The raw data is in text format and looks like below $GPRMC,151144.00,A,3335.69893,N,13012.84953,E,5.219,253.95,171218,,,A*68 2136198633 0000004023 $GPRMC,151152.00,A,3335.69887,N,13012.83373,E,2.715,255.40,171218,,,A*65 2136723401 0000004023 $GPGGA,151152.00,3335.69887,N,13012.83373,E,1,05,5.07,331.5,M,27.8,M,,*52 $GPRMC,151153.00,A,3335.70102,N,13012.83402,E,2.412,285.11,171218,,,A*64 2146959215 0000004023 . . . I found that GPX to Feature class was easy and fast, I first converted this text file to .gpx file using website service and succeeded in plotting the data in ArcGIS Pro. 1. GPX to Feature class (tool_gpx.PNG) 2. Successfully mapped (map.PNG) After that, I could convert the point data to line by Point to Lines tool. 3. Converted to point to line (line.PNG) It looks pretty good, but I wonder if there is a way to size or highlight parts of the line that had overlapped. In other words, the car tracked by GPS did not drive straight from the start to the end point, but it traveled back and force sometime. I would really appreciate if anyone is familiar with GPS and could help answer my question.
... View more
12-26-2018
12:29 AM
|
0
|
5
|
1355
|
POST
|
Hi, I'm using arcpy.mp to export multiple layers at once, but having a trouble that legend is not updated. Each layer is successfully exported as separate JPEG file by the code below. However, the legend attached to each exported output is all the same (legend of the first layer). I usually run my script as standalone from Jupyter notebook. When I run the code below in python window within ArcGIS pro, legend was successfully updated in each exported output. If anybody has any idea on why it cannot be done by standalone, I would really appreciate it. ArcGIS Pro 2.2 # This is the code I ran aprx = arcpy.mp.ArcGISProject(r"C:\Users\kenta\Documents\ArcGIS\Projects\CoHRE_Collaboration\CoHRE_Collaboration.aprx") maps = aprx.listMaps("Oki")[0] layers = maps.listLayers("mean*") layout = aprx.listLayouts("Oki_layout")[0] for layer in layers: layer.visible=False for layer in layers: layer.visible = True layout.exportToJPEG(r"C:\Users\kenta\Dropbox\Collaboration\CollaborationOki"+ "\\" + layer.name + ".JPEG") layer.visible = False
... View more
11-08-2018
10:19 PM
|
1
|
3
|
826
|
POST
|
Thank you for the explanation Luke! Now that makes sense that script outside of ArcGIS pro does not change anything on opened pro map. I should try, but if I write scripts that 1. update symbology 2. update layout 3. export it as pdf as one stream work flow, do you think the all updated symbology can be reflected in final pdf output? I will try this and see what happens shortly, but if you have any insights about this I would appreciate.
... View more
11-07-2018
05:26 PM
|
0
|
0
|
1643
|
POST
|
Thank you Dan. Looks like it's better to work in python window within ArcGIS Pro as of now.
... View more
11-07-2018
04:10 PM
|
0
|
0
|
1643
|
POST
|
Thank you so much Luke. It worked out perfectly! Then I have an additional question. I'm running my python scripts in jupyter notebook. Once I ran my script, nothing happens in my ArcGIS Pro map. When I restart the ArcGIS the code I run gets reflected (ex. update graduate color). I tried refreshing the map (ctrl + F5), but nothing happens. Is there a way to reflect my code on map on the spot? Thank you so much for your help!! Kenta
... View more
11-06-2018
08:33 PM
|
0
|
4
|
1643
|
POST
|
Hi, I'm using arcpy.mp module, and facing some basic concerns. I would really appreciate if anyone could help out with this. I ran the code below, and it worked fine. I want to symbolyze the point feature class as graduated color with 5 quantile here. But I wonder why the last sentence "aprx.saveACopy(r"C:\Users\kenta\Documents\ArcGIS\Projects\CoHRE_Collaboration\Output.aprx)" is needed. I want my code be reflected on the project defined as "aprx", but it is not possible? Do I always need to do saveACopy to reflect the symbology changes? Thank you so much for your help! import arcpy,os from arcpy import env env.overwriteOutput = True env.workspace = r"C:\Users\kenta\Documents\ArcGIS\Projects\CoHRE_Collaboration\CoHRE_Collaboration.gdb" # First, reference the project aprx = arcpy.mp.ArcGISProject(r"C:\Users\kenta\Documents\ArcGIS\Projects\CoHRE_Collaboration\CoHRE_Collaboration.aprx") m = aprx.listMaps("Oki")[0] lyr = m.listLayers("oki2018_point")[0] if lyr.isFeatureLayer: sym = lyr.symbology if hasattr(sym, 'renderer'): sym.renderer.classificationField = 'SMI2' sym.updateRenderer('GraduatedColorsRenderer') sym.renderer.classificationMethod = 'Quantile' sym.renderer.breakCount = 5 lyr.symbology = sym aprx.saveACopy(r"C:\Users\kenta\Documents\ArcGIS\Projects\CoHRE_Collaboration\Output.aprx")
... View more
11-06-2018
06:44 PM
|
0
|
9
|
1865
|
POST
|
Hi David, I have just come across the same challenge, and feel like I figured that out, so positing my solution here. You can use Make Query Table for executing one-to-many join. How To: Create a one-to-many join in ArcMap The site above is an instruction for ArcMap to Make Query Table, but the same tool was found in ArcGIS Pro for mine. Using Python would be more helpful if you want to export the temporal layer created by Make Query Table as a permanent gdb file or shapefiles. I'm pasting my work for an example. Goal: Join polygon feature class which has 59 city names and table which has temporal population value (2006-2010) for 59 city names. Kyuson_H12 Polygon feature class 59 rows Field "Kyuson" has 59 different city names (This will be used for matching with table) agg15male Table 590 rows Field "Kyuson" has 59 different city names (This will be used for matching with Polygon feature class) The data is long-format temporal data (2006-2015), so there are 590 rows import arcpy,os from arcpy import env env.overwriteOutput = True env.workspace = r"C:\Users\kenta\Documents\ArcGIS\Projects\MyProject2\Rdata.gdb" # list the polygon feature class and table that want to be joined tableList = [ r"C:\Users\kenta\Documents\ArcGIS\Projects\MyProject2\Rdata.gdb\Kyuson_H12",\ r"C:\Users\kenta\Documents\ArcGIS\Projects\MyProject2\Rdata.gdb\agg15male"] # define the query for matching whereClause = "Kyuson_H12.Kyuson = agg15male.Kyuson" # name the temporary layer name created by MakeQueryTable lyrName = "Kyuson_layer" # name the output fc name outFeatureClass = "agg15male_poly" arcpy.MakeQueryTable_management(tableList, lyrName,"USE_KEY_FIELDS", "", "", whereClause) # since lyrName created by MakeQueryTable is temporal, save it as parmanent gdb file arcpy.CopyFeatures_management(lyrName, outFeatureClass) ****Points you need to be careful*** Feature class and table that you want to join have to be in the same file geotabase. So, you need to convert csv file to gdb table first and locate them in the same file geotabase as your feature class. MakeQueryTable generate temporary layer, so you need to export it as your desired file by CopyFeatures_management. You might have finished this task a while ago, but hoping it will be helpful for anyone running into the same problems in the future. Best, Kenta
... View more
09-18-2018
11:55 PM
|
19
|
3
|
22785
|
POST
|
Hi Shaun, It worked out when adding the name of new feature class as you suggested! Thank you so much, I really appreciate it. Best, Kenta
... View more
09-11-2018
09:02 PM
|
0
|
1
|
1042
|
POST
|
Hi Marijean, Thank you so much for your comments. That was really helpful. I made sure to create R data frame by following code. df <- read_excel("G:/AllData/Kyuson_Aza/Kyuson_AzaListFinal.xlsx") df2 <- df[c("year","address")] Then I have attempted this code: arc.write(path = "C:/Users/kenta/Documents/ArcGIS/Projects/MyProject/MyProject.gdb", data = df2, overwrite = TRUE) It ran without errors. But I still could not get gdb table in my ArcGIS project database. I'm sorry it's in Japanese, but I'm attaching the screen shots what happened before and after I ran my code. Before I ran my R code: After I ran my R code: A new MyProject.gdb appeared, but nothing in those databases. I appreciate for your additional helps and suggestions. Best, Kenta
... View more
09-11-2018
08:12 PM
|
0
|
1
|
1042
|
POST
|
Hello, I've just started using "arcgisbinding" package in R. I'm trying some basic data transfer between R and ArcGIS Pro, and I have one question. Can I write R data.frame (which I read from excel) to ArcGIS? After I have seen some resources, looks like only the object I read in R from ArcGIS object can be transferred back. But if there is a way to transfer my R data frame object (which are originally made from excel, csv, etc.) to Arc GIS, this would be great. *** R data frame object I want to transfer to Arc GIS does not have any spatial information. It has two columns "ID" and "address" as string. So I want to transfer it to ArcGIS gdb table not as feature class. I would greatly appreciate if anyone can help out with this! My code I attempted in R: df <- read_excel("G:/AllData/Kyuson_Aza/Kyuson_AzaListFinal.xlsx") df2 <- df[2,4] # export this data frame to Arc GIS arc.write(path = "C:/Users/kenta/Documents/ArcGIS/Projects/MyProject2/MyProject2.gdb", data = df2) The error I got: Error in .call_proxy("arc_export2dataset", path, pairlist(data = data, : dataset already exists
... View more
09-05-2018
05:57 PM
|
0
|
6
|
1905
|
Title | Kudos | Posted |
---|---|---|
1 | 11-08-2018 10:19 PM | |
2 | 07-19-2019 07:19 PM | |
1 | 05-03-2018 05:24 AM | |
19 | 09-18-2018 11:55 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|