Skip to content

Commit

Permalink
README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bitner committed Jul 29, 2024
1 parent e6ae85f commit b85cb6b
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
WORK IN PROGRESS, NOT READY FOR USE
# CQL2-RS

Currently working:
All CQL2-JSON and CQL2-TEXT examples from the ogcapi-features repo parse into json that succesfully validates against the cql2.json schema.
## WORK IN PROGRESS, NOT READY FOR USE

to test use cargo run and then at the prompt, you can enter either a json string for cql2-json or cql2-text
Parse, validate, and convert CQL2-Text and CQL2-JSON.

## CLI
Both commands take either CQL2-Text or CQL2-JSON on stdin, as a quoted/escaped argument, or interactively. They will return status code 0 on successful validation or status code 1 if there was a problem parsing or validating. Verbosity of the validation errors can be controlled using the CQL2_DEBUG_LEVEL environment variable between 0 and 3.
- cql2json - returns standardized CQL2-JSON
- cql2text - returns standardized CQL2-Text

## Response
Response may not match the input.
### CQL2-Text Differences
- all identifiers in output are double quoted
- position of "NOT" keywords is standardized to be before the expression (ie "... NOT LIKE ..." will become "NOT ... LIKE ..."
- The Negative operator on anything besides a literal number becomes "* -1"
- Parentheses are added around all expressions

Tasks to get to ready-to-use state:
- [x] Parse all examples from CQL2 examples into json that passes json schema validation.
- [ ] Add tests that compare OGC examples to parsed/standardized/validated CQL2-Text and CQL2-JSON
- [ ] Fix issues with Z, ZM, and M WKT variants

0 comments on commit b85cb6b

Please sign in to comment.