Display electronic navigational charts

Electronic navigational chart (ENC) datasets are georeferenced vector datasets for the visualization and analysis of hydrographic and maritime information. This SDK supports ENC datasets conforming to the International Hydrographic Organization (IHO) standard S-57 (Transfer Standard for Digital Hydrographic Data).

Electronic navigational chart (ENC) data

Use ENCs in your apps to:

  • Visualize S-57 data in compliance with S-52 standards and specifications for chart content display.

  • Use S-57 data as an additional data source for situational awareness and decision making.

  • Combine S-57 datasets with other sources of information for geospatial analysis.

Get started

Before ENC data can be displayed in an application, you must add code to:

  • Set the path to the resource directory that contains the styles required to render the ENC data. The directory contents is available in the download area.
  • Set a location for the SENC data. The first time that ENC data is displayed it is processed and placed into the SENC directory. Subsequent displays of the ENC data will be faster because the data is already processed and is read directly from the SENC directory.
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
    // Set the Enc environemnt settings for the Senc and resource file paths.
    EncEnvironmentSettings::setSencDataPath(sencDataPath);
    EncEnvironmentSettings::setResourcePath(resourcePath);

Understand ENCs

An ENC cell represents a navigational chart of a rectangular geographic area at a particular scale. Cells are bounded by meridians and parallels, though the actual area of coverage contained in the cell may be any shape. All the data in a single cell corresponds to a single navigational use, such as: overview, general, or coastal (a navigational use corresponds to a scale range suitable for a particular use).

Cells are stored in a single base dataset file and zero or more update dataset files. Each dataset file has a unique name. A base dataset file plus its update files (if any) when loaded together comprise the updated geographic data of one cell.

ENC data is distributed in exchange sets, which can contain many cells. On the file system, each exchange set resides in its own folder named ENC_ROOT. Each ENC_ROOT folder contains a collection of dataset files (*.000), update files (.001-.999), a catalog file containing metadata about the exchange set (CATALOG.031), and other optional files with data referenced by the exchange set, such as text and image files.

See S-57 Appendix B for additional details about S-57 ENC exchange sets and their content.

Display an ENC

Access an exchange set on the file system using an EncExchangeSet object. An exchange set can be loaded using the path to the exchange set CATALOG.031 file, and optionally the paths to CATALOG.031 files for other exchange sets (in other directories) that contain additional update dataset files. If one of the datasets specified is an exchange set that contains only updates, then the exchange set with the corresponding base dataset files must be loaded in the same API call. See the Work with updates section for more information.

EncDataset objects represent datasets. Each EncDataset contains the base data for a cell and any updates that were also loaded when the exchange set was loaded, and provides access to metadata about the cell. Retrieve a collection of EncDataset objects contained in an EncExchangeSet using the datasets() method.

ENC cells (individual charts) are represented by EncCell objects. You can construct these objects in two ways:

  • From a dataset represented by an EncDataset object. This approach will include the base dataset file and all corresponding update dataset files. This is the preferred approach.
  • From a base dataset file. This approach will only include the base dataset file, and not any corresponding update dataset files. This is not a typical use case.

Display an ENC cell by constructing an EncLayer object from an EncCell object. EncLayer is derived from Layer, so you add an EncLayer to a map like you do other layers.

You can add all the charts in the exchange set by iterating through the exchange set's datasets, creating an EncCell for each, creating an EncLayer for each EncCell, and adding each EncLayer to the map.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
    // Create the EncExchangeSet using paths.
    EncExchangeSet* encExchangeSet = new EncExchangeSet(paths, this);

    // Get the list of Enc datasets from the Enc exchange set.
    QList EncDatasets = encExchangeSet->datasets();

    // Display the names of EncDataset.
    for (EncDataset* EncDataset: EncDatasets)
    {
        qDebug() << EncDataset->name();
    }

Work with ENC updates

ENC charts are often distributed as base cells (.000 files) with one or more update cells (.001, .002, etc. files). An exchange set can consist exclusively of update cells; in order to load an update exchange set, the path to the base exchange set must be provided along with the path to the update exchange set.

When loading an ENC cell, it is important to use the dataset-based constructor. If updates for a cell are part of an exchange set, they will be found only when the dataset-based constructor is used. Loading the cell from a path will not load any associated updates.

Set ENC environment settings

ENC layers are displayed in accordance with the IHO standard S-52 (Specifications for Chart Content and Display Aspects of ECDIS). You can define the display properties of your ENC layers by using the static EncEnvironmentSettings class. These settings apply to all ENC layers in all maps. Settings fall under three categories: mariner settings, text group visibility settings, and viewing group settings. Text group settings control the display of labels for features, mariner settings control the symbolization and presentation of ENC features, and viewing group settings allow for quickly applying settings to logical groups of feature types.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
    // Get the Enc text group visibility settings.
    EncTextGroupVisibilitySettings* encTextGroupVisibilitySettings = EncEnvironmentSettings::displaySettings()->textGroupVisibilitySettings();

    // Set the important text and nature of seabed properties.
    encTextGroupVisibilitySettings->setImportantText(false);
    encTextGroupVisibilitySettings->setNatureOfSeabed(false);

ENC content is accessed via compiled SENC (System Electronic Navigational Chart) files. After an ENC cell has been loaded, all future loads of that cell will reference the underlying SENC file directly. You can use the environment settings to find or set the location where SENC files are stored.

Identify and select ENC features

ENC layers support identify through the common geoview feature identification mechanism, which takes a screen point and tolerance in pixels. Identify will return a collection of result objects, one per matching layer. For ENC layers, the results will have a geoElements() method, which provides a collection of EncFeature objects.

Once a feature has been identified, you can call selectFeature() on the layer that contains the feature to select it.

Create a slot for the mouseClicked signal that starts the identify operation. Then, use the identifyLayersAsync method obtain the identify results. After features have been identified, you can access the identified ENC features in the results.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
    // Connect to the mouse clicked signal on the MapQuickView.
    connect(m_mapView, &MapQuickView::mouseClicked, this, [this](QMouseEvent& mouseEvent)
    {
        // Define the parameters for the idenitify operation.
        constexpr double tolerance = 5.0;
        constexpr bool returnPopupsOnly = false;
        constexpr int maximumResults = 5;

        // Asynchronously call the identify layers async method on the mapview using the parameters defined.
        m_mapView->identifyLayersAsync(mouseEvent.position(), tolerance, returnPopupsOnly, maximumResults).then(this,
           [](const QList<IdentifyLayerResult*>& identifyResults)
        {
            // Loop thru the identify results.
            for (int i = 0; i < identifyResults.size(); i++)
            {
                // Cast each layer content from the identify results to an Enc layer.
                EncLayer* encLayer = dynamic_cast<EncLayer*>(identifyResults.at(i)->layerContent());

                // Only proceed if we have am Enc Layer (other layer types are skipped).
                if (encLayer)
                {
                    // Display a message that a Enc features have been found for a specific Enc layer.
                    qDebug() << "EncFeatures identified in EncLayer #" << i << ":";

                    // Get the list of geo elements from the identify results.
                    const QList<GeoElement*>objects = identifyResults.at(i)->geoElements();

                    // Loop thru the geo elements.
                    for (int j = 0; j < objects.size(); j++)
                    {
                        // Cast the geo element object to an Enc feature.
                        EncFeature* encFeature = dynamic_cast<EncFeature*>(objects.at(j));

                        // Proceed if we have an Enc feature.
                        if (encFeature)
                        {
                            // Display the description of the Enc feature.
                            qDebug() << "Found EncFeature: " << encFeature->description();

                            // Get the attributes from the Enc feature.
                            QVariantMap map = encFeature->attributes()->attributesMap();

                            // Display the attributes.
                            qDebug() << " - Attributes: " << map;
                        }
                    }
                }
            }
        });
    });

Performance considerations

ENC content is accesed via internal SENC files. When an ENC cell is loaded, an SENC representation is generated. Subsequent loads only read the generated SENC files. When developing apps for working with ENC content, understand that:

  • The SENC data path must be set before attempting to read ENC content.

  • SENC files are device and version specific. These files should not be exposed to users, backed up, or shared between devices. The SENC format is internal and may change between versions of ArcGIS Maps SDK for Qt. Therefore, SENC files created by an app built with one version of the SDK are not guaranteed to work with apps built with another version of the SDK, even on the same device.

    • On iOS, consider setting the SENC path to a subdirectory of the documents directory that is excluded from iCloud and iTunes backup. See Apple Technical QA QA1719 for more information about excluding iOS directories from backup.

    • See the Android Developers topic for more information about excluding directories from backup on Android.

  • SENC files take time to generate, this will delay the loading of new ENC cells. It may take a long time to load large ENC exchange sets consisting of many cells (potentially hours). Never block the UI when loading these files.

  • Because the initial load of an ENC cell (before the SENC files have been generated) can take some time to complete, consider pre-loading them to ensure availability before depending on them for navigation.

  • Do not attempt to read or manipulate SENC files. Changes to generated SENC files invalidate them. This requires the files to be re-generated the next time the corresponding cells are loaded.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.