|
POST
|
Hi, I need to split/divide a polygon into 14 equal polygones. is there a tool available to do such a function? Thanks, Djalil No tool exists that takes a complex shape and divides it into equal area portions that I know of. This is a complex function. You will have to search the forum for scripts that do something similar to accomplish what you want, and I am not sure if such a scripts has been developed before.
... View more
12-17-2013
04:30 AM
|
0
|
0
|
1362
|
|
POST
|
I'm trying to calculate "landcover" �?? the percentage/proportion of various habitat types (Landcover shape file) that fall within the boundaries of various location buffers (a separate shape file). I realize I can do this by clipping the landcover layer to each buffer and calculating the geometry/area of the habitat fields in the newly clipped landcover area layers to arrive at a proportion of cover for each buffer, but as I have over 550 buffers this would be incredibly time consuming. Is there a more automated way I can achieve this? Thank you I would create a double field in each layer and calculate the area of the land covers and buffers into that field to make them a permanent value. Then I would use the Intersect tool on both layers. Then the Dissolve tool on the FIDs of the landcover and buffer polygons in the intersect as the unique case with the Max of the double field. The percentage of each buffer for each land cover would be the current polygon area divided by the fixed double area for all dissolved polygon FIDs.
... View more
12-17-2013
04:26 AM
|
0
|
0
|
1218
|
|
POST
|
If conflation technically means something other than what the Locate Features Along Route tool currently does for polylines, that makes no difference to me. The primary point I want to make is that tool as it is now designed has no bug. If the current behavior was a bug it would have been reported and fixed decades ago. The easiest way to create a bug is to alter an established behavior of a legitimate tool that has been used for decades so that it suddenly performs new behaviors without user permission. Changes to well established behaviors that users have relied on for decades should only occur by making new options available that only take effect after the user explicitly changes his script, model or workflow to take advantage of them. If ESRI had always carried that out with each new release, the vast majority of bug reports would never have been reported. (How many of us would have checked the box to make tables all appear in one window or wanted that as the default if we had been given the choice?)
... View more
12-12-2013
11:26 PM
|
0
|
0
|
559
|
|
POST
|
Richard - What you're saying makes sense, but then the tool seems odd. ESRI's definition of Locate Features Along Routes: "Computes the intersection of input features (point, line, or polygon) and route features and writes the route and measure information to a new event table." Source. Your description is a little over my head. The way I interpret it is: the tool takes two parallel(ish) lines and joins their attributes, but only within certain points (defined by your search radius). Which to me just sounds like a spatial join, except with measure values. Points only create point events and lines only create line events with this tool. That difference is why the help explains that there is a difference in how the tolerance is interpreted for these two feature types. Numeric tolerance used with points means that only a point event is found and created and cluster tolerance used with lines means at least two end points must be found or no feature event is written. The tool is more than a spatial join, because it is actually capable of creating multiple smaller line segments from a single source event line wherever the event line has some portions of its length within the Route tolerance. The line will have no event written where it does not intersect on some portions of its full length. Spatial Join never creates any new line segment shapes that are not an exact duplicate of the target feature, but Locate Features Along Routes creates new line shape events that may be different from the input lines or the routes, just like Intersect with the polyline output type. Anyway, this behavior is exactly what I want when doing line conflation. If I wanted intersections I would use Intersect polylines with the points output option and then use those points as the point event for Located Features Along Routes as you found you had to do. I do not deny that a similar set of options could let this tool do the same thing, but it is essential that it is only offered as an option like they do with the Intersect tool to let me explicitly choose to get point outputs or line outputs. The current tool behavior cannot be altered without a new setting for end user control over the behavior, because people like me would be upset if they could no longer use the tool exactly as it is currently designed and it suddenly changed to a new behavior that breaks our workflows. Not necessarily. The tool has enough functionality to recognize if you are choosing points, lines, or polygons as the intersecting features, and greys out the appropriate parameters accordingly. At most, there could just be another check box that says something like "Include intersecting points in output table" (the default can be off so as to conform to the main purpose of the tool). It could still copy the attributes over, as well as the From-Measure and To-Measure (if I set a search radius)...I just need to be able to tell it that I need one extra box. It does not have enough functionality to change its decades old behavior without breaking workflows. The new option you mention would have to be added for me to be willing to let you get the output you want, since an output like what you are seeking would break my workflows. The current output cannot be regarded as a bug that must by default be overridden because it serves a legitimate purpose for users that requested the tool be developed in the first place. Alternatively if I set my search radius to 0, it could recognize that I'm only looking for intersects. Yes I know this defies physical logic since an intersection technically exists in space but still. No, a search radius of 0 means to me that the line and the route must be an exact point for point match along a line segment in order to create an event. That is what a 0 tolerance means for the Intersect tool when polylines are intersected with polylines, unless you explicitly choose the option to create a point output type. I would have my workflows break if suddenly this tool only created point events when I specified a 0 tolerance without asking me for permission to do that. My workflow requirements are every bit as legitimate as yours. But users like me have the prior claim to this tool's behavior, since we have created workflows based on its current behavior over the course of all of the decades it has existed. Therefore, by default it could only change behavior if a new option was consciously chosen, and without that our scripts and models must continue to behave as they do now for all possible settings that the tool currently supports. Post your request on the Ideas site, but be sure to word your request as an enhancement involving an additional option that expands the tool's functionality, not as though this tool has a bug in its existing behavior. It has no bug. If the current behavior is not respected, any attempt to "fix" it by altering the behavior of the current settings will only create a bug, not fix a bug.
... View more
12-12-2013
10:42 PM
|
0
|
0
|
4119
|
|
POST
|
Not sure if you have found a solution. You can try: 1. Use Dissolve tool to unsplit lines; if there is a street name field you can use that as the Dissolve Field. 2. If the resulting lines are crossing at intersections (not ending at intersections), you can use Feature To Line tool to break them at intersections. I agree you need a Street name attribute to make this work correctly. Knuckle streets are not an uncommon type of intersection in a street network between two different roads, but most tools will only create an intersection if the point of connection will create 3 or more separate lines. Street Name attributes prevent knuckle streets from joining together. I would consider using Create Routes rather than Dissolve if you have a street name field, since you can control more aspects of how the line in constructed and evaluate the result more fully with measure hatches. Measures that include gaps also can tell you if gap occur where you don't expect them, which can cause odd line chaining. Full loops will mess up every tool you could use, so beware of those. If you don't have an Advanced license, the Planarize tool can divide lines at normal intersections as an alternative.
... View more
12-10-2013
03:22 PM
|
1
|
0
|
28087
|
|
POST
|
That's what I ended up doing (and then using Locate Features Along Routes with my point layer). The only problem with that is: - It's an extra step - When I ran intersect, it came up with 1024 points. When I ran Locate Features on those points, it came up with 1117 locations. Now I have to investigate those extra 100 points to see what's up, because in no situation should one point fall on two different pipelines. I've used Locate Features Along Routes with polygons and it works like a charm. To not have it work with polylines seems like a glitch. It is not a glitch. It is not an intersect tool at all really with lines, it is a conflation tool. Conflation looks at more than just an intersection and is designed to ignore intersecting lines. Instead it attempts to only register lines that could be interpreted as parallel lines within the tolerance distance. It is a useful tool for aligning two line networks that are not quite aligned with each other, which a common need for transportation oriented folk (who had the initial influence on the LR toolset). In any case, it would break the current tool if they did what you want from my perspective. To do what you want a set of choices that could let me not do what you want to do would have to be incorporated into the tool so it retains its current behavior. Otherwise, you need a new tool. In any case having to use a multistep geoprocessing process means you are joining the real world of GIS experts. Everything worth doing is multistep and I gave up complaining about it years ago.
... View more
12-10-2013
03:01 PM
|
0
|
0
|
4119
|
|
POST
|
I had posted an Add-In to the Gallery that was supposed to create 3D length measures on a Linear Referenced Route that was Z aware. Unfortunately, I had attempted to include code to filter the layer list to only show those layers that would be editable, and that code did not work properly on systems other than my own. I have removed this validation check, so it is on the user to be sure they have edit rights before attempting to assign 3D measures using this tool. Since I cannot update the gallery I am posting the Add-In here. It is compiled for ArcGIS 10.1, and I do not know if it will work in 10.0 or 10.2. Here are the basic installation instructions. After downloading the Add-In double click it to install it and make it available to ArcMap. In Desktop open the Customize | Extensions... menu dialog, check the extension called Measures to 3D/2D, and close the dialog. In Desktop open the Customize | Customize Mode... menu dialog and click on the Commands tab. In the list of Categories scroll down until you see a category named "Measures to 3D/2D Lengths" and click that category. In the commands list box you will see a tool named Measures to 3D/2D.... Click and drag this tool on to one of your toolbars and drop it onto the toolbar. Close the Customize dialog. Now you should be able to click the Measures to 3D/2D Lengths tool button to open a panel for configuring and using the tool. If you have at least one projected polyline layer in your map that is M and Z aware, it should appear in the list of layers. The tool lets you specify a multiplier for unit conversions. A unit calculator detects your current XY projected units and can assist you to find the conversion factor you should input to achieve a particular measure unit conversion (for example to convert from US Feet to Meters the calculator displays a conversion factor of 0.304800609601219). You can optionally specify a Measure offset for your first measure, ignore or take into account measure gaps, make the measures go with or against the digitized direction, and respect or not respect a selection of routes to operate on. If further explanation is needed post your questions or comments here.
... View more
12-09-2013
10:57 AM
|
3
|
11
|
13854
|
|
POST
|
I have been using ArcGIS for a few years now but have only started using Python scripting for ArcGIS for a month or so. I am trying to create a script and i am having a hard time trying to get it to work (Error after Error). In ArcGIS i have used SELECT BY LOCATION and exported the selected records as a dBASE table into my file. I have been able to create the Python script to help me do this and also to convert it into an Excel file. import arcpy fc = 'Z:\\GIS TEST\\Codes\\Codes\\K.Dun\\Export_Output_2.dbf' CSVFile = 'Z:\\Excel.csv' fields = [f.name for f in arcpy.ListFields(fc)] for i,f in enumerate(fields): if f == 'Shape' or f == 'Shape_Length' or f == 'OBJECTID': del fields with open(CSVFile, 'w') as f: f.write(','.join(fields)+'\n') #csv headers with arcpy.da.SearchCursor(fc, fields) as cursor: for row in cursor: f.write(','.join([str(r) for r in row])+'\n') This is fine but it requires me to manually use SELECT BY LOCATION and export the dBASE (.dbf) file before i run the script. Is there any script i can write that will allow to SEARCH BY LOCATION then export the selected records into an Excel file all in one go. I created a SEARCH BY LOCATION script but don't know how i would join them. import arcpy arcpy.env.workspace = "Z:\GIS TEST\Select_by_Location" arcpy.MakeFeatureLayer_management('Bld_Locations.shp', 'Bld_Locations_lyr') arcpy.SelectLayerByLocation_management('Bld_Locations_lyr', "WITHIN_A_DISTANCE", 'Breakout_Location.shp', "2000 Meters", "NEW_SELECTION") Anyone have any ideas? Please remember my Python knowledge is very limited. Since the layer is a shapefile in your second script it is by default also a .dbf file (which is the database underlying a shapefile). I believe you just need to make the layer selection of the second script the fc input of the first script. So I think the script simply needs to be: import arcpy
arcpy.env.workspace = "Z:\GIS TEST\Select_by_Location"
arcpy.MakeFeatureLayer_management('Bld_Locations.shp', 'Bld_Locations_lyr')
arcpy.SelectLayerByLocation_management('Bld_Locations_lyr', "WITHIN_A_DISTANCE", 'Breakout_Location.shp', "2000 Meters", "NEW_SELECTION")
fc = 'Bld_Locations_lyr'
CSVFile = 'Z:\\Excel.csv'
fields = [f.name for f in arcpy.ListFields(fc)]
for i,f in enumerate(fields):
if f == 'Shape' or f == 'Shape_Length' or f == 'OBJECTID':
del fields
with open(CSVFile, 'w') as f:
f.write(','.join(fields)+'\n') #csv headers
with arcpy.da.SearchCursor(fc, fields) as cursor:
for row in cursor:
f.write(','.join([str(r) for r in row])+'\n')
... View more
12-07-2013
07:35 AM
|
0
|
0
|
892
|
|
POST
|
This is what the Summary Statistics tool is for. Make your case field whatever makes sense as the unique grouping value (the field with duplicates in this case) and get the minimum ObjectID as a summary value. Then look for any Frequency > 1 in the summary table. You can join the Summary table to the original data on the case field and then use the Min_ObjectID value to select all others records than the first one to consider invalid, if that is your business rule, or just select all of the records with duplicates if that makes more sense. A calculation based on the Min_objectID can also do the assignment of 1 or 0 to an alternative field if you like. You can alternatively use a relate to separately select each of the duplicate value groups if they need to be evaluated and operated on by each group individually (a 1 or 0 in another field won't let you do that).
... View more
12-06-2013
04:05 AM
|
0
|
0
|
1051
|
|
POST
|
I�??m trying to write code that will identify site records to use in a habitat species model. There are 4000+ site records of presence and absence of a specific species. Some of these site records are duplicates (same location sampled multiple times over a number of years), some sites were only sampled once. At the sites that were sampled multiple times, in some cases an organism was present, and in other cases it was absent. For habitat model we only want to use each site location once, and if the organism ever visited the site we want to use one of the 'present' records. I can write code that identifies duplicate sites and code that identifies whether the site was occupied, but I somehow need to combine these based on the following: -If no duplicate sites: return 1 (whether occupied or not) -if duplicate sites: check all duplicate site records [INDENT]-if all duplicate site records have occurrences �?? assign one of the records =1, all others 0 -If all duplicate site records were absences �?? assign one of the records= 1, all others 0 -if there is a combination of occurrences and non-occurrences �?? assign one of the occurrence records = 1, all others 0[/INDENT] My data is in the following format where the Modelled column is the column I am trying to populate: [ATTACH=CONFIG]29622[/ATTACH] Does anyone have any thoughts as to how to approach this problem? I've been trying to write nested loops but I can't seem to figure out how to get the logic to work. I would create this in model builder using the Summary Statistics tool and Add Join/Field Calculatior\Remove Joins tools and then export that model to a python script. The model would be as follows (I am listing every tool step needed individually so it looks like a lot of steps, but it is not difficult to set up): 1. Use the Make Table View on your original table. (Optionally use the Add Attribute Index tool on the Site field to speed up joins) 2. Summarize the Table View of the original table with the unique Case fields being the Site and the Occupied Value with the summary value and obtain the Min summary of the Field_Session field (this field needs an underscore between the words to work correctly). I'll call this output Summary1. 3. Use the Make Table View tool on the Summary1 result. (Optionally use the Add Attribute Index tool on the Site field to speed up joins) 4. Summarize the Summary1 result with the Site field being the only case field and get the Max Summary of the Occupied field. I will call this output Summary2. (Optionally use the Add Attribute Index tool on the Site field to speed up joins) 5. Join the Summary2 table to the Summary1 table on the common Site fields and select where Summary1.Occupied = Summary2.Max_Occupied. 6. Remove the Join. 7. Use the Table to Table tool on the Table View selection of Summary1 to create a table of just the selected records from Summary1. I will call this result TableToTable1. (Optionally use the Add Attribute Index tool on the Site field to speed up joins) 8. Join the TableToTable result to the Table View of your original table on the common Site fields. 9. Use the Select Layer By Attributes tool on the joined table view of your original table and select with the NEW_SELECTION option using the SQL where Original.Field_Session = TableToTable1.Min_Field_Session. 10. Calculate the Modelled field of the selected records to be 1. 11. Remove the Join. 12. Use the Select Layer By Attributes tool with the SWITCH_SELECTION option and no selection SQL to reverse the selection of the Table View of your original table and calculate the Modelled field to be 0. All records are now calculated the way you want. The model can be rerun with each new sample period to update the model so that it will use first time occurrences in the current sample period. If you go the cursor route would run a select cursor through once with logic to populate a dictionary of Site values with the optimum Occupied value and matching Field_Session value that met your criteria. Then run an update cursor to update your records with a 1 or a 0 depending on whether the Field_Session value was retained in the dictionary of not for the site.
... View more
12-05-2013
11:08 AM
|
0
|
0
|
1212
|
|
POST
|
Hello and good day! I am trying to do a simple 'Locate Features Along Route' operation and am getting a blank table with no features. The same operation is yielding perfect results when running against other featureclasses, however, for some reason it does not work with the NHD flowlines fc. Some of the things I have tried include: *re-projecting the lines and route and attempting to run the tool *clipping the NHD flowlines to within 1 mile of the route *flattening the NHD lines from ZM enabled polylines to regular polylines. I am not sure what else to try? Thanks for any help you can provide. When this behavior occurs to me, sometimes I select features in both the Routes and the overlay features prior to running the tool. That usually fixes it. Not sure what the cause is. It seems to occur most frequently after I have joined data and broken the join prior to running the tool on that data, but it is not consistent.
... View more
12-03-2013
10:27 AM
|
0
|
0
|
819
|
|
POST
|
I've looked at the 'Make Feature Layer' tool. It outputs a Layer when I'm ultimately dealing with Shape files. I notice that it requires an 'Input Features' for Input. The only option that I can select that will populate the filed name list below is an option that is an already outputted file. In other words, since I'm in ArcMap, I'd have to run my tool first, generate the output (we'll call it File_A.shp) and then select that ouput (File_A.shp) as the input to Input Features. I'm not sure if I can run these two tools simultaneously. Because the attribute table is being generated after the tool is ran, I'd have to somehow set the outputted file to also become the input to Input Features. I hope that made sense. I'm stilll experimenting with the tool though. Actually, the problem is that your tool is not compliant with ESRI tools that have to supply a Validation script that exposes the field list of the tool derived from its inputs. All ESRI tools build these validation into them, which is why with one of their tools you can see a field list built by the tool. So you must look up tool validation scripts in the help if you want your tool to behave like tools ESRI provides. It is not for the faint of heart and I have to go so I can't give any details right now.
... View more
12-03-2013
08:46 AM
|
0
|
0
|
2384
|
|
POST
|
In ArcMap toolbox, there is a tool called Strip Map Index Features. When you run it, it produces an attribute table wit several columns / fields. Some of these fields include 'Shape', 'PageNumber', 'SeqId', 'Previous', 'Next' ,'LeftPage' ,'RightPage', etc. I have plugged this tool into Model Builder. Is there a way to hide or not display any of these columns / fields in the attribute table, using Model Builder or any or tool? The Make Feature Layer tool controls field visibility within Model Builder. In Desktop you can alter visibility on the Fields tab of a layer.
... View more
12-03-2013
06:18 AM
|
0
|
0
|
2384
|
|
POST
|
Good morning, I am trying to calculate the area of a larger polygon that is not covered by many smaller polygons. The larger polygon is a river and the smaller polygons are SAV beds. I have tried to calculate the area but for some reason, polygons that are even a bit away from the edge are disregarded and that makes calculating the area much more difficult. Is there a parameter I am missing when using intersect? Is there a different tool I should be using? Attached is an image of what I'm working on. The black is the river and the blue polygons are the SAV beds. Thank you for your help! I've been stuck on this for a long time now. [ATTACH=CONFIG]29525[/ATTACH] Sounds like you need to use Union, not Intersect, for this problem. That will keep all portions of all of the polygons. You can then select the larger polygon FID where the FID of the smaller polygons is -1 to get portions of the black polygon where no smaller polygons are present. (If both FID values are greater than -1 they overlap and if the black polygon FID is -1 then only the smaller polygons are present). If you output to a feature class in a geodatabase, the area of the cut up polygons will automatically be calculated on every polygon. (In my opinion, shapefiles should be avoided by GIS professionals for normal data processing operations for many reasons).
... View more
12-03-2013
05:08 AM
|
0
|
0
|
1879
|
|
POST
|
Hello ArcGIS Community, my intention is to create polygon features in the form of a compass rose. I use the bearing distance to line tool which works fine, creating the lines in the designated angle and distance from the center point of the compass rose. But now I need polygons. I tried to use Feature to Polygon for the compass rose line FC only and also for a FC containing a merge of the compass rose lines and a buffer of the center point, but the result is always a circle not containing the angular divisions. So how can I make polygon features out of my compass rose lines? Thank you Kathrin I believe you should buffer the lines a very small distance that would be nearly identical to a line width at the scale the polygon is going to be displayed at. You probably would want beveled ends for the line buffers. This set of polygons could merge with your center point buffer if you needed a single polygon with all of those shapes together or you could keep them a separate shapes with a common attribute if you need them to overlap. The polygon will be scale dependent for the optimum presentation. In any event, there is no way to make either a point or a polyline into a polygon without a buffer or closure of the line ends.
... View more
12-02-2013
12:28 PM
|
0
|
0
|
1461
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-24-2026 11:37 PM | |
| 1 | 03-24-2026 08:01 PM | |
| 7 | 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 |
07-09-2026
12:59 AM
|