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

Feature proposal: Comparison operator and dynamic attribute support for ObjectQuery language #2211

Open
jjojala opened this issue Mar 27, 2024 · 3 comments

Comments

@jjojala
Copy link
Contributor

jjojala commented Mar 27, 2024

There're basically two main use cases for this feature:

  1. To identify objects that violate minimal size constraints (length for line -symbols, area for area -symbols) (so that something can be done with them: to be removed, enlarged, consiously preserved despite violation etc).
  2. To filter out objects too small to be included in the map. This sort of objects may end up to the map e.g. via gdal_contour or gdal_polygonize when preprocessing lidar data (see Preparing and importing lidar data (sorry, only in finnish) ). These objects may be invisible in the Mapper (unless explicitly selected), but may come visible e.g. as pdf by certain viewers (Acrobat Reader), maybe even in printouts.

By comparison it is meant an ability to use relational operators, such as "less than" or "greater than" comparisons in ObjectQueries. This would be beneficial e.g. when defining range of values (of certain span) instead of explicitly listing every matching value (see ridigulously long expression in CRT for land survey database in Finland ). Further a support for comparison together with "dynamic attribute" concept would enable identification of objects e.g. shorter than required by mapping standards.

By dynamic attribute it is meant that an object may have "tags", such as "$length" or "$area" that would be dynamically determined by the Mapper as part of the ObjectQuery evaluation and which are based on objects appearances. Predefined set of dynamic attributes would be provided, such as "$length" for line- and "$area" for area objects. Dynamic attributes should be distinctable from ordinary tags. In this proposal, a prefix $ is used for that.

@dl3sdo
Copy link
Member

dl3sdo commented Mar 27, 2024

See also #1021

@jjojala
Copy link
Contributor Author

jjojala commented Mar 27, 2024

Yep, from technical point of view this proposal can be seen as one step toward #1021.

May work for minimum dimensions, but considering minimal gaps between objects something else might be needed though.

@dl3sdo
Copy link
Member

dl3sdo commented Jun 20, 2024

When I create contour lines from lidar data I manually remove small artefacts, so I'm interested in a selection of objects that are too small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants