clarisma/gol-tool

Add query option `--geometry` (`-g`)

clarisma opened this issue · 0 comments

Applies geometric transformations to geometries retrieved by a query.

Proposed format: -g=<command>+

Where command can be one or more of the following:

  • buffer(m): Buffers each geometry by a given distance (in meters)

  • simplify(m): Generalizes each geometry with a given tolerance

  • densify(m): Adds points to each geometry to ensure points are no more than m meters apart

  • rotate(deg): Rotates each geometry

  • scale(factor): Scales each geometry

  • translate(xd,yd): Moves each geometry by the given distance in meters.

  • project(srid): Projects each geometry

  • validate: Checks geometries for validity, turns them into empty geometries if invalid.

  • fix: Checks geometries for validity and attempts to fix invalid ones (e.g. node self-intersecting polygons)

  • flip / mirror ?

  • command to set winding order

Open issues

  • Should this be called --transform (-t) instead to apply non-geometric transformations (e.g. change tags?)
    • if so, would need to change current use if -t to -k as proposed by #73.
  • Does it make sense to offer union, intersection, difference?
    • If so, what are the features? What happens to the tags?