|
POST
|
Sorry for not being clear. The routes B102, B104 etc. are polylines and the stops S102, S104 etc. are points. The reason they have to be snapped to a vertex is that they are going to be used in a network dataset where the stops need to be at a vertex for the purpose of transfers. I tried using a model builder but only being able to use one iterator meant I couldn't do it. I tried putting one iterator in a sub-model and running it but I was not able to do it correctly. The submodel would iterate through all of the feature classes and then output the last feature class in the dataset, this would then be used in the main model. This repeated itself for each iteration of the main model. Main Model [ATTACH=CONFIG]26583[/ATTACH] Sub Model [ATTACH=CONFIG]26584[/ATTACH] Are you sure you used a variable and not a hard coded value for the output of the Snap? For example, base the output name of each feature class on the %Name% variable, not something line "Stop_Snap". So for example the output of each iteration would look like: Path/%Name%_Stop_Snap You are giving up too early on Iterators. Python would be a much harder thing to tackle than figuring out where you are going wrong with an Iterator. Also, I personally find looking at the model connections is meaningless for troubleshooting a model, especially one involving an Iterator. Screen shot the actual tool dialogs for each step of the model to find the problem and get the best help. Where did you use variables in those dialogs? If you didn't use variables, that is where you went wrong.
... View more
08-08-2013
08:30 AM
|
0
|
0
|
2630
|
|
POST
|
I have 2 Feature Datasets in a geodatabase. One dataset contains bus routes and the other contains bus stops for each route. I want to create a script that will snap the bus stops to the vertex of the relevant bus route. There are over 100 routes and stops. They are stored in each dataset in order. They are named like this S102, S104 etc. for stops and B102, B104 for routes. I'm unsure about how to do a for loop that will get a stop and then get the right bus route Do the B102 and B104 exist as points or just vertices without attributes that name them the way you have described and you want to create them? If the B102 positions already exist as points connected to the route, why not extract just the numeric part of the Stop and Bus into their own field so that those numbers can act as a join field? That way you can pass the coordinates of the Bus Routes to the Stops with a Join and the Field Calculator. Then export the stops data as a Standalone Table. Then use the Make X/Y Event Layer to create a new Stops point layer that will match all of the Bus routes. Use Feature Class to Feature Class to permanently store that layer as a real Point Feature class. A 10 minute task with no scripting required. You can do it all in Model Builder (and export it to a Python Script if you need it to run as a script multiple times). Anyway the picture you have described is not adequate to understand what you are dealing with. It may seem clear to you, since you can see your data, but it is totally unclear what feature types you are dealing with and why you need to snap only to vertices and not just nearest point on the line, etc. What is the tolerance of the snapping? In other words, why look for a script solution at all and not a more straight forward geoprocessing solution?
... View more
08-08-2013
06:34 AM
|
0
|
0
|
2630
|
|
POST
|
Thanks for your reply. Te input features can be lines or point, not are based on the same geometry.... If I put de multi-outputs buffer on Merge tool, the output is multiple too... I use Select tool because I need execute a filter (passed by the user) over the layer (passed by the user too), then create a buffer of selected elements That makes no sense. You must be using the tool incorrectly and need to break down the inputs as single layers to the Select and Buffer tool. How does the user pass multiple layers in the first place? Why would you let them pass multiple layers at all? If you really have multple layers, break down the parameters into separate parts and feed each part into a separate Select and Buffer tool, not all of the parameters into a single instance of each tool as it appears you have done (that should not work anyway). Screenshot the actual input dialog of the Merge tool. It will combine multiple buffer inputs into one output file if configured correctly. I believe you are configuring the tools incorrectly, but have not shown the screenshots of the tools configurations, so we can't help you. My suggestions would be an alternative to the Select tool. SQL selections work with Select Layer By Attribute just as well if not better than the Select tool (which I have never found a reason to use). Do you actually need outputs of the selections as actual feature classes at all? That is what the Select tool does. If those are not needed outputs and you really only need the Buffers, don't use the Select tool. Use my approach, which just creates feature selections on the original feature classes for the Buffer to operate on. Only the Buffer tool would generate outputs for the Merge tool to operate on. I can't create two inputs to the Select tool at all. It only accepts one feature class if I do not use a parameter and just actual feature classes. This also makes me beleieve you are using the tools and parameters incorrectly in your model. What types are the input parameters? Why are they acting as multiple layers inputs in the first place? Whatever they are they need to change to not do that. If they really are meant to be multiple inputs, they need to be iterated more than likely, not dumped directly into the tool, which is not configured to accept layer lists.
... View more
08-08-2013
05:58 AM
|
0
|
0
|
2308
|
|
POST
|
I am drawing lines from manhole to manhole, and occasionally I connect to the wrong MH. Is there a way to edit a line, as to just stretch one endpoint, as opposed to moving the entire line. Sort of the way grips works in Autocad. Any help will be greatly appreciated. If these are simple 2 point lines you can select a single line and press the Edit Vertices button on the Editor toolbar to get a node handle on each end of the line. That handle can be grabbed and dragged to relocate each line end independently. The edit is done in sketch mode and can be terminated without committing the sketch if you right click the line and choose the Delete Sketch menu item. To save the sketch press F2 or the context menu choose the finish sketch item to preserve the change. You also have to Save Edits to fully preserve the changes in the feature class.
... View more
08-07-2013
11:29 AM
|
0
|
0
|
1479
|
|
POST
|
Thanks for your reply. I would be amenable to trying to your solution, but unfortunately I'm a little lost. I didn't do a dissolve, and am not sure how to "change the dissolve fields at the original lines." So, missing the first step, I can't continue with the rest. I don't have the original lines, as they were created and merged as I worked. The were not created based on any polygons, and there's no other spatial file that they're related to. I did, however, use the "Explode Multipart Feature" to separate the resultant lines after my split, and then merged the appropriate parts again. I would say the issue is solved. (Also, I still don't understand why this is the normal behavior for a split, why splitting in one location would cause a seemingly random split in another location, and the line fragments would be considered one line.) Your solution is fine for a few lines. I deal with 100K line at a time, so geoprocessing like I mentioned is my only realistic approach. You need to understand the underlying geometry of a multi-part polyline if you going to work with them efficiently. Multi-part lines never require that the parts connect to each other. Gaps are alway allowed within multi-part polylines. Even if gaps do not appear to occur on a given polyline, splits may create them. To better understand this, in an edit session select one of your branching polylines and press the Edit Vertices button on the editor toolbar and then press the Sketch Properties button on the Editor toolbar. The X and Y (and optionally M and Z) coordinates of the line will be shown in the Sketch Properties window. Each coordinate set is under a header group called Part # beginning with Part 0. Multi-part lines have 2 or more of these Part group headings. Click on the first coordinate of Part 0 and then hold the Shift key down while left clicking on the last coordinate in that group. Right click the highlighted set and press Zoom To. This is the first part of the line. Do this for each Part Group. Now imagine a split in Part 3 of an line that goes up to Part 5. Every part and coordinate above that split vertice in Part 3 will be assigned to one feature and every Part and vertice below the split vertice will be assigned to another line. Parts 0-portion of 3 do not have to form a connected chain. The Parts portion of 3 to Part 5 do not have to connect either. If Part 3 was the essential connecting line between the parts, splitting of that part will break the line connectivity and form a gap, but it will not affect the ability of any set of line parts to form a single polyline. Prior to the split they only appeared connected as an entire group, but once broken the part arrangement becomes crucial to determining if the split up multi-line will have complete internal connections or form gaps. Splitting of a line does not trigger any automatic analysis of the part arrangement to come up with a pattern that would avoid gaps. Gaps are always allowed and the part arrangement is never altered by the Split tool, whether the result would create gaps or not. In a sense the mere fact that there is more than one part to a polyline means that internally there are already gaps or breaks in the line, even if the parts met end to end, which is why gaps are always allowed in a multi-part line.
... View more
08-07-2013
06:25 AM
|
0
|
0
|
1287
|
|
POST
|
Hi there, I've got a line feature that was created by merging multiple sections of line. I'm trying to split it back up in different places, and when I do, I get multiple splits and lines that are considered one line but are not connected. The image here shows the location I placed the point in a yellow circle. The highlighted line shows one of the resultant lines, while the pink is the other. [ATTACH=CONFIG]26522[/ATTACH] Is there something I'm missing? I've tried repairing the geometry just in case. I've also made sure nothing else is selected, turned off other layers, anything else I can think of. Thanks for any assistance! Sarah The behavior is normal. You have dissolved to create a branching multi-part polyline, which will randomly append the order of the internal parts. Part 1 does not have to chain to part 2, etc. When you split the break in the internal part order becomes apparent. You would have to control the part assembly, which is a pain to do unless you wrote a python script. Anyway, I would do the splits on the original lines or a copy of them and change the dissolve field values at the original lines. Then use the Buffer tool with a very small buffer and the List option and uncheck the create multi-part option. Then use Spatial join with the One To Many option to get the polygon Join ID as a new group ID for every set of lines. Select where the original line attributes equaled the lines and do a new dissolve on the new group ID and the old group ID with the create multi-part feature option checked. These will create contiguous new branching groups.
... View more
08-06-2013
04:35 PM
|
0
|
0
|
1287
|
|
POST
|
Hello, Thank you very much. Let me clarify the "problem" at hand. 1) Route feature layer: I need a basic airline network that shows existing routes (these do not necessarily need to be formatted for time.) Ex, ROUTE ID = 1 DEP = DAL ARR = PHX CYCLE = [end date] (meaning, an airplane flies this route until a certain date) 2) Next, I need to have a feature layer that contains the ideal schedule of the Route feature, including the actual times these routes are scheduled Ex, ROUTE ID = 1 DEP = DAL ARR = PHX CYCLE = 05132008 DEP_TM = 900 ARR_TM = 1030 FLY_TM = 120 (mins) FLT_NM = 7886 TAIL_NM = 1202N The way to connect the flights will be through a shared date, tail number and flight number in most cases: PHX - DAL = flight 7886 on tail 1202N on [date] - round trip DAL - PHX = flight 7886 on tail 1202N on [date] PHX - LAX = flight 808 on tail 1202N on [date] - new connection in LAX, but same tail number and date (meaning, it's the same airplane, which is what we're tracking) My research question isn't very specific at this point, but eventually I want to see whether it's the route ( PHX - DAL - PHX - LAX) or the individual airport that more influences delay in the network. 3) Another feature layer with what was actually flown, meaning the historic schedule data. The above was the "ideal" schedule--but, I have the historical flight data of what times the planes actually left and arrived so I can see the difference between them. The field list is extensive, but know that to build the network we have the Tail Number to follow the specific plane along it's route so long as it's on the same day and follows an appropriate time/space continuum. Your help is appreciated - I'm looking into the best way to start with the Linear Referencing and Network Analyst tools.... Since this thread is marked as answered for the original user and your objectives are diverging from the original post topic fairly substantially, you should probably start a new thread. Restate your problem there. Please include a screen shot of the lines you already have and the data contained on them. Are the lines overlapping and representing multiple flights currently, or is each line already a distinct route independent of actual time and planes? How is the actual flight data stored currently? In a table or as actual lines? In many ways the question and unknown comes down to the delay time at each airport more than flight time. This probably would heavily depend on the plane and the airport design. Disembarking and Boarding time and luggage or cargo unloading and loading time would vary depending on the plane capacity and available gates at the airport. Two planes cannot board at the same gate at the same time, so there is a maximum boarding number at any given time at a given airport, plus you have to account for delays between planes occupying the same gate over the course of the day. Spacing of take off and landing would also have to be known for the airports and the cycle time between each to estimate ideal or maximum capacity, which is influenced by the number of available runways and landing/take-off windows. Identifying peak operation times would be crucial, since rush hour puts pressure on airport facilities just as much as it does on roadway facilities, and those peak hour and peak day spots are the most precious to allocate, since passenger demand is highest at those times. I don't know what those factors are, but they influence the problem a great deal. The actual flight data would give you the best idea of the peak hour and day periods and whether an airport is operating efficiently well within its capacity, or approaching or reaching breakdown due to nearing or exceeding its ideal capacity.
... View more
08-06-2013
03:57 PM
|
0
|
0
|
869
|
|
POST
|
Good day all, I've got a question about the field calculator. I would like to combine several fields together in one, new field. (Street name, House number, Extension, Postal Code and Place). So my code looks like this (the fieldsname are in Dutch) [Straatnaam]&" "&[Huisnummer]&[Huisletter]&" "&[Postcode]&" "&[Woonplaats] After a couple of minutes, I get the result in my newly created field. However, not every streetname has a extension (Huisletter) and is left 'blank' in its original field, which results in an extra space in my newly created field. How do I modify my code to include the number, but exclude the 'blank' cells? Thanks in advance. Here is the easy way to do it. [Straatnaam] & " " & Trim([Huisnummer] & [Huisletter]) & " " & [Postcode] & " " & [Woonplaats]
... View more
08-06-2013
04:41 AM
|
0
|
0
|
2817
|
|
POST
|
Nobody knows how? I'm desperate... 😞 Put all of the outputs of the buffer into the Merge tool, then the Dissolve tool if you want the buffers to become one giant feature. Also, are you sure you want to use Select? Are you using Coverages or shapefiles/geodatabases? Probably you really want to first create an empty polygon feature class with the correct Spatial Reference and output fields you will want to Dissolve your buffers on. Then make a model that Iterates Feature Classes (shapefiles) in a directory (See also this link) outputting the feature class to the Make Feature Layer tool, then the Select Layer By Attributes tool, then the Buffer tool, then the Append tool to the empty feature class with the No Test option to fill it with all of the buffers. You should set the overwrite outputs environment option to permit overwriting so that the Buffer tool overwrites its output with each iteration. Don't worry, the Append will save the buffer results before the file is overwritten by the next iteration. Then in another model input the prior model's Appended polygon output feature class into the Dissolve tool using a nested model approach to create a single giant feature from all of the buffers (if that is what you want). A final alternative approach is to do no selection of the original shapefiles initially and just input all of them to the Merge tool to create a single feature class (assuming all of the inputs are based on the same geometry), then use the Merge output with the Make Feature Layer tool, then the Select Layer by Attribute tool, and finally the Buffer tool with the Dissolve Type All option set (if you do not want to preserve attributes) or List Option if separate shapes are to be preserved based on an attribute that should not combine. This approach avoids the need for the Dissolve tool.
... View more
08-05-2013
11:18 PM
|
0
|
0
|
2308
|
|
POST
|
Is it possible to use any of the advanced editing tools (planarize lines) in a model builder? I'm assuming it isn't... The Features to Line tool is advertised as the closest equivalent to the Planarize lines tool in the geoprocessing toolset, but it requires an Advanced license to use it.
... View more
08-05-2013
01:07 PM
|
0
|
0
|
903
|
|
POST
|
I went to the NYS GIS Clearinghouse and got the SWIS codes by jurisdiction. I spent an hour converting it to a spreadsheet for you that divides it by jurisdiction with the code fields the way I described. The sheet for the appropriate jurisdiction layer should be able to join on the correct jurisdiction name field and you should be able to copy the entire set of code values (full and broken down). I would convert each sheet to a dbf file or file geodatabase table for the join, but you can try joining directly to each sheet of the spreadsheet. I would include all of the fields (maintaining identical field names and types) in each jurisdictional layer with all of the values in the spreadsheet. Then when you do the selection deletion step I mentioned before select from the current selection for "00" is the appropriate column after doing the Slect by Location, for example Select by Location using the Villages layer with a small negative buffer and these select by attribute of the merged layer for all Village Code values of "00" or all Village Names <= " ". At this stage you had better give my post a point or I will leave you to figure out the rest on your own. I am effectively doing your work for you now. Give points by clicking the up arrow on the right hand side of the post above the 0.
... View more
08-02-2013
12:58 PM
|
0
|
0
|
1075
|
|
POST
|
It would really help if I could find a shapefile with all the muncipalities within NYS that has a SWIS code assigned to it as an attribute. I can't go through all city/town and assign it a SWIS code, there's simply too many. Well, somebody has done it on some map or spreadsheet somewhere, otherwise no one would have a clue what the code was. Contact the agency that originated the code. If they had an Excel spreadsheet with the municipality names and types they could provide to you, you could join that table to the municipality polygon layers on the municipality name and probably be done creating the SWIS codes in about 20 minutes to an hour on your feature class layers if the name spellings were spelled the same in both sources (at least for most of the municipalities). Anyway, GIS can't do magic and just "know" this information without a data source anymore that you or your boss can. When ESRI develops a "Miracles" license level maybe we will be able to do that kind of analysis.
... View more
08-02-2013
09:35 AM
|
0
|
0
|
1075
|
|
POST
|
Hi there, I'm pretty new to GIS in general, but am starting to look into Python scripts and downloadable toolboxes to see how they work. I've downloaded this python script and toolbox, but can't seem to get it to work properly, so am looking for some advice? http://arcscripts.esri.com/details.asp?dbid=14127 I'm not sure if it's something straightforward and obvious I'm missing, or if it's something a bit more specific to my files. I've added the toolbox to ArcToolbox, and then specify my input shapefile (points based) as feature layer, field to query as FID (though I've tried changing this to see if it makes a difference and it doesn't!) and then an output folder (leaving output filename blank). My error message is as follows: Executing (SplitLayerByAttributes_3): SplitLayerByAttributes All_VPs FID # C:\Users\lisa\Desktop\test Start Time: Fri Aug 02 11:54:34 2013 Running script SplitLayerByAttributes... Error in script SplitLayerByAttributes. Error in executing: cmd.exe /C W:\5USERA~1\Lisa\ArcGIS\Scripts\SPLITL~1\SPLITL~1.PY "All_VPs" "FID" "#" "C:\Users\lisa\Desktop\test" Failed to execute (SplitLayerByAttributes_3). End Time: Fri Aug 02 11:54:35 2013 (Elapsed Time: 1.00 seconds) Any advice much appreciated! I'm running GIS 9.2. Thanks, Lisa Based on the error it is most likely the path you supplied that used the wrong slash format in a string. The following techniques will all work in a Python script path: 1.) forward slashes = / 2.) double backslashes = \\ 3.) raw string with backslashes = r"H:\InfoRequest" Single backshashes do not work, since the backshash is an escape character that is not read as a string character when it is by itself in a string that is not interpreted raw. So "C:\Users\lisa\Desktop\test" is invalid in Python. These would be valid: "C:/Users/lisa/Desktop/test" "C:\\Users\\lisa\\Desktop\\test" r"C:\Users\lisa\Desktop\test"
... View more
08-02-2013
03:35 AM
|
0
|
0
|
868
|
|
POST
|
Please follow the revised instructions above. I have made a few corrections to the process and noted that when you reach the Merge step that you should check the fields before proceeding and let me know if the fields did not come out as I expected and described in the previous post.
... View more
08-01-2013
12:11 PM
|
0
|
0
|
1075
|
|
POST
|
SWIS codes were set up for tax purposes by New York State to easily identify cities/towns/villages by their own code. A SWIS Code's boundary is the boundary of the city/town/village it is assigned to. The code's boundary won't have multiple city/town/village just the one it is assigned too. It's a six digit code formated like this: XX XX XX (no spaces). Where the first double X would be the county, the second double X would be the city/town and the last double XX would be the village. If you don't have a village within the city/town technically we only use the first four digits then. So since I was doing Carmel located in Putnam county, the *OLD* code is 4001, where 40 is Putnam County's code and 01 is Carmel's code inside Putnam County. There is only one 4001 in New York and it's extent is the extent in which Carmel's town boundary ends. It's generally not important/never used but my boss and I feel it's the best way to solve the issue we have with the two errors I get when I plot all the jobs since we've been assigning every job its appropiate SWIS code since the company started back in the mid 70s. Also I'm 99.9% sure I had nothing selected when I did the spatial join tool multiple times Got it. So do these imported layers have the codes already? If not would you know what they should be? Is there a pattern to how they got assigned? If not I would start with the Counties and assign them their County Code in a separate County Code feild. Next just create the City_Town code field in both the Cities and the Towns layers and fill just that part in (do not create a County Code field). For the Villages Layer just assign the Villages part of the Code (do not create a County or City_Town code field). Use the Integrate tool on each layer against the others to match fuzzy boundaries better to avoid slivers. Spatial Join the Counties to the Cities, Towns layers (County is the Join layer). Spatial Join the Cities and Towns layers that were Spatially Joined to the Counties to the Villages layer (Cities and Towns are the Join Layers). Merge the Counties, with the Spatial Joined Cities, Towns and Villages into one layer with the Merge Tool. Make sure that there is only one field each with the County code, City_Town code and Village code. If there are two or more fields with these values let me know. Now Intersect that merged layer with the Integrated Counties layer again. This will cause the layers to cut against each other. Now Select all Village code values that are null with Select by Attribute. Then select from the current selection using Select by Location against the Integrated Villages layer with a small negative buffer. Delete these polygons. Now Select all City_Town code values that are null with Select by Attribute. Then select from the current selection using Select by Location against the Integrated Cities layer with a small negative buffer. Delete these polygons. Now Select all City_Town code values that are null with Select by Attribute. Then select from the current selection using Select by Location against the Integrated Towns layer with a small negative buffer. Delete these polygons. That should be your best way to create your SWIS layer as far as I know given your available license tools. If you had the ArcInfo/Advanced license you would use Erase and Union instead of most of these last steps.
... View more
08-01-2013
11:30 AM
|
0
|
0
|
2238
|
| 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
|