POST
|
Just to make sure I understand correctly. Essentially what you would like to do is update the geometry of the old parcel boundary layer (blue and pink) with the geometry of the new parcel boundary's (green) If this is the case then we can make a pretty simple script that can update the geometry of the old layer with the new geometry while preserving the original attributes. Let me know if that is essentially what you are looking to do.
... View more
01-27-2020
07:35 AM
|
0
|
11
|
815
|
POST
|
Do features in each layer have information that would match, like a unique identifier, parcel number or something that can be used to match the old geometry to the new geometry?
... View more
01-24-2020
02:13 PM
|
0
|
1
|
1782
|
POST
|
This is possible. However it could be rather labor intensive if you did it manually. Since you need to do analysis based on the area of each poly before the merge, it would be beneficial to write a python script for the process. I will go over the manual workflow on how I would accomplish this below. If this seems to be too much or your data set is too big, please let me know and I can give you a hand with a python script / tool that will get this done for you. Step 1: Create a field within the feature class that will contain the "Area" calculation for each polygon after they are clipped. I'm sure you know how to do this however just I linked below on how to create, modify and delete fields in ArcGIS Pro. Fields view—Geodatabases | ArcGIS Desktop Step2: Use the clip tool to clip the polygons down based on a "Boundary" layer This tool can be searched for in the Geoprocessing pane in ArcGIS Pro and I have also linked to the tool documentation. Clip—Help | ArcGIS Desktop Step 3: Do an area calculation on the "Area" field that was created in step one VIA "Calculate Geometry" by right clicking the field name in the attributes table. You can also access the "Calculate Geometry Attributes" tool by searching for it in the Geoprocessing pane. Step4: Use the merge tool in the "Edit" ribbon within ArcGIS pro. Select the polygons that you want to merge and preserve the attributes from the polygon with the largest area. You physically have to choose which polygon to preserve the data from within the tool menu. FYI the Merge tool within the "Edit" ribbon in ArcGIS pro is not the same tool that can be found while searching for the merge tool in the Geoprocessing pane. The big difference is that the Merge within the "Edit" pane merges features while the Merge Geoprocessing tool merges datasets. Let me know if you would like to explore a python script option. Hope This Helps
... View more
01-24-2020
01:33 PM
|
2
|
19
|
1782
|
POST
|
It's been a while since I have done XY data. Going from memory this should be the workflow. All of the mentioned tools below can be found in ArcMap under the "Geoprocessing" tab then click on "Search For Tools". The Geoprocessing pane will open and you can then search for tools. 1) Convert your excel file to a CSV, this can be done within excel Import or export text (.txt or .csv) files - Excel 2) Within ArcMap click File > Add Data > Add XY Data. Follow the onscreen instructions. Once the XY layer shows up in your Table Of Contents, right click the XY layer name and click Data > Export Data and export the layer as a feature class. Below is a link to a small tutorial to help you with Adding and exporting XY data. Adding x,y coordinate data as a layer—Help | ArcGIS for Desktop ****Loading new data into existing feature class**** 3) Right click the feature class you need to add the new information to and select "Load" then "Load Data" or use the "Append tool". Use the newly created feature class from the previous steps as the input data. Run the tool Note: You will probably be asked to map the fields from the new feature class to the destination feature class. It's pretty straight forward. Just match the destination fields to the corresponding source fields. If you have any questions or run into problems please let us know Hope this helps!
... View more
01-09-2020
10:48 AM
|
0
|
0
|
530
|
BLOG
|
Congrats to Robert Scheitlin, GISP , Dan Patterson , Joshua Bixby and everyone else. All of you are a powerhouse of knowledge!
... View more
01-08-2020
07:18 AM
|
5
|
0
|
1769
|
POST
|
Can you post any error information please. We also don't have all of your code to see how you are making the connection, accessing the service and if you are doing any type of exporting. How are you feeding data into the the arcpy.Statistics_analysis tool? Usually when I need to use arcpy to run analysis on published services I export the service in a usable format (FGDB, Shapefile, CSV etc) download the export and unzip the file if its needed. You then have data you can use in arcpy. There might be a function or tool within the ArcGIS API for Python that would allow you to do this without exporting. I didn't spend much time looking through the API so if anyone else knows of a better way than what I'm about to show please share. So you would need to export your service to a format that you can use. Once it's exported you then download it: import arcgis
import os
import datetime
########################################################################################################################
# Variables
########################################################################################################################
agoLogin = arcgis.GIS(url="input the url to your portal",
username="input your username",
password="input your password")
getTheService = agoLogin.content.get("Input the item ID # here")
serviceExportName = "{}_BACKUP_{}".format(getTheService.name,
datetime.datetime.now().strftime("{}_{}_{}".format("%m", "%d", "%Y")))
########################################################################################################################
# Export the service to File Geodatabase
########################################################################################################################
getTheService.export(serviceExportName, "File Geodatabase", parameters=None, wait=True)
########################################################################################################################
# Download the File Geodatabase and saves it in the same folder that the script runs in
########################################################################################################################
searchForExportedFGDB = agoLogin.content.search(query=serviceExportName)
exportedFGDBiD = searchForExportedFGDB[0].id
downloadExportedFGDB = agoLogin.content.get(exportedFGDBiD)
downloadExportedFGDB.download(save_path=os.path.dirname(os.path.abspath(__file__)))
########################################################################################################################
# Then use zipfile to unzip the geodatabase
########################################################################################################################
Once the export is downloaded unzip it and use the featureclass or shapefile as the in table for the arcpy.Statistics_analysis() If you are using a CSV you will probably have to convert it to a table before you can use it.
... View more
12-31-2019
06:57 AM
|
0
|
2
|
1102
|
POST
|
Since you are getting the "FC doesn't exist" error, I took a look at the variables. So with your "for" statement you are trying to iterate through the "featureclasses" variable which is set to arcpy.ListFeatureClasses() which would be trying to get the featureclasses from within the workspace. However I noticed that your workspace might be getting set to a folder. Try setting your workspace to a geodatabase and see if the script runs. Disregard this reply. I just saw where you said the script stops at the second mask, which means arcpy.ListFeatureClasses() is getting populated and is working with the current workspace.
... View more
12-24-2019
06:22 AM
|
0
|
0
|
904
|
POST
|
Gasper Can you please post your code using the syntax highlighter which helps preserve format and indentation. To do this click the 3 dots: Then click more and choose Syntax Highlighter: Then choose Python from the language drop down menu, paste your code and click Ok
... View more
12-23-2019
07:13 AM
|
2
|
0
|
904
|
POST
|
Can you please post your entire code so we can see it. Make sure to scrub out any sensitive information like server connections or account information. You can add your code by clicking the 3 dots that will say "Expand Toolbar" when you hover over the dots. Then click on "More" then on "Syntax Highlighter". When the Syntax Highlighter opens choose "Python" from the drop down menu at the top and paste your code in the main window.
... View more
12-20-2019
12:00 PM
|
0
|
0
|
764
|
POST
|
Try printing the value of the button (assuming you are using tkinter): print(CheckVar1.get()) If that provides the output you are looking for add that to your if statement: if CheckVar1.get() == 1:
print("pri_oh = 1")
else:
print("pri_oh = 0")
... View more
12-20-2019
10:37 AM
|
1
|
1
|
942
|
POST
|
From taking a quick glance, you need to be looking at the "Upload Service Definition" tool's parameters: Upload Service Definition—Help | ArcGIS Desktop You changed the in_server parameter which describes the server type. I would go read the info for that parameter and see which best fits your needs. To get it to save in a different folder you have to set the "in_folder_type" parameter to "NEW" then specify the folder with the "in_folder" parameter. It is by default set to "IN_SERVICE_DEFINITION" which means it gets its folder location from the service definition. So the block of code that uploads the service definition might look something like this: arcpy.UploadServiceDefinition_server(in_sd_file = sd_output_filename,
in_server = "My Hosted Services",
in_folder_type = "NEW",
in_folder = "Maps")
I haven't tested this so you're probably going to have to play around with it some to get it working Hope this helps.
... View more
12-20-2019
07:32 AM
|
0
|
2
|
764
|
POST
|
Take a look at the Geometry Class for ArcPy. It's makes it possible to do some some creative process's on geometry. So for example if none of the geometry touched each other except for the matching geometry you could write a script to delete only a single geometry from the ones that are touching. Have a look: Geometry—ArcPy classes | ArcGIS Desktop
... View more
12-16-2019
01:58 PM
|
0
|
0
|
642
|
POST
|
Sounds like you are trying to do nearest neighbor analysis. Have you tried the Average Nearest Neighbor tool? If this gets you close but no cigar, can you provide an example data set, then we can explore some options. Average Nearest Neighbor—ArcGIS Pro | ArcGIS Desktop
... View more
12-16-2019
06:19 AM
|
0
|
0
|
483
|
POST
|
I'm not really sure what you mean by "get the segments" however: If you are looking to cut the polyline up into segments that represent the roads you could try using the Split By Attributes tool which will separate the feature based on a unique value. Split By Attributes—Help | ArcGIS Desktop If you are looking to just output information about the segments into something like a text file, let us know and we can try to lend you a helping hand
... View more
12-13-2019
01:54 PM
|
2
|
2
|
483
|
Title | Kudos | Posted |
---|---|---|
1 | 10-28-2019 12:03 PM | |
2 | 10-28-2019 10:47 AM | |
1 | 01-31-2020 10:43 AM | |
1 | 12-20-2019 10:37 AM | |
2 | 01-24-2020 01:33 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|