Summary
Imports Digital Nautical Chart (DNC) formats into a DNC geodatabase. The product footprint will be created from the Dqyarea and written to the Product_Footprints feature class if it is within the schema.
Usage
Imports DNC VPF data.
Multiple scales can exist in the same geodatabase. For instance Harbor, Coastal, Approach, or General scales are stored in a DNC NIS for enterprise production.
This tool, in conjunction with Convert DNC GDB To VPF, can be used to migrate data from one geodatabase to a second geodatabase.
Notes are imported.
Syntax
arcpy.nautical.DncVpfToGeodatabase(Input_VPF_Features, Input_Target_Geodatabase)
Parameter | Explanation | Data Type |
Input_VPF_Features | The VPF data to be imported into the geodatabase from specific layers or a folder that contains one library. Point, line, and polygon features can be imported. Use this tool in batch mode to import multiple library scales. | Workspace |
Input_Target_Geodatabase | The geodatabase into which the VPF data will be imported. This can be a new or existing geodatabase. | Workspace |
Code sample
DncVpfToGeodatabase example
The following code sample demonstrates how to import DNC data into an enterprise geodatabase.
#import arcpy module
import arcpy, traceback, sys
# Check for Production Mapping extension
print "Checking out Production Mapping extension"
arcpy.AddMessage("Checking out Production Mapping extension")
if arcpy.CheckExtension("foundation") == "Available":
arcpy.CheckOutExtension("foundation")
else:
arcpy.AddError("Production Mapping license is unavailable.")
#Define variables
#Input VPF
dnc = r'C:\Data\DNC\Products\__Coastal\DNC17'
#Input Target Workspace
inputGDB = r'C:\Data\DNC\DNC_NIS.gdb'
try:
#Execute tool
print "Importing DNC data..."
arcpy.DncVpfToGeodatabase_nautical(dnc, inputGDB)
except arcpy.ExecuteError:
# Get the geoprocessing error messages
msgs = arcpy.GetMessage(0)
msgs += arcpy.GetMessages(2)
# Write gp error messages to log
print msgs + "\n"
arcpy.AddError(msgs + "\n")
except:
# Get the traceback object
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
# Concatenate information together concerning the error into a message string
pymsg = tbinfo + "\n" + str(sys.exc_type)+ ": " + str(sys.exc_value)
# Write Python error messages to log
print pymsg + "\n"
arcpy.AddError(pymsg + "\n")
print "DNC To Geodatabase completed"
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: No
- Standard: No
- Advanced: Requires ArcGIS Maritime