POST
|
Hi, I'm running a NA-based arcpy tool, and can't figure out how to tell the code when a user manually cancels the operation in the GUI? If that happens, we want the code to do some clean-up work, but we can't figure out how to let the code know that a user has pressed "cancel". Any thoughts? Thanks, Andres
... View more
11-23-2011
03:59 PM
|
0
|
2
|
2981
|
POST
|
Thank you Deelesh, it works nicely! In case others wonder, the only thing to change in the validator code are the input order numbers of the Network Dataset and Impedance Attribute (if you have them in a different order in your tool). For example: self.paramsIndex = {'networkDataset':1, 'impedance': 9} Andres
... View more
08-31-2011
06:10 AM
|
0
|
0
|
408
|
POST
|
Hi, I am trying to make a GUI for a tool that takes the network "Impedance Value" as a value that is 'obtained' from the inputted Network Dataset. That is, I would like to have the "Impedance Value" field in the GUI check what cost attributes the given input network has available, and restrict the options from a drop-down to only those cost attributes. This exact actions is available, for instance, in the "Make OD Cost Matrix Layer" tool,"Make Route Layer" tool and other NA tools. I am unable, however, to figure out what the input parameter field 'data type' needs to be for that to happen. There is no 'Network Attribute' data type offered in the tool properties dialog box. Unfortunately cannot see what 'data type' other NA tools use for the "Impedance Value" field. Help! Thanks, Andres
... View more
08-30-2011
05:39 AM
|
0
|
2
|
2440
|
POST
|
Having the same issue: FindIdentical detects a number, but DeleteIdentical doesn't catch most of them. Unfortunately FindIdentical doesn't seem to have any use in actually selecting duplicates... Is there any resolution to this yet? Need a tool to select duplicates. Thanks, Andres
... View more
08-01-2011
07:08 AM
|
0
|
0
|
2224
|
POST
|
Has there been an answer to this? Anyone found a way to have arcpy scripts still do cleanup after a user interrupts by pressing "cancel" on the GUI? Thanks, Andres
... View more
07-30-2011
08:17 PM
|
0
|
0
|
396
|
POST
|
Hi all, Using Calculate Locations, how could i avoid generating identical location values for points that all reach the same point on the network as closest? This commonly happens for point instances that are located around a tail-end of a cul-de-sac network segment. I need them to be located at non-identical places on the network due to the way i use them as inputs in another algorithm that computes an adjacency matrix between all instances on the network. In that algorithm i use barrier costs at all points in an OD Cost Matrix to limit the search to only closest neighbors. However, if several points fall in the exact same location, then the OD Cost Matrix won't find them due to the overly high barrier cost. If I could have the Calculate Locations tool generate slightly different locations for all points, we could avoid this issues. Thanks, Andres MIT Urban Studies & Planning
... View more
07-30-2011
12:21 PM
|
0
|
2
|
1440
|
POST
|
For others who might be interested, we built a toolbox that performs centrality analysis on spatial networks. It builds an adjacency matrix for instances (i.e. buildings) on a network, and can compute Reach, Gravity Index, Betweenness, Closeness, and Straightness on spatial networks. Download from: http://cityform.mit.edu/projects/urban-network-analysis.html Andres Sevtsuk Lecturer in Architecture/Urban Studies & Planning Massachusetts Institute of Technlogy
... View more
07-21-2011
07:36 PM
|
0
|
0
|
1502
|
POST
|
you mention "with less programming"... would there be of a more efficient way involving more programming? using arc objects?
... View more
03-28-2011
02:34 PM
|
0
|
0
|
576
|
POST
|
Hi Jay, thanks, but that won't do the trick. That would only get the one closest facility listed, what I need is all closest facilities in every direction on the network. If a facility is in a middle of a street, then there might be two closest facilities, one on either side. If a facility is near an intersections, then there might be 4, one on each branching route and so on. One very slow way of getting to this could be to a) solve for the nearest facility, register that facility in a table b) use that facility as a point barrier, and solve again for the next closest facility, register that in a table c) keep on going until no more solutions found. Problem is that I have some 30,000+ facilities, this would take a long time... I'm looking for sth more efficient... Thanks, Andres Why not use OD Cost Matrix? If you load your locations as origins and destinations and then solve for two closest. Ignore the first as that is itself and the second closest will be be closest among all others. Jay Sandhu
... View more
03-28-2011
08:51 AM
|
0
|
0
|
576
|
POST
|
One more clarification - it is like creating an OD matrix between facilities, but limiting the matrix to only the first ring of neighboring facilities... Andres
... View more
03-27-2011
05:25 PM
|
0
|
0
|
576
|
POST
|
Hi all, I need to to generate an adjacency matrix for a set of facilities on a network. Then output should be a table where you have the facility ID in the first column, its immediate neighboring facilities in the second column, and the distance between them in the third. For example: 1, 2, 24.06 1, 3, 96.33 2, 1, 24.06 3, 1, 148.79 etc. There is a forum thread on a similar issue from 2008 that resolved the adjacency matrix for the nodes of the network (VB code below). I basically need to do the same thing, except for facilities on the network, not nodes. Is there some ArcObject, similar to 'network forward star', that would get to adjacencies between network facilities? I would ideally like to do this in Python, but VB ok if not feasible. All help appreciated, thanks, Andres Public Sub List_Adjacent_Junctions() On Error GoTo eh Dim pMxDoc As IMxDocument Set pMxDoc = ThisDocument Dim pNLayer As INetworkLayer Set pNLayer = pMxDoc.FocusMap.Layer(0) Dim pND As INetworkDataset Set pND = pNLayer.NetworkDataset Dim pNQ As INetworkQuery Set pNQ = pND Dim pEnumNE As IEnumNetworkElement Set pEnumNE = pNQ.Elements(esriNETJunction) Dim pNEdge As INetworkEdge Set pNEdge = pNQ.CreateNetworkElement(esriNETEdge) Dim pNEFromJunc As INetworkJunction Set pNEFromJunc = pNQ.CreateNetworkElement(esriNETJunction) Dim pNEToJunc As INetworkJunction Set pNEToJunc = pNQ.CreateNetworkElement(esriNETJunction) Dim pNE As INetworkElement Set pNE = pEnumNE.Next Dim pNEJunc As INetworkJunction Set pNEJunc = pNE 'here start the code to store the output on a text file Dim strOutputFile As String strOutputFile = "C:\my.txt" Open strOutputFile For Output As #1 Dim i As Integer Do Until pNE Is Nothing For i = 0 To pNEJunc.EdgeCount - 1 'For each connected edge... pNEJunc.QueryEdge i, True, pNEdge 'Get that connected edge pNEdge.QueryJunctions pNEFromJunc, pNEToJunc 'Get To junction of current edge Print #1, pNEFromJunc.EID & ", "; pNEToJunc.EID & ","; pNEdge.AttributeValueByName("Length") 'List the adjacency and the edge's length Next Set pNE = pEnumNE.Next Loop Exit Sub Close #1 eh: MsgBox "Error: " & Err.Description End Sub
... View more
03-27-2011
05:18 PM
|
0
|
6
|
2565
|
POST
|
Can somebody please recommend a download for a toolbox that can do Centrality analysis on spatial networks in GIS network analyst? Specifically interested in Betweenness centrality and Closeness Centrality, thought other methods would be of help too. Thanks, Andres
... View more
10-29-2010
01:32 PM
|
0
|
7
|
6450
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|