Relocate stop points after loading

546
6
09-21-2011 11:21 PM
SébastienBousquet
New Contributor
Hello,

I have created a custom solver and when I load stop points from an other solver (or from a shape), these points are not located (isLocated is false), I need to execute "Relocate Locations" in ArcMap to make them located.

I would like to know if there is a method to locate the points once they are loaded.
Thank you very much for your help,
Regards

Sébastien
Tags (2)
0 Kudos
6 Replies
SébastienBousquet
New Contributor
Anyone know if this method exist in ArcObject ?

Thanks

Sébastien
0 Kudos
PatrickStevens
Esri Contributor
Hello, Sébastien. 

When in ArcMap, do you see your custom solver in the drop-down for creating new layers (click on "Network Analyst" on the network analyst toolbar)?   If so, when you make a new layer, do you see it appear in the NA Window (Click the network analyst window button on the toolbar to make that appear)?

If both of those are the case, you should be able to right click on your input class in the NA window and choose Load Locations.  Then, be sure to load your location by geometry (select Use Geometry in the Location Position box).  If you instead chose Use Network Location Fields, then you will get the network locations for the network dataset associated with the solver you loaded from.

Also, if you already loaded by location field, you can right click on your input class in the NA Window and choose Recalculate Locations.  That will recalculate your NALocation fields using the geometry of the network dataset associated with your custom solver layer.

Did this help?

Out of curiosity, what does your custom solver do?

Thanks
0 Kudos
PatrickStevens
Esri Contributor
One more thing...

If you are looking for a programmatic way to load data, please see How to load data into a network analysis problem.  It has code in .NET, but the concepts are the same if you are using Java or C++.
0 Kudos
SébastienBousquet
New Contributor
Thank you so much for your help, i have been pretty busy these last days but I will have a look today at the article that you gave me. I will inform you soon about my progress.

Have a nice day

Sébastien
0 Kudos
Ariharan
New Contributor
Hi,

Can i use the NEtwork Analysis solver to find Routing in a .Net Windows Application? Plz, give me some code samples related to this. If we can use Network Analysis, What are all the Inputs we need to give?
0 Kudos
PatrickStevens
Esri Contributor
The .NET SDK help for Network Analyst begins by assisting you in determining your goals and helping you find the code samples and help documentation to accomplish them.  Start by looking here:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Programming_with_Networ...

When you install the .NET SDK, you will get a set of samples and data that you can work with.  You could also download the samples from the SDK help site online.  Some of the samples that could be of use to you include:

Programmatically using the Route solver

A Network Analyst Engine application that can behave similar to ArcMap

A simple example of custom solver code

Setting up a UI for a single solver

You asked about which inputs are required.  In all three of the code samples above, a network dataset is necessary.  Aside from that, you'll need to know which type of analysis you are doing (Route, Closest Facility, etc), and have a set of input locations upon which to route.


Hopefully, all of this helped.  If you can be more specific about your ultimate goal, I can give you some more specific instructions.  Are you looking to utilize the existing Route solver in a stand-alone application?  Are you using a custom solver in a stand-alone application?  Do you want to publish routing services for use on-line?  Are you looking for help in setting up the user interface, or in setting up the solver itself?  Are you utilizing geoprocessing?

In any case, I highly recommend going through the Network Analyst tutorial.  It will give you a firm basis in the capabilities and usage patterns of Network Analyst.
0 Kudos