0. Final effect

First show the final effect, there is no scale in the PS map, it can be added later, so it is the first draft (not true north view).

True north view effect

1. Project requirements

  • Behind the
  • Location map (Eagle eye map)
  • The xy data table corresponding to the current view
  • legend
  • The view requires that each page face straight north up
  • The ratio is 1:5000

Style Reference (1)

This style uses CAD topographic map as the base map

Reference Style (2)

This one uses satellite imagery,

The above two case references show that there is already a more mature format in the line, the parts are basically the same, start to implement one by one.

2. Requirements analysis & Implementation

Create a data-driven layer

  • demand

Through the data-driven function, data pages are generated and the whole river is segmented at a fixed proportion.

  • implementation

The official data driven graph has a very detailed tutorial, here is a reference to the diagram diagram, it is recommended to do data driven, be sure to watch the official tutorial:

  • Official data-driven tutorial

Create the corresponding grid index layer

  • Grid index elements (due north method of fixed direction segmentation) :

  • Zonal map index elements (shards according to fluid direction) :

According to the requirements, we need to use the grid index element method, and then manually delete the unnecessary pages, finally get the following true north method of segmentation:

  • Using tools to create

    • 1. It can be seen that three layers are selected in the figure, one is the axis of the river and the two banks of the river. Actually, two layers are enough.

    • 2 The ratio is fixed at 1:5000. After entering the ratio, the number of rows and columns will be calculated automatically. Do not modify other values at this time, click OK

    The following is the generated effect, it can be seen that the general area is completed, some view areas are not reasonable, then manually adjust and optimize

    Manual optimization, delete redundant areas, center some areas, etc

    If you delete the viewport, the order of the layer’s field PageNumber will be lost. Remember to fix this as you will use this field to generate data-driven pages later

Create a data-driven view

  • Resources: Official tutorial

Here, as in the official tutorial, you create a data view, and the preparation is complete. Then implement the other requirements one by one

2.1 Dynamic Title

demand

Title is a fixed line of text + dynamic page display, you can know the current page in real time,

implementation

  • Resources: Official tutorial

This effect is very simple, ArcMap’s data driver comes with the ability to insert dynamic text.

2.2 Dynamic locator legend

demand

Each page with a small map navigation, real-time display of the current page in the global specific location, equivalent to atlas pages and directories, only in the form of pictures.

implementation

  • Official tutorial: Create a locator map for an atlas

  • Official tutorial: Enhance hawk-eye or locator maps with range indicators

The official tutorial is very detailed, so I’ll just post my final style here

2.3 Dynamic XY Coordinate Table (difficult points)

demand

  • Get each page

There are multiple control points on both sides of the river, and there is no absolute rule. The coordinates of control points need to be shown in a table eventually.

plan

  • Script implementation of Scheme 1:

    First, record a field above each point, which field saves the view with which the current point exists, and then dynamically generate a table according to the view through the script, and then put it on the graph. The table can be generated from the gallery in PY, but the position of the insert table is different for each view, and the size of each table is different. Some view positions are so small that the page table needs to be generated in parts. How to obtain the position of the insert table and how to determine how many inserts are needed?

  • Solution 2: Manually paste and copy

    Each page is manually inserted, and the position is also manual. The advantage is that the table of each view can be easily controlled, and the position can be handled very comfortably and the effect is very good. Disadvantages, the current page project is 83, each page to manually extract data, and then copy the table, and then export, the workload is very large, there is no way in the way.

implementation

  • Scheme 1 Script implementation

    Through baidu programming, very lucky, there have been similar requirements of the case has been realized, the subsequent discovery of the method used by the tutorial is also provided by the official document YYDS, as expected

    1 Online Tutorials

    2 Official tutorial, code case 2

    Neither the official tutorial nor the tutorial can create a new element using a ready-made API. You need to first create some text elements and wireframes, and then copy, shift, and replace the contents by calling the API to implement the piecing together of the table, and finally become the style of the table.

3 Use a homemade spreadsheet of generated data

Script tutorial is not finished, not released for the time being

The method in the official code sample didn’t work out as well as required, so I ended up doing the wheel automatically. But the end result is a bit different, the table position is not generated inside the view, because there is no relevant API to implement it.

  • 1 Create a box element with the same name as the data layer

    The generated table inherits the color, width, and location of the box elements, so where do you want the table to be generated, put the box

    What color do you want the table to be, what style do you want the borders to be, and adjust the boxes accordingly

  • Create a text element for the table with the same name as the data layer.

  • Use plug-ins to generate tabular data for each page

  • 4. Use plug-ins to generate tables in batches

Plug-ins support export in a variety of formats

  • 5 Final generated file (PDF, PNG, etc.)

  • Implement dynamic position of data table for each view

    Because the current plug-in only realizes the table generation of fixed position (according to the box element), if you need to realize the table position of each view is different, embedded in the picture, you can only manually modify the exported MXD page by page, and then batch convert THE MXD to PDF output and print. I haven’t found an API for layer style generation in the view interface yet, so let me know if I can.

4 Legend and pointer

Legends and Pointers are the same as ordinary drawings, and will automatically update according to the view, very humanized.

5 Encountered pits

  • Arcgis 10.x uses Python version 2.x, super pit

    • When writing scripts, if there are Chinese annotations, it is easy to appear unknown errors, and some Chinese hints can not be printed well, 2. X coding pit really many

    • APIGetParameterAsText and GetParameter fail to get parameters when assigned to fixed variables for unknown reasons