Skip to main content

Converts shape files (.shp) to a gridded csv file

Project description

convert-shp-to-csv

This tool will take a shape file (.shp), and convert it to a gridded csv file with lat/long of the center of the grid as columns.

Any shapes that overlap this point when the shape is overlaid on to the grid will be reflected in additional columns

Usage:

usage: convert-shp-to-csv [-h] [--output-file OUTPUT_FILE] [--cell-size CELL_SIZE] shape_file

Converts a shape file (.shp) to a gridded csv file.
    

positional arguments:
  shape_file            Shape file (.shp) to convert

optional arguments:
  -h, --help            show this help message and exit
  --output-file OUTPUT_FILE, -o OUTPUT_FILE
                        Name of csv file to output
  --cell-size CELL_SIZE
                        Cell size, in lat/long segments. Default: 0.1

Example output:

latitude,longitude,EthGLG,EthHGComb
7.4488230199999546,34.35153731999999,Unconsolidated sedimentary - Miocene to Recent (minor consolidated Alwero Sandstone),U-LM
7.4488230199999546,34.35153731999999,Igneous Volcanic,I-M/H
7.4488230199999546,34.35153731999999,Precambrian Mobile/Orogenic Belt,B-L
7.548823019999955,34.35153731999999,Unconsolidated sedimentary - Miocene to Recent (minor consolidated Alwero Sandstone),U-LM
7.548823019999955,34.35153731999999,Igneous Volcanic,I-M/H
7.548823019999955,34.35153731999999,Unconsolidated sedimentary - Miocene to Recent (minor consolidated Alwero Sandstone),U-LM

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

convert-shp-to-csv-0.2.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

convert_shp_to_csv-0.2.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file convert-shp-to-csv-0.2.0.tar.gz.

File metadata

  • Download URL: convert-shp-to-csv-0.2.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.10 Linux/5.14.0-1029-oem

File hashes

Hashes for convert-shp-to-csv-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dccaa059dee3b56fc6783ef0249cd805a4fb3364ab566d508fdd46ff67bc1c05
MD5 e03439467804e748cf45c3a9e2469c3b
BLAKE2b-256 181396cbb400f523a1af1dc29262568f3a05d77794aa131b7f71cee3abca7685

See more details on using hashes here.

File details

Details for the file convert_shp_to_csv-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for convert_shp_to_csv-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ad7338eb1e8f109a1487b896b930ce60a5e46e3c8bac06fe9c430c14fa18dc0
MD5 c8033401684d5b415cd115c929a1659f
BLAKE2b-256 260a210405ddcda12fc1e0ee3e9a4fa214d7eaea18244f53fca41c40c4bb1690

See more details on using hashes here.

Supported by

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