Skip to content

Conversation

@ben-polinsky
Copy link
Contributor

@ben-polinsky ben-polinsky commented Oct 10, 2025

Add unit to CRS returned by getAvailableCoordinateReferenceSystems and allow filtering based on a case-insensitive unit string passed as an argument to the same function.

Also expose a function getAvailableCRSUnits which returns an array of all CRS units used. This is helpful because some units contain language variations: "metre" vs "meter", for instance, and it is useful to see what are known values.

Closes #8614

imodel-native: iTwin/imodel-native#1244

@aruniverse
Copy link
Member

@simnorm @ashar-bentley @arome , plz review the api meets your expectations / needs

@hl662
Copy link
Contributor

hl662 commented Oct 10, 2025

out of curiosity, is there any value in mapping the units returned here with names of ECUnits?

@ben-polinsky
Copy link
Contributor Author

ben-polinsky commented Oct 13, 2025

out of curiosity, is there any value in mapping the units returned here with names of ECUnits?

There could be. I think it is out of scope for this initial task.

@arome
Copy link

arome commented Oct 14, 2025

This looks great, in our use case we want to filter out one option. Do you think this should be implemented on the API level or should we just fetch everything and filter it out based on the unit you now added

@ben-polinsky
Copy link
Contributor Author

This looks great, in our use case we want to filter out one option. Do you think this should be implemented on the API level or should we just fetch everything and filter it out based on the unit you now added

I think filter based on the unit.

@arome
Copy link

arome commented Oct 27, 2025

hey @ben-polinsky any update on this PR?

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

Successfully merging this pull request may close these issues.

Expose units on CRS and allow filtering

6 participants