Skip to main content

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

  1. Dependencies:

    SQLAlchemy>=1.3.22
    GeoAlchemy2>=0.8.4
    
  2. CSV format

    • first line is header
    • comma separated
    • columns order: 'Easting', 'Northing', 'Fold', 'Bin Number', 'Row', 'Column'
  3. 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')
      
  4. 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.4.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SeismicFoldDbGis-0.0.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file SeismicFoldDbGis-0.0.4.tar.gz.

File metadata

  • Download URL: SeismicFoldDbGis-0.0.4.tar.gz
  • Upload date:
  • Size: 3.4 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

Hashes for SeismicFoldDbGis-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5659165e6076b00e11725e71ed91411012a313be8079be13e481df39d8eda9b4
MD5 31b58164246219482ab37db82d70ff2a
BLAKE2b-256 0c021508feb36dc8d0038c43c3a1aa5fa83b142f7906c391ca5d60ad0457f01d

See more details on using hashes here.

File details

Details for the file SeismicFoldDbGis-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: SeismicFoldDbGis-0.0.4-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

Hashes for SeismicFoldDbGis-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ed8fd9acc45f4ced0f57ba63cf11ff3d812b86f82fe7df60f7c4e3bbb654e64b
MD5 5129412da1488731813ed3e93819579c
BLAKE2b-256 103a0500ed7123fbc596906e095647d2421347632cb839ddd1d08dabfb077477

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page