Skip to content

TNRIS/stac_factory

Repository files navigation

Datahub S3 Crawler

Instructions for development

  1. Change the username in the useradd line on Dockerfile to your local user. (Currently lh)
  2. put your API-CollectionID-CollectionName-Crosswalk.xlsx in the txgio_extension directory (May not be necessary for single collection generation)

Instructions for Dev Container Setup (Development related as well.)

  1. install remote - containers plugin @ https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers
  2. press cmd-p and type >Dev Containers Reopen Folder Locally

Use as a library

  1. prereqs, I recommend fedora os. Make sure python, python3-devel, pdal, PDAL-devel, gdal, gdal-devel, uv, and g++ packages are installed
  2. git clone https://github.com/TNRIS/stac_factory.git
  3. export PYTHONPATH="/path/to/your/library:$PYTHONPATH"
  4. uv pip install -e /path/to/stac_factory directory (Change to where you installed.) ((might work with uv add rather than uv pip install but I haven't tested yet. Both use uv though under the hood.))
  5. from stac_factory import gen_this_stac_collection
  6. from stac_factory import S3Config (Use this to configure s3 bucket)
  7. When you call gen_this_stac_factory just pass in a object with api keys. and a instance of S3Config (gen_this_stac_collection(whc, s3_configuration))
  8. This will upsert the collection into the postgres db in your environment
  9. (Make sure you activate venv) Either using the activate script or selecting interpretor through vscode

NOTES

  1. There is no tile index for address-points or land-parcels. Skipped for now. But it can work with fallback function to generate metadata from introspection. But it takes a long time.

About

stac factory library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages