ccfx 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccfx/ccfx.py +20 -0
- {ccfx-0.7.0.dist-info → ccfx-0.8.0.dist-info}/METADATA +1 -1
- {ccfx-0.7.0.dist-info → ccfx-0.8.0.dist-info}/RECORD +6 -6
- {ccfx-0.7.0.dist-info → ccfx-0.8.0.dist-info}/WHEEL +0 -0
- {ccfx-0.7.0.dist-info → ccfx-0.8.0.dist-info}/licenses/LICENSE +0 -0
- {ccfx-0.7.0.dist-info → ccfx-0.8.0.dist-info}/top_level.txt +0 -0
ccfx/ccfx.py
CHANGED
@@ -490,6 +490,26 @@ def readFrom(filename, decode_codec = None, v=False):
|
|
490
490
|
g.close
|
491
491
|
return file_text
|
492
492
|
|
493
|
+
|
494
|
+
def pointsToGeodataframe(point_pairs_list, columns = ['latitude', 'longitude'], auth = "EPSG", code = '4326', out_shape = '', format = 'gpkg', v = False, get_geometry_only = False):
|
495
|
+
df = pandas.DataFrame(point_pairs_list, columns = columns)
|
496
|
+
geometry = [Point(xy) for xy in zip(df['latitude'], df['longitude'])]
|
497
|
+
|
498
|
+
if get_geometry_only:
|
499
|
+
return geometry[0]
|
500
|
+
|
501
|
+
gdf = geopandas.GeoDataFrame(point_pairs_list, columns = columns, geometry=geometry)
|
502
|
+
drivers = {'gpkg': 'GPKG', 'shp': 'ESRI Shapefile'}
|
503
|
+
|
504
|
+
gdf = gdf.set_crs(f'{auth}:{code}')
|
505
|
+
|
506
|
+
if out_shape != '':
|
507
|
+
if v: print(f'creating shapefile {out_shape}')
|
508
|
+
gdf.to_file(out_shape, driver=drivers[format])
|
509
|
+
|
510
|
+
return gdf
|
511
|
+
|
512
|
+
|
493
513
|
def readFile(filename, decode_codec = None, v=False):
|
494
514
|
return readFrom(filename, decode_codec, v)
|
495
515
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
ccfx/__init__.py,sha256=VmBeF3oj6JTJ_793d4i8PvhyF8_FxaxA1L_FmHWqitc,142
|
2
|
-
ccfx/ccfx.py,sha256=
|
2
|
+
ccfx/ccfx.py,sha256=L0BeQLs4H9o8MlKlmr7pHqFmjbd5A3yDBKsk3XSzU5s,56313
|
3
3
|
ccfx/excel.py,sha256=cQ4TQW49XqbMB3sSS0IOhO3-WArIolEBIrvOvhFyPtI,4757
|
4
4
|
ccfx/mssqlConnection.py,sha256=TwyZXhHHI7zy6BSfH1pszuHVJ5cmndRC5dVxvEtSTks,7904
|
5
5
|
ccfx/sqliteConnection.py,sha256=jEJ94D5ySt84N7AeDpa27Rclt1NaKhkX6nYzidwApIg,11104
|
6
6
|
ccfx/word.py,sha256=AGa64jX5Zl5qotZh5L0QmrsjTnktIBhmj_ByRKZ88vw,3061
|
7
|
-
ccfx-0.
|
8
|
-
ccfx-0.
|
9
|
-
ccfx-0.
|
10
|
-
ccfx-0.
|
11
|
-
ccfx-0.
|
7
|
+
ccfx-0.8.0.dist-info/licenses/LICENSE,sha256=2-M3fBUS3FmrSIrqd3cZDmxXxojWVJtZY-SHSRE6RxM,1098
|
8
|
+
ccfx-0.8.0.dist-info/METADATA,sha256=1BskaEpbKDSaouiPDW9xdIlLdb62qPwwFjH2mUi9mpQ,5425
|
9
|
+
ccfx-0.8.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
10
|
+
ccfx-0.8.0.dist-info/top_level.txt,sha256=_cSvSA1WX2K8TgoV3iBJUdUZZqMKJbOPLNnKLYSLHaw,5
|
11
|
+
ccfx-0.8.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|