polylabel_cmd 0.0.10

A command-line utility for finding optimum polygon label positions
polylabel_cmd-0.0.10 is not a library.

Polylabel_Cmd

…is the command-line version of Polylabel. Install it using cargo install polylabel_cmd.
This gives you the polylabel command.

Use

Polylabel takes one mandatory argument: valid GeoJSON, containing any 1 of:

  • a FeatureCollection containing Features which are valid:
    • Polygons or
    • MultiPolygons or
    • GeometryCollections containing either or both of the above.
  • a Feature containing a valid:
    • Polygon or
    • MultiPolygon or
    • GeometryCollection containing either or both of the above.
  • a Geometry which is a valid
    • Polygon or
    • MultiPolygon or
    • GeometryCollection containing either or both of the above.
  • Nested GeometryCollections have not been tested, but you shouldn't be using those anyway
  • Non-(Multi)Polygon geometries are stripped from any output.

It also accepts an optional -t or --tolerance switch, allowing you to fine-tune the tolerance from the default 0.001. Smaller tolerances take longer to calculate.

Irrespective of input, successful output is a GeoJSON FeatureCollection. Its contents depend on the input geometry:

  • Polygon: The FeatureCollection contains Point Features
  • MultiPolygon: The FeatureCollection contains MultiPoint Features
  • GeometryCollection: The FeatureCollection contains GeometryCollection Features whose geometries are Points or MultiPoints.

Output features retain the order of input features / geometries, and input feature properties are mapped to output features where they exist.

Validity

Input geometries are not validated. Results from invalid input geometries may be incorrect.

Speed

Polylabel is fast. Polygons are processed in parallel, using Rayon.

Binaries

Will be available when I set up CI.

License

MIT