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

Writing and Reading Sections of .e57 File #244

Open
JonKirkland opened this issue Apr 18, 2023 · 3 comments
Open

Writing and Reading Sections of .e57 File #244

JonKirkland opened this issue Apr 18, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@JonKirkland
Copy link

Hello,
Currently I only know how to read and write e57 files while storing the data for an entire file in a buffer. Since I have some large .e57's I would like to work with, I was wondering if it was possible to:
Read from 0-5 million points, write 5 million points, then read from 5-10 million points etc. not so much memory is being used.
Looking at the docs I saw CompressedVectorReader.seek(), but I was not able to get this working for me. I have also not been able to find any example in the tests. If you anyone could outline a way for this to be done I would greatly appreciate it.

@asmaloney
Copy link
Owner

The code for seek() looks like this:

   void CompressedVectorReaderImpl::seek( uint64_t /*recordNumber*/ )
   {
      checkImageFileOpen( __FILE__, __LINE__, static_cast<const char *>( __FUNCTION__ ) );

      // !!! implement
      throw E57_EXCEPTION1( ErrorNotImplemented );
   }

This is related to #79 - though you are also asking for a batch/streaming interface.

(I've mentioned in other places that I started a new implementation from scratch a while ago. I'd implemented batched reading the way you describe because I think it makes a lot of sense!)

@asmaloney asmaloney added the enhancement New feature or request label Apr 18, 2023
@JonKirkland
Copy link
Author

Sorry to revive this, but is the fact that libe57 uses Xerces preventing file streaming? I'm just curious as I've been using this library a lot and have started to poke around the code to gain a better understanding.
Great project btw.

@asmaloney
Copy link
Owner

is the fact that libe57 uses Xerces preventing file streaming?

Nope - that's a separate issue. The issue with Xerces is that it is like using a sledgehammer to push a tack into cork - and it's been a constant source of problems to include & build. A small simple implementation like pugixml would be better. The structure of libE57Format's code, however, makes replacing the XML a fair bit of work.

For streaming, I think it would be possible to implement CompressedVectorReaderImpl::seek and use it somehow (which I believe was the original intent), but not efficiently because the library doesn't implement certain features from the standard (e.g. indexing).

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