LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GeoTIFF files in LabVIEW

Does LabVIEW support GeoTIFF files?  I have a GeoTIFF file and basically what I want to do with it is read the embedded Latitude/Longitude values from within the file and, from that, set up the axes for a graph to overlay the image, so I can graph over the image, and have a geographically accurate Long/Lat. grid over the image.  Is there a way to point-and-click on the GeoTIFF image and obtain the lat/long data, so I can select smaller sections of the GeoTIFF to graph, but still be able to set the axes correctly (as opposed to having to graph the entire image all the time)?  I haven't found anything in the discussion forum referring to GeoTIFF, so hopefully I'll get some good responses to this new thread.
 
Thanks!
 
LMEE
0 Kudos
Message 1 of 9
(6,385 Views)
LabVIEW does not have built in support for GeoTIFF files.  The only image formats that LabVIEW can programatically read are BMP, PNG and JPEG.

The NI-Vision toolkit does allow you to read TIFF files however it would not parse the extra headers required to make it a GeoTIFF file.

If you are familiar with the GeoTIFF file format on a low level you could read the file using the binary read VI and then parse the data out yourself.  This is not easy but would be possible.


Once you have the long/lat data you could then set the graph scale to the appropriate values using a property node.  In order to get the lat/long data for the location of a mouse-click you would need to compute the values based on the location of the image and the location of the mouse when the user clicked. 


These are theoretical responses - I have never worked with GeoTIFF files myself.  Perhaps some other forum members have more experience....

Regards,

Simon H
Applications Engineer
National Instruments

0 Kudos
Message 2 of 9
(6,362 Views)
Simon,
 
Thank you for your response.  Is it possible to read TIFF files in LabVIEW without the NI-Vision toolkit?  I am using LabVIEW 8.2.
 
Thanks,
 
LMEE
0 Kudos
Message 3 of 9
(6,349 Views)
Not directly but this question has surfaced before on the forum:

http://forums.ni.com/ni/board/message?board.id=170&message.id=113190&query.id=23599#M113190

Message Edited by Simon H on 09-21-2006 05:07 PM

Message Edited by Simon H on 09-21-2006 05:07 PM

0 Kudos
Message 4 of 9
(6,344 Views)

Hi LMEE one way you can pass the geotiff files in LabVIEW is by using a third party program that has an ActiveX server, and trough this you can display and obtain some of the properties depending on the program.

Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 5 of 9
(6,317 Views)

Benjamin,

I have been looking into this option.  Can you suggest any freeware programs that would accomplish this task?

Thanks!

LMEE

0 Kudos
Message 6 of 9
(6,316 Views)
Hi LMEE sorry for the delay I was searching for some freeware but didnt find any complete freewarer but there are some demos available. Te best for you depends on you geotiff file, so you should try them directly with you map, the fountions offered vary on the geotiff you find and some might not even open some geotiffs.
Also you could try .net or dll
Best Regards
Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 7 of 9
(6,273 Views)
Not freeware, but it isn't real expensive. try globalmapper. http://www.globalmapper.com/
 
 
 
One more link.

Message Edited by unclebump on 10-12-2006 03:49 PM

0 Kudos
Message 8 of 9
(6,267 Views)

The wikipedia page on GeoTIFF (here) recomennded GDAL (Geospatial Data Abstraction Library). You can read about it here and here. It's open source and it can read and write GeoTIFF files. You can compile the GDAL C++ code into a shared library (ie. DLL) that you can access from LabVIEW, or you can compile it into an executable and run it using the LabVIEW System Exec VI, which is what I did in the attached VI. However, I didn't compile it myself. You can find precompiled versions of GDAL here. I used the Windows version, which is here. Notice the readme that tells you to add path information and set up an environment variable.

 

The attached VI reads some of the GeoTIFFs that I downloaded from here. You can replace the combo-box with something else that represents the location of your GeoTIFF files, or you can edit its properties to list the locations of your GeoTIFF files.

0 Kudos
Message 9 of 9
(5,547 Views)