logo separator

[mkgmap-dev] gmapi reader?

From Steve Ratcliffe steve at parabola.me.uk on Mon Jan 29 09:27:03 GMT 2018

Hi Gerd

> A new fs sounds good to me, would be great if you could do that,
> I am always unsure where to call close().
OK

> Reg. FileCopier:
> I have to read the DEM file to make sure that it matches, I just

If I didn't miss anything you just need to read the header to do the check.
I would do the check outside of DEMFile.

FileCopier acts like a placeholder to the existing DEM in another file
and when the IMG file is closed the data will be copied directly
to the output.

If you always want DEM files to be written to a temporary file
instead of to memory (like the .MDR file is) then you can
use FileBackedImgWriter instead of BufferedImgWriter in DEM file.

> think that it would be better to store a reference to the existing file
> instead of copying it into memory. The code that writes the new img file
> would somehow notice that the data is not in memory but on disk.
> No idea if this would really improve anything, maybe the partial reading
> of DEM already requires a full copy in memory.
> I'll have a closer look at this now.



More information about the mkgmap-dev mailing list