ArcGIS network analysis-building network analysis dataset (1)

Source: Internet
Author: User

Note:

1. This document describes how to set up the Network Analysis Service. Therefore, I will not discuss in depth every detail of the Network Analysis Service. The purpose of this article is to let beginners learn how to use the network analysis service for Basic Analysis (mainly for subsequent web development): path analysis, recent facility analysis and service area analysis.

2. the Analysis on OD cost matrix, multi-path distribution, and location allocation is not discussed in this article (Note: Rest GIS does not support OD cost matrix analysis, multi-path distribution, and location allocation, analysis can only be performed in ArcMap ).

3. For more information about GIS network analysis, see the ArcGIS help documentation. We strongly recommend this document.

4. to simplify the analysis process, the data used in this article is made by the author at, so the actual performance is not as beautiful as the actual data, but it has no impact on the content of the Network Analysis Service, readers can refer to the official Network Analysis Service data (Note: ArcGIS toturial 10.0 needs to be installed, which basically provides all the data used in the official documentation ).

 

1. Prepare network analysis data

First, we create line elements that represent roads. Line elements are then used to build our network dataset.

A. Step 1

Create a folder structure as follows:

Explanation: the scratch folder is used to store our zero-time data and tooldata is used to store our permanent service data. Generally, we store the geographical elements and element sets in the ground database.

Here we create a new feature set named networkfeaturedataset, because the line elements stored in the geographic database must be placed in the feature set if they are used to build a network dataset.

B. Step 2

Create various elements (indicating the point elements of a facility point and the line elements of a road) and add relevant attributes

(Note: network_nd and network_nd_junctions are the network data sets and nodes that have been built before. Here, we only need to create three new points and one line element)

Configure the attributes respectively:

Line elements:

Attribute description:

Shape_length: the default attribute generated when a new element is created, indicating the length of the line element. The value and unit are related to the selected coordinate system. Because of the subsequent web development, therefore, the Web mecator coordinate system is used here.

Length: indicates the length of the road. The value here is equal to shape_length. (In fact, we can directly use the shape_length attribute here. You can skip this attribute)

Level: indicates the level of the road. The driving speed allowed by different levels is different. Here, the relationship between the level and speed we set is as follows:

Level Maximum speed
1 130 km/h
2 120 km/h
3 80 km/h
4 60 km/h

It should also be noted that in the Web development process, the level Attribute of the road is enabled by default (that is, whether your network dataset has a level set or not, enable level attributes in Web development ). Therefore, if the network data set we build does not contain the level attribute, the default settings will cause errors in Web development. Of course, during web development, we can also set the Enable Level Attribute to false, which can also implement the network analysis function. The specific process will be included in the next web development. There is a basic concept here.

Speed: indicates the maximum speed of the road running, and is set according to the table shown above.

Time: indicates the driving time. No data is added here.

Name: indicates the highway name. Note that the line element must have a property of the text type to add direction settings when building a network dataset, otherwise, the direction guide is not included in the constructed network dataset. Therefore, we have added the path name to generate a direction guide.

Points (take the points that represent the school as an example, and other points have the same elements)

C. Step 3

Edit elements to build a specific map. Here we create a simple map, as shown in the following example:

Note: because the road is connected, we need to interrupt all the intersection line elements. You can use the extension tool for batch processing.

After the above process is completed, the data preparation phase has been completed. The following describes how to build a network dataset.

2. Build a network Dataset

Once again, it is emphasized that the line elements for building a network dataset must be in the element set; otherwise, it cannot be constructed.

Right-click feature set -- New -- network Dataset

Click as shown in

Set the name of the network dataset and click Next.

Set connectivity. There are two types of nodes and endpoints, which are the endpoints by default. Here we can select the default one, and then click Next.

Set the elevation field. When the elevation is involved, this setting is not involved in this article, so select none. Click Next.

Set the properties of the network dataset. The attributes shown above are specified. Specific addition Process:

Click "add", set the name, usage, and unit, and click the value assignment device to specify the attribute as a field, function, constant, and VB script.

Here we set the distance attribute as a field, which corresponds to the Length attribute of the line element (you can also use an expression to change the unit to kilometer: length/1000, and the default length unit is meter ).

The speed attribute of a line element. As shown in:

Drivertime attribute, indicating the driving time. Here, we need to note that the drivetime attribute uses an expression instead of directly assigning the time attribute of the line element to it. (Because we didn't assign a value to the time attribute when creating a new element, here we want to set the minimum time required to pass this element based on the length and maximum travel speed of the line element)

Because the speed is kilometers/, the default length unit is meters, So we divide the element length by one thousand.

After setting the preceding attributes, click Next to set the network direction attributes.

Here, we set the Length attribute to distance and the unit and time attribute, as shown in, and set the name to name field in the street name.

Click Finish. If there are no errors in the above process, congratulations, the network dataset we have built has been generated. At this time, the content of your element set should be as follows:

Next, we will verify the generated network dataset.

3. Verify the network Dataset

Click customize to bring up the network analysis toolbar:

Click networkanalyst to select an analysis item.

A. Shortest Path Query

Click Create path, and then click the + icon in the network analysis toolbar. Add two or more vertices to the map, as shown in the following figure:

Click the solution tool to generate the corresponding path.

The following is the generating direction guide:

In the same way, the analysis process of the service area is similar. For details, refer to the official documents. We will not describe it here. The next article will describe how to publish our network dataset to provide the GIS Network Analysis Service for the Web Client (silveright.

Data in this article:

Http://files.cnblogs.com/potential/NetworkAnalysis.rar

(All Rights Reserved. Please indicate the source for reprinting. Please reprint it)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.