|
POST
|
I have adapted Mike Hargrave's method for creating a single point per intersection with all associated street names. Since you have already done the intersect part to get the points for each segment I have left that part out. 1) Calculate X and Y values on the points that have the Street information into two double fields using Calculate Geometry. 2) Add a DissolveID text field and calculate a concatenation of your X and Y fields in the form: X_Y 3) Dissolve on DissolveID field to end up with only one point per intersection and just the field DissolveID value. 4) Do a Spatial Join with your target being the intersection points that only contain a DissolveID field, and the Join Features being the undissolved points that still have all of the Street information. Make sure you use the JOIN_ONE_TO_ONE option. In the Spatial Join Tool right click on any field that you want to have every value retained in the "Field Map of Join Features" window and choose Properties. In the property window set the Field Type to Text. Increase the number of characters allowed to something like 200 so that there is room for all Street Names (less for short text values and most numbers and dates). Set the Merge Rule to Join. Add a Delimiter of "_". 5) Run the Spatial Join tool. All street segments at the intersection will be included. Your end result in the Street Name field should look something like "Polk St_Polk St_30th St_30th St" and your Type field should look like "Maintained_Not Maintained_Not Maintained_Maintained". The Street Name and Type order will be in whatever order the points are read, but they will correspond to each other. I believe that if you want them in a certain alphabetical order you would have to first permanently sort the points (Sort tool if you have ArcInfo or Criss Snyder's Permanently Sort Features tool"). If you only want each name to appear once (and I think in alphabetical order) do another Dissolve of all of the segment points and only keep DissolveID and Street Names values (do not keep the type if you want to avoid repeats). When you Spatially Join this second Dissolve with the Dissolve of Step 3 it will only have each Street Name appear once and be in sorted order, resulting in "30th St_Polk St". keep the Count in a Text field so that you can get "2_2", telling you it is a 4 way intersection with each Street Name having 2 segments. 6) Use Field calculator to replace the "_" character with " & " - set the Parser to Python, then use the following: !YourFieldName!.replace('_',' & '). Your final street combination will look like "Polk St & Polk St & 30th St & 30th St" your Type combination would look like "Maintained & Not Maintained & Not Maintained & Maintained" if you wanted to keep correspondence between each segmentIDs Street Name and Type association. If you only wanted unique Street Name combinations and did the second Dissolve on Street Names then the result would be "30th St & Polk St" 7) If you did the only use each name once option and a point does not contain the " & " characters, it is either a continuation of the street with a node (Count would be "2" or more if you joined its values from the Dissolve) or a Cul-de-Sac, Stub Street, or Topological Error (Count would be 1 if you joined its values from the Dissolve). See the screen shot for a typical Spatial Join tool set up, Field Property set up, and result. In this case I joined all of the points from every segment and did not sort the points prior to doing the Spatial Join.
... View more
08-10-2012
06:41 PM
|
0
|
0
|
3526
|
|
POST
|
Hello, I have an "Intersections" point layer that I intersected with my street center-line file with the goal of getting the street names and classifications of the streets which form the intersection. The result is a point layer with a point at the intersection for each of the road segments that form the intersection. So, for instance, a four way intersection of Polk St and 30th St will have four points. Two for Polk and two for 30th Streets, the difference being the street segment ID. How do I combine those four points into one point that holds all the attribute information? I need the point to include all the street names that come into it, and the classifications as well, but I'm stuck with having all that in multiple points right now. Thanks! I have seen some user use the Spatial Join tool with the One-to-One option and a rule to merge data for the street names or IDs into a single field with comma delimiters. I have an ArcInfo license and use Collect Events, a join field of a concatenated X/Y pairs string, Summary, Pivot Table and field calculator to transfer data from a column of multiple features into a single row. Search on those tools.
... View more
08-10-2012
04:15 PM
|
0
|
0
|
3526
|
|
POST
|
What I would like is a tool that: 1) Allows the user to select a line 2) Delete the line 3) Then add a new line 4) Maybe save the attributes of the old line but not required Hitting the "delete key" to delete the line works fine but then the user has to go back up to the menu to add the line. Just removing this step would save a lot of time. Any help at all would be appreciated. Python cursors and geometry objects can do all of these steps, but the main issue is whether there a way to do it interactively with the user through some type of event trigger detection and editing action event monitoring in Python. I do not think that Python can read editing event triggers, so ArcObjects is needed. However, I believe that if Python could detect edit event like ArcObjects (delete, create and modify), that then both ArcObjects and Python would be able to use cursors and geometry object to read a selected record in a layer, store it in a row or dictionary object for later attribute transfer, delete the selected line, create a new line's geometry if a set of ordered coordinates is provided (an event based thing if following mouse clicks), create a feature object (newrow for Python) that gets the new geometry and a transfer of attribute data, and insert the new line into a target feature class.
... View more
08-10-2012
04:04 PM
|
0
|
0
|
739
|
|
POST
|
Is there anything else I can try? Did you catch the fact in the download that the second parameter for the Field does not have the Obtained From setting correct in the Script tool? Open the script Properties, go to the Parameters tab, click the Field parameter in the top list (the second parameter listed). In the settings at the bottom of the dialog make sure the Obtained From setting is pointing to "Feature_Class_Table" (the correct name of the first parameter) and not "Input_Feature_Class_Table". That was causing me problems until I fixed it. If that does not help, open the tool in the model and choose the input values again to make sure each parameter responds to the validation script and then screenshot the script input dialog with the input values you are providing (don't cover it up with an error message). Then screenshot the tableview of the input data. I just retried my tool and it allowed me to fill in a list with over 35,000 values, so apparently the index value out of range is perhaps due to something in the append to list behavior. Perhaps upper/lower case, Null values or whitespace values are being excluded from the list and the unique value counter of the cursor and the list index values do not stay in synch.
... View more
08-10-2012
08:26 AM
|
0
|
0
|
10572
|
|
POST
|
Hi Are you supposed to be able to 'plug' your own data in the script linked to by the ESRI staff above? I downloaded the model and followed instructions on blog here step by step as suggested. But the model doesn't seem able to accept my data - it only seems to work with provided data. Trying to execute the model after doing as instructed results in either in an empty output, see "Results Window", or I'm simply unable to select a Type and Field, for example see "Error". Both images attached as below. [ATTACH=CONFIG]16776[/ATTACH] [ATTACH=CONFIG]16774[/ATTACH] In my data I've tried the following with no success; reduced the number of columns and records as I was getting an "Out of Range" error - this stopped occuring after reducing records from 1000 to 33; created a string column exactly like that used in the example data for the drop list to run off; Tested the sub-model in a new empty model, and also opened up the model and tested it. Can anyone help with what I've missed (perhaps updating file locations or the like??), or was this tool not designed to take anyone elses data? Best Regards Peter I have used it with my data and as long as I do not exceed the maximum number of records allowed in the list and account for the field's type I do not get an error with my data. The model has a Selection query string that is built assuming that your field is a string type, so if your field type is a numeric or date field that will generate an error until you correct the way the inputs build the Select query filter string. At least several hundred values can be added to the list before an error is generated. I plan to add code to determine exactly how many values can be added before that error occurs, so that I can halt the list growth and provide a warning to the user. A seed value parameter could be added to the tool to provide a Like statement or Min and Max limit to prefilter the record set so that the user would have some control of what values will be included in the list while avoiding the index out of range error. Validation code could be added to let the filter value be optional if no index out of range error is detected and required if the error is detected, rather than just letting the tool fail.
... View more
08-10-2012
12:27 AM
|
0
|
0
|
10572
|
|
POST
|
I use ArcMap 10 at work. I am working on a project in which I am trying to map the locations of wells. I am using the Editor toolbar to create features, and I am drawing small circles to represent the wells. Ideally, I'd like there to be some standardization for the data I am producing. Is there a way to draw multiple circles that are exactly the same size? Right now, the circles I have drawn are very similar in size, but not exactly the same. If what I am asking is not possible to do in ArcMap 10, that is okay. Nonetheless, any suggestions would be helpful. I appreciate it. Thanks. Save yourself a lot of time and create the wells as points (much easier to place then circles) and then when you finish buffer the points by an exact distance (the radius) to get circles of the same size. You should be able to extract the Centroids of the wells you have already created to initially create the point data so that you do not have to start over. If you have an ArcInfo license you can use the Feature to Point tool to extract the Centroid points from your circles into a new point feature class. If you have ArcView or ArcEditor it takes a few steps to do this as follows (the exact steps assume you have version 10.0 or 10.1, but earlier versions can still use the basic process): 1. Create two double fields in your polygon feature class called something like X_Coord and Y_Coord. 2. Use the Calculate Geometry tool (accessed by right clicking the field header of these new fields in Tableview) to calculate the Centroid X and Y values of your circles. 3. From the Tableview, export all of the well data to create a new Table (do not export from the TOC, because you need to create a Table not a Feature Class). 4. In the ArcMap TOC right-click the table you just exported and choose the Make XY Event layer to create a point layer that generates features in memory. 5. From the TOC right click the XY point layer you just created and export it. This step will create a true Feature Class that retains all of your Well data as points. When you finish creating all of the well points, anytime you want perfect circles of a given size that contains the points in the center, use the Buffer tool and input the radius you want. Points have several advantages over polygons for symbology of small features in a map, so you may find that you are happy with them all the time. Adding buffer around a point on the fly with the selection tool is also easy and on the fly buffers are supported by the Spatial Join tool, so about the only time you really need a Polygon Circle is if you are doing an Intersect with another polygon layer and want the wells to divide at crossing Polygon boundaries. I hope this helps.
... View more
08-04-2012
03:38 PM
|
0
|
0
|
1035
|
|
POST
|
I have a geodatabase line FC symbolized using the "Unique value, many fields" option. For some reason one of my features is not displaying in the map/MXD? It there and coded properly, but its not displying? Both fields have domains, but as I mentioned I am sure thay are coded properly? Anyone? Thanks, RR> Screen shot the table record for the feature showing the field values and then screen shot the layer Symbology properties with the value match you are expecting to be symbolized. Also, go to the Add Values button dialog and press the get all values button to see if any show up as unused in your symbology. You should verify the domain values in the table to ensure that a non-domain value did not get inserted using the Field Calculator. The Field Calculator will not observe domain restrictions and the value will not be rejected by the field when the Field Calculator is used as long as it matches the field type. Basically, I cannot think of a reason for the behavior you describe other than there being a mismatch in values or a layer definition query that prevents the feature from displaying (if it shows up with the identify tool, then it is not hidden by a definition query).
... View more
08-03-2012
06:32 PM
|
0
|
0
|
650
|
|
POST
|
There are Code tags that perserve indentation for your code (the word CODE is bracketed inside straight brackets to begin the code block and the code block is ended with /CODE being enclosed in straight brackets). Also the counter can be incremented in a more Pythonic way by using the += operator (highlighted in red). See below: #START OF CODE
# Import system modules
import arcpy
from arcpy import env
# Set environment settings - make this where your output will be going
env.workspace = "C:/data"
# Set local variables - make these whatever you need them to be
inFeatures = "ca_counties.shp"
valField = "NAME" # This is the field that must change to represent each of your fields
# so instead of using this we will use fieldList[count] so that were using EVERY field name in the table
outRaster = "c:/output/ca_counties"
assignmentType = "MAXIMUM_AREA"
priorityField = "MALES"
cellSize = 0.5
fieldList = arcpy.ListFields(filename) #creates a list that contains all of the field names from the
attribute table of 'filename'
#change filename to the file you're using
count = 0
while count < len(fieldList):
arcpy.PolygonToRaster_conversion(inFeatures, fieldList[count], outRaster, assignmentType, priorityField, cellSize)
#perform the conversion using every field name contained in fieldList
count += 1
#END OF CODE
... View more
07-30-2012
04:30 PM
|
0
|
0
|
3734
|
|
POST
|
Have you added the column while you are not in an editing session first? Adding columns cannot be done while editing. Also, if you are using SDE data, you have to have priveleges granted by the SDE administrator to alter the schema of an SDE table. If you have added the column and not cannot modify the data in the table, let us know. What database are you using for the table, since editing may differ for some databases? Also, what version of ArcGIS are you using?
... View more
07-12-2012
03:35 PM
|
0
|
0
|
2666
|
|
POST
|
Hello, I have a layer of multiple overlapping polygons of fire perimeters with the same field attributes. I'm looking to create smaller polygons of all of the intersections while preserving all of the field information. I want to have polygons that represent their fire history. Every attempt with the intersect tool produces separate polygons for each intersection (if three polygons overlap, three separate polygons are created with the intersecting spatial extent). My question is whether I can alter the coding (in python) of the intersect analysis to combine the field attribute information. For example: If three polygons overlap and they all have the field "Year", when they combine the new field ID's will be preserved in the single intersection feature with "Year_1", "Year_2" and "Year 3". This way I might preserve the information from all of the overlapping polygons into the smaller intersections. OR Whether I may perform a second process upon the intersect output that combines the field attributes of intersections that are of the same extent. Basically have 3 polygons melded into one based on the same spatial extent. I've attempted using the Spatial Join tool and Dissolve to no success. Thank you for your help and insight. I have the latest version of ArcGIS. Combine the spatial extend after the Intersect with the Dissolve tool. Then perform a Spatial Join and use the one-to-one option. Play with the summary options to get a comma separated list field. Then parse that field out to separate fields. If that doesn't work and you have an ArcInfo license you can use the Pivot Table tool in combination with the Summary tool to create separate numbered fields that converts columns to rows. Takes a few steps and has to be done for each field transposition from column to row. Done this many times to get exactly what you want.
... View more
07-07-2012
08:56 PM
|
0
|
0
|
2479
|
|
POST
|
How we can get a picture with transparent background in PngPictureElementClass item? It is not a supported behavior, so you can't. There is no property in the interface that supports this that I have seen. Graphics generally do not support transparency, while layer symbology does. Converting the locations to point features and then using a picture marker symbol or Representations with transparency may be your only option.
... View more
07-06-2012
10:11 AM
|
0
|
0
|
3391
|
|
POST
|
Attached is the last version of the tool I had revised for ArcGIS 9.3. I have ArcInfo at ArcGIS 10.0, so I can use the Sort tool ESRI provides. I just wish it would preserve the ObjectID values without having to first calculate a field to store them and including that field in the Sort output. I hope you find it useful.
... View more
06-21-2012
12:39 PM
|
1
|
0
|
1746
|
|
POST
|
I need to generate a point layer that represents distances along a line feature. I have the starting point features and the line that is to be traversed in GIS. I am looking for an automated way to take my spreadsheet of distances and generating point features. Anyone have any ideas? Use the Create Route Features under the Linear Referencing toolset to make a Route with M values based on the length of the line. This line will need a Route ID value, which can be based on a field in your line feature class. The spreadsheet can now act as a Route Event Table as long as each record in your spreadsheet has the Route ID value listed and the distance of the record along the line (which you seem to have).
... View more
06-20-2012
12:48 PM
|
0
|
0
|
1204
|
|
POST
|
Yes, I know what field calculator does! My question is, "Is there another way to do this other than opening up the attribute table?" Does anyone else have any thoughts? The Attribute dialog available during an Editor session can do this. Select the Editor selection tool (the black arrowhead) and right click on the Map interior to get the context menu. Select Attributes from the context menu to open the Attribute dialog. All selected records in the current editable workspace will appear in the upperhalf of the Attribute dialog window. Select the header for a feature class or table in the upper window (the name of the layer above the individual records). Now any entry you make in a field in the bottom window will be applied to all selected records in that feature class or table. The attribute table never has to be opened with this workflow.
... View more
06-20-2012
12:42 PM
|
0
|
0
|
1936
|
|
POST
|
The Dissolve tool should help do this. Make Owner1 and Owner2 the case fields. Uncheck the Create Multi-Part Features option. Any partially shared boundary will allow a merge. Any Count/Frequency on the output that is greater than 1 will be an indicator that two or more parcels merged (although it is not definitive). (Null values may cause a problem with the dissolve, so you may have to calculate Null Owners to a whitespace character to get correct results). You could then run a Spatial Join with the Many to One option or your parcels against all Dissolve shapes with a Count/Frequency that is greater than 1. Run a Summary Statistics on the Spatial Join output to find FIDs of Dissolved polygons that have more than one Parcel FID associated with it. These are the set of parcels that meet your criteria. You can use a relate from the Summary Statistics output to the Spatial Join output and then to your parcels to select the collapsed parcel set. A join of these outputs to the parcels would allow you to create a merge symbology based on the shared Spatial Join FIDs. Dissolve, Spatial Join and Summary Statistics are available for all licenses.
... View more
06-19-2012
02:28 PM
|
0
|
0
|
1495
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-24-2026 11:37 PM | |
| 1 | 03-24-2026 08:01 PM | |
| 6 | 02-23-2026 08:34 AM | |
| 1 | 03-31-2025 03:25 PM | |
| 1 | 03-28-2025 06:54 PM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|