Forum > Graphics

How i can read a geotiff header in my own application ?

(1/1)

twinq:
hello,

first i appologise for my english :)

What i need to know to read a geotiff ? What function i must use to read it?
Proggraming is my new hobby - maybe i want too much on start - but i want to create my own map of the world - not for cash - just for me.

Thanks a lot for any help.

Marc:
According to wikipedia GeoTIFF is a TIFF file with additional geo info. Lazarus has not (yet) a TTiffImage, but iirc TIFF images can be loaded through the fpImage library which comes with FPC. I don't know if you have access to those extra geo info

twinpoint:
ok,
now i do this:
with tfpReaderTiff and tpfWriterTiff i can open and save tiff file,  but i can`t savetostream it :
var
 S: TFileStream ;
 B: AnsiString  ;
begin
S := TFileStream.Create(opendialog4.FileName, fmOpenReadWrite);
SetLength(B, S.Size);
S.Read(B[1], S.Size);
memo1.Lines.LoadFromStream(S); 

it`s ok with .doc, .rtf etc. - it dosen`t worki with tiff.

I try use tfpreader/writerTiff to savetostream tiff - but memo lines show "????".
Maybe you have an idea how read tifffile in memo ?


marcov:
Binary files don't load in memo's. Memo is mainly meant for pure text.

Navigation

[0] Message Index

Go to full version