Skip to content

code-for-magdeburg/baumfreunde-md-tools

Repository files navigation

Parse PDF documents

  • Scans filename for tree ids
  • Scans PDF text content for tree ids
  • Gets the size of PDF files
  • Gets the reported date from filename
  • Stores results in CSV of JSON file

Run using the following command

node ./index.js parse-pdfs [pdf-path] [-f fixed-trees-filepath] [-o output-filepath]
  • pdf-path points to the directory containing tree documentation PDF files (default: ./)
  • fixed-trees-filepath is a CSV file that contains a list of trees with predefined tree ids
  • output-filepath is the name of the resulting file (default: ./parsed_trees.csv)

Create GeoJSON file

Run using the following command

node ./index.js create-geojson input-filepath [-o output-filepath]
  • input-filepath is a CSV file containing all available tree information (e.g. produced by the parse-pdfs command)
  • output-filepath is the name of the resulting GeoJSON file (default: ./trees.geojson)

Extract images

Run using the following command

node ./index.js extract-images [pdf-path] [-o output-filepath]
  • pdf-path points to the directory containing tree documentation PDF files (default: ./)
  • output-path is the name of the base directory where extracted images will be stored (default: ./images)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published