|
POST
|
thank you Richard. it doesn't work out for me because of non-monotonic routes... (it looks like a river) and the gaps are sometimes huge... i am wondering if it is possible to do it automatically in my case... Nope, there is nothing automatic with non-monotonic routes, since their gaps cannot be traced like a monotonic route. If they are non-monotonic they will double back to the same measure over and over or reach an end of connected lines and then randomly jump to another end. I know of no way to distinguish a gap from a double back. There is no such thing as a measurement of the gaps in such a configuration from my perspective. You would have to create a set of monotonic route pair segments that include a gap you want included in the measure values and eliminate the pairings you do not want to count as gaps, and there is no real rule set for doing that automatically. In any event, what you want would most likely make no sense if it were applied to non-monotonic roads and the rules you would follow to straighten it out would almost certainly violate the rules I would follow for roads. What is the total distance that traces the strands of spaghetti on a plate including gaps? You can measure the actual spaghetti for length, but what ends of the spaghetti strands constitute a gap you want to measure? That is the sort of problem non-monotonic routes can pose, and at some point you have to accept that there is no solution unless you are willing to impose an artificial order. While rivers are more ordered than spaghetti, the problem has more in common with that end of the spectrum than it does with a monotonic road with a break that will be filled by future construction.
... View more
07-26-2013
02:27 PM
|
0
|
0
|
806
|
|
POST
|
Ok here is another question. Lets say some of the HOUSE ID fields are empty, how would you modify the expression to say that if the HOUSE is empty/NULL use ACCESS NUMBER to label? Function FindLabel ( [HOUSE], [NUMBER] ) If IsNull( [HOUSE] ) then Findlabel = [NUMBER] Elseif IsNumeric( [HOUSE] ) then Findlabel = [HOUSE] & [NUMBER] Else FindLabel = [NUMBER] & [HOUSE] End if End Function
... View more
07-26-2013
10:06 AM
|
0
|
0
|
1677
|
|
POST
|
First off, I'll admit I do not know much about VB. A while back I found that there is a bug with exporting maps that have "advanced" python expressions to PDF programmatically (i.e. doing this through arcpy.mapping). This is not a problem when using VB label expressions. I have been trying (and failing) to convert the following Python label expression to VB. This works inside ArcMap but the labels disappear when exported to PDF due to the bug. def FindLabel ( [DEEDHOLDER] , [PID], [ACRES], [SUM_CSR_Potential], [AVE_CSR] ): name = " ".join(str( [DEEDHOLDER] ).split(" ")[:5]) # grab only first few words on top line name2 = " ".join(str( [DEEDHOLDER] ).split(" ")[5:]) # grab the rest if there are more to wrap to next line if len(name2) > 1: name = "\n".join([name,name2]) # join name and name2 vars by a new line pid = [PID] ac = [ACRES] + " Ac" sump = "CSR: "+ str(round(float([SUM_CSR_Potential]),1)) ave = "Ave: "+ [AVE_CSR] return "\n".join([name,pid,ac,sump,ave]) This isn't too complicated in Python, but I am unable to successfully convert it to VB. I would post my attempts at a VB solution, but I would rather save myself the embarrassment. If anyone can help, I would appreciate it! Meanwhile, I will keep trying. Here is my attempt: Function FindLabel ( [DEEDHOLDER] , [PID], [ACRES], [SUM_CSR_Potential], [AVE_CSR] ) Dim MyArray, i, name, pid, ac, sump, ave MyArray = Split([DEEDHOLDER], " ") For i = 0 to UBound(MyArray) if i = 0 Then name = MyArray(i) ' First word of name. ElseIf i / 5 <> Round(i / 5, 0) Then name = name & " " & MyArray(i) ' Add space and word if less than 5 words in line Else name = name & vbCrLf & MyArray(i) ' Begin a new line after every 5th word. End If Next pid = [PID] ac = [ACRES] & " Ac" sump = "CSR: " & str(round(cDbl([SUM_CSR_Potential]),1)) ave = "Ave: " & [AVE_CSR] FindLabel = name & vbCrLf & pid & vbCrLf & ac & vbCrLf & sump & vbCrLf & ave End Function
... View more
07-26-2013
09:54 AM
|
0
|
0
|
2258
|
|
POST
|
I know this is asking for a python method, but just in case it helps someone, the VB Script method to strip out all double spaces and any leading or trailing spaces is: Output = [MyField] ' Replace MyField with the actual text field name
If Not IsNull(Output) then
Output = Trim(Output)
If Output > "" Then
Do While InStr(1, Output, " ")
Output = Replace(Output, " ", " ")
Loop
Else
Output = " " ' Avoid Field Is Not Nullable Error
End If
Else
Output = " " ' Field allowed Nulls, use of this option replaces them with white space.
End If
... View more
07-26-2013
07:35 AM
|
0
|
0
|
1615
|
|
IDEA
|
Editing one vertex at a time is exactly what I want to avoid doing through the Sketch properties dialog, so that is not an option. The Production Mapping Z management could be improved, but needs to deal with subselections of lines and boundaries independent of a surface and to create custom sloped vertice arrangements to meet my needs. Improving that interface would be fine, but only if it aims at the abilities I am proposing. I consider what I see in the help currently to be too limited, even if Interpolation was added.
... View more
07-26-2013
06:50 AM
|
0
|
0
|
3074
|
|
POST
|
I was given 20 points from my supervisor that were taken in Illinois State Plane East. I put those points into an excel spreadsheet and brought them in to Arc and assigned them the coordinate system that they were taken in. My supervisor has asked me to convert them to decimal degrees through ArcMap and suggested adding fields and using the calculate geometry function to generate the decimal degrees for each point. I have tried doing this but every time I get results to the fields it just ends up being the Easting/Northing values and not decimal degrees. Any suggestions would be very helpful! Thank you You can change the projection of the Map Data Frame to a Geographic Coordinate System that uses Decimal Degrees, like WGS 84, by right clicking on the map and accessing the data frame's properties. Choose the coordinate system tab and set an appropriate transformation from your Illinois State Plane East projection and accept the changes. Then in the table view of the points, right click the field you want to calculate the logitude or latitude into and choose the Geometry Calculator. In the dialog choose the appropriate X or Y coordinate for the long or lat and then select the option to use the Data Frame's projection instead of the feature class coordinates. Decimal Degrees is the default for the WGS 84 spatial reference. Press OK and the Decimal Degree coordinate should be calculated into the field. If you export the point data from the table view to a new table (.dbf or geodatabase table, I prefer geodatabases), you can use the Make XY Event Layer tool to create a point layer that uses the lat and long coordinates and the WGS 84 projection. If you then export that layer from the TOC of the map it will permanently store a feature class of points that uses the WGS 84 coordinate system if that is the end result you are looking for. Reset the data frame's projection back to State Plane if you intend to edit or create new points in the original points feature class, since it is not a good idea to edit features when there are different projections on the feature class and the data frame.
... View more
07-26-2013
06:46 AM
|
1
|
0
|
3901
|
|
POST
|
I want to calculate river miles. There are point locations that I need to calculate their mile posting as well. I have a Line Feature of a river centerline along with point locations. The easy way to achieve this is the measure tool but after reading about linear referencing tools to near tool I tried it all but with no progress. I tried calibrate route tool and used that and Locate features along route tool but that table was empty. If you are going ot respond answer in layman's terms and don't be too technical. Just lay it out in steps. What dis you use for the tolerance for the Locate Features Along Route tool? If the points do not touch the lines, they need to be within the tolerance distance to connect to the route. Use the measure tool to get a rough distance for tolerance setting. Do the Routes and points have the same spatial reference projection (check the properties of the layers and look at the Source tab for the spatial data)? A picture of your routes and points would really help us figure our why you are not getting any outputs. Also, I assume the river centerlines or a derivative Route network generated by the Create Routes tool have M values to be a used by the Locate Features Along Routes tool. How did you get Calibration points and how did you assign measures to your river centerlines or routes?
... View more
07-25-2013
03:03 PM
|
0
|
0
|
4024
|
|
POST
|
Thanks for the reminder. As far as dissolving the original lines goes, my problem/task is to maintain the individual segments of even the same roads as I am using traffic loads on the network to calculate emission loads for each segment. And the traffic and thus the emissions vary on different segments of even the same road (the data comes from a travel demand model). And my "work around" entails doing something completely different than my original plan as I came to the conclusion that I would not be able to solve the buffer/overlapping polygons problem. It has turned into a fairly lengthy process and I am not sure it would be much use to anyone unless they try to do more or less exactly what I am doing. I am happy to post it, though - just in case. By way of explanation: I am working with two network features. One is the centre line of the real world road network, the second is the simplified (and not always spatially coincident) network from a travel demand model, which contains the traffic loads for the road segments. I am interested in the emissions that are created within a certain distance of inhabited land parcels (i.e. ultimately the emission loads affecting people living in those parcels) selected links from real network that are within 300m of inhabited parcels: CandidateNetwork1 selected all of these that are "intersecting" with model network with a search distance of 300m (this is to try and bring the data from the model network together with the real network in some way): CandidateNetwork2 deleted all links from CandidateNetwork2, that do not have an equivalent in the model network from which traffic/emissions data could be transferred created 300m buffers around CandidateNetwork2 clipped the layer of inhabited parcels by CandidateNetwork2 (getting all inhabited parcels or parts thereof that are within the buffer distance of the real network) buffered the parcels by 300m intersected the clipped parcel layer as well as the buffer layer with the model network (thereby getting as close as I saw possible to correctly assigning traffic/emission loads from the model network to parcels that in reality are within the chosen distance of the real network) - on this last step, I ran into big problems with the buffer polygon/network intersect step, though - described in another post in this forum That's it for the work around (once I have worked out the intersect problem). Maybe it is of use to someone. Dissolving the original lines is just a derivative dataset from your original lines, not a replacement. In any case, slivers will always be an issue, with such a segmented approach, but given your objectives there may be no way of avoiding them completely. I would not have guessed that your original question involved anything like the process you have come up with, so it is always best to set out where you aim to go and constraints like you did in your last post.
... View more
07-25-2013
01:58 PM
|
0
|
0
|
15864
|
|
POST
|
I am trying to generate routes I need help to generate routes but I dont have the M values. Can please show me how to do this Use the Create Routes tool. It can generate the measures for you from a set of lines that have no measures.
... View more
07-25-2013
01:51 PM
|
0
|
0
|
647
|
|
POST
|
My merged polylines are dashed... I tried "create routes" tool (unchecked ignore spatial gaps), but it gives me the length of lines. and I need to know length of lines with gaps. unfortunately ET geowizards is not free... any idea? Assuming the measures of the routes are based on route length and monotonic just extract the From and To measure and take the difference of the To measure minus the From measure to get length with gaps. Python: !SHAPE.FIRSTPOINT.M! and !SHAPE.LASTPOINT.M! get the From and To measures respectively You could directly calculate a Route_Length field that includes gaps with the calculation: !SHAPE.LASTPOINT.M! - !SHAPE.FIRSTPOINT.M! Non-monotonic routes (routes that do not have increasing measures at each successive vertex) have to be fixed before you can get an accurate value.
... View more
07-25-2013
01:45 PM
|
0
|
0
|
806
|
|
POST
|
Actually I think this could be done with Network Analyst, possibly on your original network. You would have to define all of the flight lines as one-way roads. The only issue is that I don't know how Network Analyst would deal with the time restriction affecting departure opportunities, but it better designed to handle actual traces along connected network lines. You could create a set of points as events at 5 minutes into each flight to function as barriers for different runs. Alternatively manipulating a field on the flights could act as a barrier for a given set of traces. It is on the boundary of what Network Analyst is optimized to do, but probably possible. Look into that extension to see if it seems to fit the problem you are ultimately to solve.
... View more
07-25-2013
01:41 PM
|
0
|
0
|
4369
|
|
POST
|
Hi there, Thanks so much for the in-depth response, it's really appreciated! Essentially (in broader strokes): - Create a working network of flights starting with the Linear Referencing Route tool using the Route_ID (which is really a line between Departure & Arrival) - Use the Start Time (min) and the End Time (max) for each segment as the From-Measure and the To-Measure and set in units of Time - Use the Create Route tool and designate Time as the field that will govern the sequence of the routes - Modify the Environmental Settings of the Create Route tool so that "M" values are Fractional (instead of Integer) - Once the Route is created, then each flight will have a corresponding Route_ID and Departure time and Arrival time associated to it as a measurement Correct so far. NEXT (the 2nd feature layer) is an EVENT table derived from the Linear Referencing Route tool? Not necessarily. - I'm confused here about how to pull the arriving flight at any given time and match it to the correct departing flight? (Or. has this already been achieved by sequencing the segments based on Time during the Create Route step?) The sequence should help, but since departure and arrival are in separate fields it is difficult to automate. At the very least you can create a DEPARTURE and ARRIVAL field for each route and calculate them with the Python expressions: !SHAPE.FIRSTPOINT.M! and !SHAPE.LASTPOINT.M! I would have to look at the table output you have to consider the options for creating chained routes (not a Road Network issue) Basically you need to deal with the Many to Many relationship based on all arrivals at a location with all departures at the location that are greater than the arrival time. Such relationships are hard to automate, since choices have to be made. For example, all of the matches are potential flight choices for any given person unless they have another destination objective that makes the choice for them. I don't deal with flight scheduling, so I am not really sure of the rules that govern your model and that would be critical to know to automate any choices. I also need to know if you are trying to solve a problem for a single person making each connection, such as a pilot, or are you trying to trace all possible flight connections that could be made based on arrival and departure matches. The single pilot arriving at the airport can only choose one departing flight and only one that is later than his arrival time. Once the choice is made all other flight possibilities are eliminated. That is a very different problem from trying to trace the entire set of passenger and crew connecting flight opportunities associated with an airport. The later problem could be handled something like a road intersection with each arriving flight being a one way road in and all departing flights leaving being departing roads out. As Long as I can extract all of the To Points and associate them with all of the overlapping From points at an airport tha share the same the location (like roads leading to and from an intersection) and the names that can be given and ordered. An example might be the intersection: Airport 1 Arrival 0700 Flight 102 & Airport 1 Departure 0800 Flight 33 & Airport 1 Departure 0900 Flight 404 & Airport 1 Departure 950 Flight 501 & Airport 1 Departure 1400 Flight 689 This intersection is like a roundabout connecting a 1 way road network. The above list would indicate the complete opportunities you may have during a given day for a specific arriving flight with the only the first listed "Road" being required to enter the roundabout (one-way road in), but all other intersecting "Roads" can be used to exit the roundabout intersection (one way roads out). The time helps define the total set of connections and their order in the list. The "Road Names" could be shortened, but one connecting flight ID representing two lines that can be combined could be: Airport 1 Arrival 0700 Flight 102 & Airport 1 Departure 0800 Flight 33 Each half of that pair can be joined to the original lines on one half of that description with a arrival description or departure description I know of ways to create such intersection points from the end points of lines. The Make Query Table tool could also be used to solve the problem by extracting the end points of the lines. You suggest: "this should probably be a modeled derivative of the more detailed data and you should perform maintenance on the finest level of detail that makes sense." That is just a principle of data in general. Always keep the least aggregated source data you can and create data that connects to it - Can you give me an example of what I need to derive as the "Total Day" field if I were to connect the Flight IDs together using the Create Route tool? (Ex, Total Day = ??? units? what value? ) - FINALLY, once the Network is built and is functional, then I can move into the Routing problem and optimization territory... But, I'm still a little unclear on the specifics I've listed above that are necessary to make the network functional. Unfortunately I also am unclear on where you are heading with your problem, but as you can see I can conceive of several possible approaches that could be used to solve different connecting flight choices. Thank you SO much for your help, thus far. I appreciate any other insight you can impart. Sincerely, Holly G. Your welcome. Interesting problem and different from traffic analysis due to the constraint of access in and out of an intersection based on time.
... View more
07-25-2013
01:24 PM
|
0
|
0
|
4369
|
|
POST
|
Richard, thank you for this detailed response. I have tried to run through your methodology but have ended up with slivers for example where the roads form bends. Also, when I dissolve the result of the first intersection operation, for some reason, not all the polygons in the junction areas are dissolved together. Again, this may be a function of the geometry, i.e. where junctions are not completely perpendicular, the polygons might not actually touch and thus not be 'recognised' as belonging together. I think with a different dataset, your suggestions could work, though, so I will definetely keep them in mind for future reference. For my current project I have decided to approach the problem somewhat differently, as my dataset is too large to correct all 'errors' by hand. Thanks again. I would say that looking at your original lines that you needed to first dissolve the roads into continuous lines, then perform the buffer. That would smooth out the bends without slivers. I also noticed the parallel lines for freeways and offramps. I would handle them in a separate process. If you come up with something better for your data, share it. You are not the only person to face this kind of need with a road network.
... View more
07-25-2013
12:24 PM
|
0
|
0
|
15864
|
|
POST
|
Wow, this looks like it is working. I haven't tackled the sort part yet. With the simple PivotTable_management I am getting more rows than I require. Every D with one year is being put in the table, then the last D with have the two years that is suppose to go with it. Can I somehow eliminate the duplicates that only have the single data? Thanks Not sure I understand your last sentence. Sounds like you should do a Summary Statistics instead of Sort in the steps I mentioned. You could then select based on a count value if that applies. Do the pivot on that summary. If that does not help, please explain further what you mean.
... View more
07-25-2013
09:13 AM
|
0
|
0
|
1462
|
|
POST
|
Thanks for your reply. I am having trouble getting this to work. The Make Feature Layer tool doesn't seem apply it's query/expression to the input layer (it creates a separate (temporary) layer). I think your solution would work if I needed to create a new layer or temporary layer to be processed further. This is not what I am trying to do. Basically I am trying to simplify the application of a definition query. For example: Instead of having the users [right click > properties > definition query > create SQL query] they would [double click tool > specify the expression value]. Once applied the definition query will only show the features that meet the expression criteria (this is incredibly useful when editing in an area with many features). Perhaps this cannot be done in ModelBuilder. Thanks anyways. Python could do it more easily than Model Builder, except Model Builder has some SQL validation support for the end users that Python doesn't have without custom programming. Nonetheless, getting a particular layer in a map and settings its definition query based on user input would be a pretty straight forward script. A Python Add-In button would probably let the users launch it. Check the Python forum for examples of setting layer definition queries.
... View more
07-25-2013
08:04 AM
|
0
|
0
|
2209
|
| 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 |
4 weeks ago
|