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

Support for reading Array types, or, support for reading data where some are not DataArray #63

Open
williamjsdavis opened this issue Aug 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@williamjsdavis
Copy link
Contributor

It would be useful to be able to read cell or point data that is not of DataArray type. One use case is string data, which is of the Array type, e.g.:
<Array type="String" Name="Container" format="ascii">

Currently this is not implemented in ReadVTK.jl:

@assert LightXML.name(xml_element) == "DataArray"

Alternatively, if Array type data is not readable, it would still be nice to be able to read the DataArray components (without considering the Array components). Currently in ReadVTK.jl, if there is even one XML element that is not DataArray (even if that's not the one you want to read), the @assert referenced above will fail, and the data cannot be read. Ideally, one should be able to read DataArray components, even if Array components exist in the XML tree.

@ranocha
Copy link
Member

ranocha commented Aug 20, 2024

Sounds reasonable - PRs welcome 🙂

@williamjsdavis
Copy link
Contributor Author

@ranocha Thanks for motivating me to write a PR! See #65 . That PR is a first step towards supporting Array data, where get_data_section now skips over and non-numeric (i.e., non DataArray) elements.

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

No branches or pull requests

2 participants