Skip to content

jericks/geos-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Action

geos-cli

A Command line interface for GEOS - Geometry Engine Open Source.

Each command does one thing well (buffer, centroid, envelope) by reading in a geometry, processing the geometry, and writing the geometry out as WKT. Individual commands can be connected with unix pipes.

geos-cli buffer -g "POINT (1 1)" -d 10 | geos-cli centroid

geos-cli is written in C++ using CLI11 and GEOS. The Google Test library is used to write unit tests. The project is built with CMake and dependencies are managed with conan.

Build

mkdir build
cd build
conan install ..
cmake -g "Unix Makefiles" .
cmake --build .
ctest --verbose

Use

List all commands

% geos-cli list
area
boundary
buffer
centroid
contains
convexhull
coordinates
count
countpoints

Get help for a command

 % geos-cli buffer --help
Buffer a geometry
Usage: geos-cli buffer [OPTIONS]

Options:
  -h,--help                   Print this help message and exit
  -g TEXT                     Geometry
  -d FLOAT REQUIRED           Distance

Use a command

% geos-cli get -g "MULTIPOINT (1 1, 5 5, 10 10)" -i 1
POINT (1.0000000000000000 1.0000000000000000)

Combine commands

% geos-cli buffer -g "POINT (1 1)" -d 10 | geos-cli centroid
POINT (0.9999999999999994 0.9999999999999997)

About

A native geometry command line library using libgeos.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published