ncat-python
A python wrapper for the NGS’s Coordinate Conversion and Transformation Tool (NCAT) API. More information about the API is available here.
Features
- Can make calls to all 5 NCAT services (LLH, SPC, UTM, XYZ, and USNG)
- Ensures required parameters for different NCAT services are present before making api call.
Installation
Using pip:
pip install ncat-api
Usage
To use the package:
import NCAT from ncatapi
Making Requests
LLH Request
Perform an LLH Service request.
from ncatapi import NCAT
ncat = NCAT()
response = ncat.llh({
'lat': 40.0,
'lon': -80.0,
'orthoHt': 99.0,
'inDatum': 'nad83(1986)',
'outDatum': 'nad83(2011)',
'inVertDatum': 'NGVD29',
'outVertDatum': 'NAVD88'
})
Sample Response:
{
'ID': '1664818932872',
'nadconVersion': '5.0',
'vertconVersion': '3.0',
'srcDatum': 'NAD83(1986)',
'destDatum': 'NAD83(2011)',
'srcVertDatum': 'NGVD29',
'destVertDatum': 'NAVD88',
'srcLat': '40.0000000000',
'srcLatDms': 'N400000.00000',
'destLat': '39.9999983008',
'destLatDms': 'N395959.99388',
'deltaLat': '-0.189',
'sigLat': '0.000263',
'sigLat_m': '0.0081',
'srcLon': '-80.0000000000',
'srcLonDms': 'W0800000.00000',
'destLon': '-79.9999976143',
'destLonDms': 'W0795959.99141',
'deltaLon': '0.204',
'sigLon': '0.000221',
'sigLon_m': '0.0052',
'heightUnits': 'm',
'srcEht': 'N/A',
'destEht': 'N/A',
'sigEht': 'N/A',
'srcOrthoht': '99.000',
'destOrthoht': '98.848',
'sigOrthoht': '0.005',
'spcZone': 'PA S-3702',
'spcNorthing_m': '76,470.391',
'spcEasting_m': '407,886.681',
'spcNorthing_usft': '250,886.607',
'spcEasting_usft': '1,338,208.220',
'spcNorthing_ift': '250,887.109',
'spcEasting_ift': '1,338,210.896',
'spcConvergence': '-01 27 35.22',
'spcScaleFactor': '0.99999024',
'spcCombinedFactor': 'N/A',
'utmZone': 'UTM Zone 17',
'utmNorthing': '4,428,235.878',
'utmEasting': '585,360.668',
'utmConvergence': '00 38 34.18',
'utmScaleFactor': '0.99968970',
'utmCombinedFactor': 'N/A',
'x': 'N/A',
'y': 'N/A',
'z': 'N/A',
'usng': '17SNE8536128236'
}
SPC Request
Perform an SPC Service request.
from ncatapi import NCAT
ncat = NCAT()
response = ncat.spc({
'northing': 173099.419,
'easting': 503626.812,
'spcZone': 2402,
'inDatum': 'nad83(2011)',
'outDatum': 'nad83(NSRS2007)'
})
USNG Request
Perform an USNG Service request.
from ncatapi import NCAT
ncat = NCAT()
response = ncat.usng({
'usng': '15SWB4788338641',
'inDatum': 'nad83(2011)',
'outDatum': 'nad83(NSRS2007)'
})
UTM Request
Perform an UTM Service request.
from ncatapi import NCAT
ncat = NCAT()
response = ncat.utm({
'northing': 4138641.144,
'easting': 547883.655,
'utmZone': 15,
'spcZone': 2401,
'inDatum': 'NAD83(2011)',
'outDatum': 'NAD83(NSRS2007)'
})
XYZ Request
Perform an XYZ Service request.
from ncatapi import NCAT
ncat = NCAT()
response = ncat.xyz({
'x': -217687.279,
'y': -5069012.406,
'z': 3852223.048,
'inDatum': 'NAD83(2011)',
'outDatum': 'NAD83(NSRS2007)'
})
Metadata
Release files for ncat-api 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ncat_api-0.0.2.tar.gz | 7.6 kB | Without provenance | Details for ncat_api-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ncat_api-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for ncat_api-0.0.2-py3-none-any.whl |
Total release size: 13.1 kB
Release files / ncat_api-0.0.2.tar.gz
| Download URL | ncat_api-0.0.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f8e4848bcc17dba0fd0443f9d718767f167afe5addcf755c9342686958fe339
|
|
BLAKE2b-256 checksum How to use checksums |
05af443ec6ea93130838fa5fb404d1af43ef6a8b0d901d6ffc0a9ca899ffb5c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.9
|
Release files / ncat_api-0.0.2-py3-none-any.whl
| Download URL | ncat_api-0.0.2-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79a444a51232e8b8be230c9f3d33c512a07ab72ac74514f7bbf9607ae13e7558
|
|
BLAKE2b-256 checksum How to use checksums |
174716ff348bccb828fe0e986347850ca85259169ecbc684c1e1d0087c3f7a13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.9
|
Security for ncat-api 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.