Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

here xyz gis --ratio / --calculate #216

Open
burritojustice opened this issue Feb 24, 2020 · 0 comments
Open

here xyz gis --ratio / --calculate #216

burritojustice opened this issue Feb 24, 2020 · 0 comments
Labels

Comments

@burritojustice
Copy link
Contributor

burritojustice commented Feb 24, 2020

Simple version:

Let users calculate and save a ratio as a new property in a feature, based on two existing properties.

here xyz gis --ratio property1,property2

Many scenarios where this would be useful, e.g. people per square km, or $/sq.m,

We could let the user name the property:

here xyz gis --ratio cost,area,'$ per sq.ft`

or call it something like xyz_ratio@property1÷property2 if they don't add a name.

More complicated version:

I was initially thinking about this as an extension of gis --area, but this brings up the possibility of allowing simple, general purpose field calculations with operators… something like:

here xyz --gis calculate new_property=property1/property2

here xyz --gis calculate new_property=property1+property2

here xyz --gis calculate new_property=property1*property2

etc.

  • we could also have an interactive feature that lets you pick properties and operators.

  • for more complex calculations, we could allow JavaScript Math Object operators

  • or we could even allow a constrained js function with conditional statements (which is one of the common use cases of something like the expressions in the QGIS field calculator

  • there is some interesting overlap with conditional operations and Rule Based Tags

@burritojustice burritojustice changed the title here xyz gis --ratio / (or perhaps --calculate here xyz gis --ratio / --calculate Feb 24, 2020
@Naitik333 Naitik333 added the GIS label Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants