Arcengine开发Network analysis services

About network analysis services

The following network analysis capabilities are available through the NAServer extension to map services:
  • Route—Find the best routes through a network based on a collection of stops. The analysis can take into account attributes of the network, such as restrictions that affect the streets that can be traversed. The results of the analysis include the accumulated travel time and distance and driving directions:

  • Closest facility—Find the closest facilities, such as the closest hospital or automated teller machine (ATM) to a set of locations, factoring in cutoffs based on travel time, restrictions, and so on:

  • Service area—Delineate service areas that fall within certain travel times of a facility, such as a place of business or emergency response facility. The resulting service areas can be analyzed to assess accessibility, competition, and other factors:

  •  OD Cost Matrix —With ArcGIS Network Analyst, you can create an origin-destination (OD) cost matrix from multiple origins to multiple destinations. An OD cost matrix is a table that contains the network impedance from each origin to each destination. Additionally, it ranks the destinations that each origin connects to in ascending order based on the minimum network impedance required to travel from that origin to each destination:


  • Vehicle routing problem—A dispatcher managing a fleet of vehicles is often required to make decisions about vehicle routing. One such decision involves how to best assign a group of customers to a fleet of vehicles and to sequence and schedule their visits. The objectives in solving such vehicle routing problems (VRP) are to provide a high level of customer service by honoring any time windows while keeping the overall operating and investment costs for each route as low as possible. The constraints are to complete the routes with available resources and within the time limits imposed by driver work shifts, driving speeds, and customer commitments:

  • Location-allocation—Location-allocation helps you choose which facilities from a set of facilities to operate based on their potential interaction with demand points. It can help you answer questions like the following:

    - Given a set of existing fire stations, which site for a new fire station would provide the best response times for the community?
    - If a retail company has to downsize, which stores should it close to maintain the most overall demand?
    - Where should a factory be built to minimize the distance to distribution centers?

    In these examples, facilities would represent the fire stations, retail stores, and factories; demand points would represent buildings, customers, and distribution centers:

These network analysis functions are based on a network analysis layer in a map. An application that includes network analysis functionality uses a MapServer that contains a network analysis layer. There is a different type of network analysis layer associated with each type of analysis.
To create an application or Web service that consumes network analysis functionality on the server, do the following steps:
You must have ArcGIS Desktop and the Network Analyst extension installed.
  1. Create a network dataset in ArcCatalog for your transportation data with the appropriate attributes.
  2. Create a map in ArcMap that contains the network dataset and network analysis layer appropriate for the type of analysis you want to include in your application (shortest route, closest facility, or service area).
  3. Use an ArcGIS Server administration interface, such as Manager to publish the map document as a service with the network analysis capability enabled. When you have published the service, you can consume it programmatically in a client application.

Using fine-grained NetworkAnalyst objects        

It is possible to create an application that bypasses NAServer and accesses the fine-grained NetworkAnalyst objects on the server directly. When doing so, you must manage the state of the NetworkAnalyst objects so other sessions are not affected by changes to the objects. NAContext can be serialized to store the Network Analyst state information from one request to another. For example, once you have a route displayed on the map, you can continue to display that route even after the map has been panned or zoomed. For each request to your application, a process occurs to retrieve, store, copy or apply, serialize, and restore the NAContext object that has this information.
The INALayer2 interface on the NALayer object can be used in server applications to help manage the state of NALayer between sessions if it is necessary to use the fine-grained Network Analyst objects. (You do not need to use this if you are using NAServer.) Typically, during each use of a map server object (that is, each request from the Web browser), the following steps are necessary for each Network Analyst layer with which you are working:
  1. Copy the server's NALayer NAContext using INALayer2.CopyContext. This is your local copy of the context that your session uses.
  2. Apply your local NAContext using INALayer2.AttachContext before performing any network analysis. This is used to attach the server's NALayer to the specified NAContext.
  3. Set properties and call methods on the fine-grained NetworkAnalyst objects. You can also call methods that draw, perform spatial searches, or anything else that requires your NAContext be attached to the server's NALayer.
  4. When you are finished with the Web request, restore NALayer's original NAContext by calling INALayer2.AttachContext, passing in the original NAContext.

转载于:https://www.cnblogs.com/zhoushunjie/p/4624621.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值