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
SeismicFoldDbGis-0.0.2.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for SeismicFoldDbGis-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cbc47eba7144c45766cb02564f4a00bc77a04a7e951de8118e7f4f01a517b2e |
|
MD5 | 89d56400e79f9bcf3a2e85eb163a8091 |
|
BLAKE2b-256 | 8ce5fe9474a721d4687d82fdf2d0c7c225b7b30df1d68a7a4b323bfe1e19d651 |