nc5ng.nc5data Conversion Data API

PyPi Package: nc5ng-core

Data Wrapper API for nadcon5-ng source and output data


Conversions are used to aggregate the NADCON5.0 source and output data

class nc5ng.nc5data.Conversion(region, old_datum, new_datum, grid_spacing='900', **kwargs)[source]

A Conversion agregates all parts of a NADCON5 Datum Conversion and serves as the primary user interface into the dataset

A Conversion is created based on region, source, target datum, and gridspacing the same parameters that go into the data build pipeline

Conversions maintain a large set of data in memory (when loaded) and have accessors for data

Creating a conversion is simple

c = Conversion('conus', 'ussd', 'nad27')``

The output data of a conversion can be accessed directly by output prefix

v1 = c.output_data['vmacdlat']
v2 = c.output_data['vmacdlon']

Output data is indexed by PID, to extract all PID’s with lat and lon conversions in this data set

shared_pids = [ i for i in v1 if i in v2 ] 

All point data for a single point can be examined directly, including its source data

point = v[shared_pids[0]]
class ConversionInput(region, old_datum, new_datum, **kwargs)[source]

ConversionInput holds all input data associated with a conversion

On construction attempts to load all source data for a given conversion set

class ConversionOutput(region, old_datum, new_datum, grid_spacing, load_all=False, **kwargs)[source]

ConversionOutput holds all output data associated with a conversion

On construction attempts to load all known valid output files by iterating through known combinations of output types

Par region:The RegionData index to plot (e.g. 'conus')
Par old_datum:The source datum for conversion (e.g. 'ussd')
Par new_datum:The target datum for conversion (e.g. 'nad27')
Par grid_spacing:
 The conversion grid spacing (e.g. 900)

Static NADCON Data Services

Services to access certain static nadcon input data e.g. Grid Bound points

nadcon5-ng Data Types


DataPoint is the base DataPointType hierarchy for nadcon5-ng conversions

Other parts of this library may use a different hierarchy, but share a type generator

class nc5ng.nc5data.nadcon5_types.DataPoint(*args, **kwargs)[source]

Base Data Point Type for nadcon5-ng conversion data

Type Mixins

class nc5ng.nc5data.nadcon5_types.MetaMixin[source]

Mixin base type for standard meta information

class nc5ng.nc5data.nadcon5_types.DataContainerMixin(*args, **kwargs)[source]

Mixin type for containers of DataPoints

class nc5ng.nc5data.nadcon5_types.GMTMixin[source]
class nc5ng.nc5data.nadcon5_types.GMTMetaMixin[source]

nadcon5-ng File Parsers

File Parsers for import nadcon5-ng source and output data

FileParers implementing the BaseFileParser API use a calling convention to

class nc5ng.nc5data.nadcon5_files.ControlFileParser(control_dir='/home/docs/checkouts/')[source]
class nc5ng.nc5data.nadcon5_files.CoverageFileParser(**kwargs)[source]
class nc5ng.nc5data.nadcon5_files.GridParamFileParser(grid_file='/home/docs/checkouts/', *regions)[source]
class nc5ng.nc5data.nadcon5_files.InFileParser(fdir='/home/docs/checkouts/', ffile=None)[source]
class nc5ng.nc5data.nadcon5_files.VectorFileParser(**kwargs)[source]
class nc5ng.nc5data.nadcon5_files.WorkEditsFileParser(ffile='/home/docs/checkouts/')[source]