Loads calculated fold from CSV file to GIS database
Project description
Seismic Fold Db GIS
module to load calculated fold from CSV file to GIS database
-
Dependencies:
SQLAlchemy>=1.3.22 GeoAlchemy2>=0.8.4 -
CSV format
- first line is header
- comma separated
- columns order: 'Easting', 'Northing', 'Fold', 'Bin Number', 'Row', 'Column'
-
DB engine connection
- SQLite with spatial extension
def load_spatialite(dbapi_conn, connection_record): dbapi_conn.enable_load_extension(True) dbapi_conn.load_extension('/usr/lib/x86_64-linux-gnu/mod_spatialite.so') db_file = '/some_folder/fold.sqlite' engine = create_engine('sqlite:///' + db_file, echo=True)
- PostgreSQL with PostGIS extension
engine = create_engine('postgresql://user:password@db_host/db_fold')
- SQLite with spatial extension
-
Usage:
engine = create_engine('postgresql://user:password@db_host/db_fold') fold = FoldDbGis(engine) fold.create_table() # to load fold file to empty db fold.load_from_csv(csv_file1) # to update db with fold file that do not overlap previously loaded data fold.load_from_csv(csv_file2) # to update db with fold file that overlaps with previously loaded data (i.e. two adjacent zippers) fold.update_from_csv(csv_file3)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file SeismicFoldDbGis-0.0.3.tar.gz.
File metadata
- Download URL: SeismicFoldDbGis-0.0.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
020fdca48206f351133149047730e315ea4ecd23159241b9db0c2775fd4d2ea9
|
|
| MD5 |
9871e67c8988f306cefe1464026c0fe9
|
|
| BLAKE2b-256 |
2a44e67fdcac7a69d9040809ceaf27abeda9816f856791bb71e3620cb8d17448
|
File details
Details for the file SeismicFoldDbGis-0.0.3-py3-none-any.whl.
File metadata
- Download URL: SeismicFoldDbGis-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0bc6d3c8cfe03eb574ef3d4ad6ca9355188910da96fac0ee1e94df429b8aafb
|
|
| MD5 |
d9eccaaa203295738f10b511f4f9bd0c
|
|
| BLAKE2b-256 |
4f71cacafe00903e06b08d0d1b440a5ff1b7db808ca15e9f9332bbfe6a32bb4c
|