From 669d2ae72311139a526e0bcfffcd4153c0e6480f Mon Sep 17 00:00:00 2001 From: zwnk Date: Thu, 23 May 2019 02:31:58 +0200 Subject: [PATCH] Update 'shp_2_txt.py' --- shp_2_txt.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/shp_2_txt.py b/shp_2_txt.py index 351a303..fcfc3f9 100644 --- a/shp_2_txt.py +++ b/shp_2_txt.py @@ -1,18 +1,21 @@ -# Example Output for a complete record of MA.dbf: +''' -# OrderedDict([('FeatureId', None), ('DATA_DATE', '20190402'), ('DATA_SRCE', 'http://www.ngs.noaa.gov/cgi-bin/ds_mark.prl?PidBox=DF6866'), -# ('PID', 'DF6866'), ('NAME', '204 S'), ('HT_MOD', ''), ('CORS_ID', ''), ('PACS_SACS', ''), ('STATE', 'MA'), -# ('COUNTY', 'PLYMOUTH'), ('QUAD', ''), ('LATITUDE', '41 48 42.93229(N)'), ('LONGITUDE', '070 57 49.32872(W)'), -# ('DEC_LAT', ' 41.8119256361'), ('DEC_LON', ' -70.9637024222'), ('ELLIP_HT', ''), ('POS_DATUM', 'NAD 83'), ('DATUM_TAG', '(1996)'), -# ('POS_EPOCH', ''), ('POS_SRCE', 'ADJUSTED'), ('ORTHO_HT', ' 18.5'), ('VERT_DATUM', 'NAVD 88'), ('VERT_EPOCH', ''), ('VERT_SRCE', 'VERTCON'), -# ('GEOID_HT', '-29.000'), ('GEOID_MOD', 'GEOID12B'), ('DYNAMIC_HT', ''), ('MODEL_GRAV', ''), -# ('N_ACC_HZ', ''), ('N_ACC_EH', ''), ('N_ACC_STDN', ''), ('N_ACC_STDE', ''), ('N_ACC_STDH', ''), ('N_ACC_CORR', ''), -# ('POS_ORDER', '2'), ('VERT_ORDER', ''), ('VERT_CLASS', ''), ('DIST_RATE', ''), ('ECEF_X', ''), ('ECEF_Y', ''), ('ECEF_Z', ''), -# ('SPC_ZONE', 'MA M'), ('SPC_NORTH', '840320.139'), ('SPC_EAST', '244562.406'), ('SPC_CONV', '+0 21 36.9'), ('SPC_CSF', '0.99998907'), -# ('UTM_ZONE', '19'), ('UTM_NORTH', '4630758.769'), ('UTM_EAST', '336889.228'), ('UTM_CONV', '-1 18 34.1'), ('UTM_CSF', '0.99992904'), -# ('STABILITY', 'C'), ('FIRST_RECV', '1972'), ('LAST_RECV', '1972'), ('LAST_COND', 'MONUMENTED'), ('LAST_RECBY', 'MAGS'), ('SAT_USE', ''), -# ('MARKER', 'DE = TRAVERSE STATION DISK'), ('SETTING', '7 = SET IN TOP OF CONCRETE MONUMENT'), ('STAMPING', '204 S')]) +Example Output for a complete record of MA.dbf: + OrderedDict([('FeatureId', None), ('DATA_DATE', '20190402'), ('DATA_SRCE', 'http://www.ngs.noaa.gov/cgi-bin/ds_mark.prl?PidBox=DF6866'), + ('PID', 'DF6866'), ('NAME', '204 S'), ('HT_MOD', ''), ('CORS_ID', ''), ('PACS_SACS', ''), ('STATE', 'MA'), + ('COUNTY', 'PLYMOUTH'), ('QUAD', ''), ('LATITUDE', '41 48 42.93229(N)'), ('LONGITUDE', '070 57 49.32872(W)'), + ('DEC_LAT', ' 41.8119256361'), ('DEC_LON', ' -70.9637024222'), ('ELLIP_HT', ''), ('POS_DATUM', 'NAD 83'), ('DATUM_TAG', '(1996)'), + ('POS_EPOCH', ''), ('POS_SRCE', 'ADJUSTED'), ('ORTHO_HT', ' 18.5'), ('VERT_DATUM', 'NAVD 88'), ('VERT_EPOCH', ''), ('VERT_SRCE', 'VERTCON'), + ('GEOID_HT', '-29.000'), ('GEOID_MOD', 'GEOID12B'), ('DYNAMIC_HT', ''), ('MODEL_GRAV', ''), + ('N_ACC_HZ', ''), ('N_ACC_EH', ''), ('N_ACC_STDN', ''), ('N_ACC_STDE', ''), ('N_ACC_STDH', ''), ('N_ACC_CORR', ''), + ('POS_ORDER', '2'), ('VERT_ORDER', ''), ('VERT_CLASS', ''), ('DIST_RATE', ''), ('ECEF_X', ''), ('ECEF_Y', ''), ('ECEF_Z', ''), + ('SPC_ZONE', 'MA M'), ('SPC_NORTH', '840320.139'), ('SPC_EAST', '244562.406'), ('SPC_CONV', '+0 21 36.9'), ('SPC_CSF', '0.99998907'), + ('UTM_ZONE', '19'), ('UTM_NORTH', '4630758.769'), ('UTM_EAST', '336889.228'), ('UTM_CONV', '-1 18 34.1'), ('UTM_CSF', '0.99992904'), + ('STABILITY', 'C'), ('FIRST_RECV', '1972'), ('LAST_RECV', '1972'), ('LAST_COND', 'MONUMENTED'), ('LAST_RECBY', 'MAGS'), ('SAT_USE', ''), + ('MARKER', 'DE = TRAVERSE STATION DISK'), ('SETTING', '7 = SET IN TOP OF CONCRETE MONUMENT'), ('STAMPING', '204 S')]) + +''' # dbfread 4 reading dbf files xD # https://dbfread.readthedocs.io/en/latest/ from dbfread import DBF