Recent

Author Topic: How i can read a geotiff header in my own application ?  (Read 8959 times)

twinq

  • Newbie
  • Posts: 3
How i can read a geotiff header in my own application ?
« on: March 20, 2010, 12:16:59 am »
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

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: How i can read a geotiff header in my own application ?
« Reply #1 on: March 20, 2010, 12:03:19 pm »
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
« Last Edit: March 21, 2010, 06:36:45 pm by Marc »
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

twinpoint

  • Newbie
  • Posts: 2
Re: How i can read a geotiff header in my own application ?
« Reply #2 on: March 20, 2010, 11:00:11 pm »
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

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: How i can read a geotiff header in my own application ?
« Reply #3 on: March 21, 2010, 12:52:28 pm »
Binary files don't load in memo's. Memo is mainly meant for pure text.


 

TinyPortal © 2005-2018