POST
|
Also, do you know how to read A XML file, i am having difficulty in doing that. I am using following for this: Dim xmlStream As esriSystem.IXMLStream
Dim xmlReader As esriSystem.IXMLReader
Set xmlStream = New esriSystem.xmlStream
xmlStream.LoadFromFile "D:\Directions.xml"
Set xmlReader = New esriSystem.xmlReader
xmlReader.ReadFrom xmlStream I don't know what to do after this. However, I tried several methods of IXMLReader but couldn't get anything working. Thanks, Nagendra
... View more
05-21-2012
11:57 AM
|
0
|
0
|
250
|
POST
|
Hi Jay, My goal is to count number of left and right turns in a route and turns should be made at an intersections. If nothing works out, I was thinking to read the XML file to get count of "left" and "right" words. Btw, how does ArcGIS decide left and right turns? Thanks, Nagendra
... View more
05-21-2012
09:28 AM
|
0
|
0
|
250
|
POST
|
Hi Jay, Then is there any way to get these turns through street direction? I can export the directions as a XML output but how can I get left and right turns from that? If i try to calculate angles between edges than it will increase the computing time. So, I am thinking if there is something in the results that can be used for this. Thanks, Nagendra
... View more
05-21-2012
08:24 AM
|
0
|
0
|
1079
|
POST
|
Hi Jay, Thank you for the reply. I used the same VBA code for turns but output had nothing. Btw, if street directions are available doesn't it mean that turns are there too? if not then do we have to import turns separately? Thanks, Nagendra
... View more
05-21-2012
08:03 AM
|
0
|
0
|
1079
|
POST
|
Hi, I am also trying to find no. of turns (left and right) along a route. But I have ArcGIS 9.3, and I guess, this add-in is for ArcGIS 10 as it doesn't recognize 9.3. So, it would be helpful for me if any one can please post the VBA code associated with the add-in? Also, I know that turns can be accessed via traversal but when I use that with my network data set it gives me a blank shapefile, however, junctions and edges outputs are perfectly fine. That left me wondering if it has anything to do with the way I set up my turns while creating the network dataset. That time, I checked "Yes" to the question "Do you want to model turns in this network?" with "Global turns" checked as the turn sources. Also, at the end, I established driving directions by just providing "Street Name Fields". Alternatively, I tried using INAStreetDirectionsAgent, but it gives me the directions in XML output. I couldn't find any other useful output from that. Even, with the XML output I don't know how to use it to get the number of turns. Any help is appreciated. Thanks, Nagendra
... View more
05-19-2012
03:16 PM
|
0
|
0
|
1079
|
POST
|
Hi, I have a loop that adds two layers in every step, and both layers are from different folders. That means that the loop involves going through two different folders simultaneously. I know how to loop through one folder but don't know how to do it for multiple folders. Following is what I want to do:
inputfile1 = Dir(folder1 + "*.shp")
inputfile2 = Dir(folder2+"*.shp")
do while inputfile1 <> ""
' Add inputfile1 and inputfile2 to map
' go to next files in respective folders
inputfile1=Dir
inputfile2=Dir
Loop
Thanks, Nagendra
... View more
11-08-2011
08:44 PM
|
0
|
1
|
1822
|
POST
|
Thanks, Sandhu. Are line barriers possible in ArcGIS 9.3? or it's new in ArcGIS 10? Thanks, Nagendra
... View more
11-04-2011
11:28 AM
|
0
|
0
|
481
|
POST
|
Hi, I want to create a network dataset from a shapefile. It could be done if VBA code is written in ArcCatalog. But I am wondering if there is a way to do it from VBA code in ArcMap. Is it possible to control ArcCatalog operations from ArcMap? I have a loop where every step has to create a network dataset. Thanks, Nagendra
... View more
11-02-2011
08:31 AM
|
0
|
0
|
380
|
POST
|
Hi, For every iteration, I update my cost field and subsequently build the network dataset to reflect those changes. Following is the code I am using for building the network dataset.
Private Sub buildNetworkDataset()
Dim pWorkspaceFactoryM As IWorkspaceFactory
Dim pFeatureWorkspaceM As IFeatureWorkspace
Set pWorkspaceFactoryM = New ShapefileWorkspaceFactory
Set pFeatureWorkspaceM = pWorkspaceFactoryM.OpenFromFile("C:\data\", 0)
Dim pWSExtMgr As IWorkspaceExtensionManager
Dim pUID As New UID
Dim pWSExt As IWorkspaceExtension
Dim pDSCont As IDatasetContainer2
Dim pND As INetworkDataset
Dim pGeoDS As IGeoDataset
Dim pNB As INetworkBuild
Dim pReturnedExtent As IEnvelope
Set pWSExtMgr = pFeatureWorkspaceM
pUID.Value = "{4C1B151C-48C3-46C5-AB57-E6B941A1D00A}"
Set pWSExt = pWSExtMgr.FindExtension(pUID)
Set pDSCont = pWSExt
Set pND = pDSCont.DatasetByName(esriDTNetworkDataset, "Network_ND")
Set pGeoDS = pND
Set pNB = pND
Set pReturnedExtent = pNB.BuildNetwork(pGeoDS.Extent.Envelope)
End Sub
But it encounters a run-time error '-2147220937 (80040237)': Automation Error at the very last line:
Set pReturnedExtent = pNB.BuildNetwork(pGeoDS.Extent.Envelope)
Now, I can't figure out what is wrong with the code. Can anybody help me on this? Thanks, Nagendra
... View more
11-02-2011
07:15 AM
|
0
|
0
|
463
|
POST
|
Hi, I have created a network data set (ND) specifying the impedance. But I want to change the impedance value of few features every time I run the route solver. But it looks like once you have created the ND, no matter what are the new impedance values in the attribute table, route will be solved based on the original impedance values present while creating the ND. Is there a work around to use impedance values dynamically? Thanks, Nagendra
... View more
10-24-2011
11:51 AM
|
0
|
6
|
2598
|
POST
|
Hi, As ESRI provides a DVD of USA street map (comes in ESRI Data & Maps Media Kit), I was wondering about the road attributes available with the map. Does it have only name and length of the street or there are other attributes too? I apologize if my post is in a wrong section. Thanks
... View more
12-16-2010
10:23 AM
|
0
|
1
|
3178
|
POST
|
Thanks a lot. So it sounds like you can solve the route but need to analyze the results more. One way can be to spatially select all the roads that overlap your route and then summarize them and the other can be to add the "traversal" results being stored in memory as a feature class to ArcMap and summarize them. The traversal results has every edge of the route with its network attributes. You can use the following link to see how to access the traversal result: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//000100000245000000 Jay Sandhu
... View more
09-30-2010
02:16 PM
|
0
|
0
|
200
|
POST
|
Hello, I am new to network analyst, so having some trouble working with it. I have some GPS points and want to construct the corresponding route. So, I started with exporting my GPS points to ArcMap and then used 'new route', and 'add locations' sequentially to snap my GPS points to the network. Till this point, everything seems alright but after this I don't know how to proceed. I also solved my route and got the route consisting all GPS points. This route gives me total length and doesn't get any attributes from the network. In my network I have few attributes, such as no. of lanes, functional class etc. and for my new route I want to find some coverage statistics such as, % of 2 lanes, 3 lanes.., % of functional class = 1, 2, 3 etc. Is there a way to get attributes from the network so that I can calculate some of these statistics for my route? Thanks
... View more
09-27-2010
03:08 PM
|
0
|
4
|
2115
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|