Hi Mo,<br><br>What is the gdalinfo output for the GeoTIFF that you created? If you didn't get an error when you tried to load it in GE, perhaps the georeferencing in the image doesn't quite match what you specified in your KML.<br>
<br>Roger<br>--<br><br><div class="gmail_quote">On Thu, Apr 9, 2009 at 1:21 PM, mohwawang <span dir="ltr"><<a href="mailto:mohwawang@yahoo.com">mohwawang@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Roger,<br>
<br>
My goal is to be able to directly import NITF image to GE without using KML. You can see the advantage of this application - if it works. I'm glad that you have viewed in GE georeferenced imagery created or altered by gdal. Maybe you can point out what I did wrong.<br>
<br>
It is good that you asked about GeoTIFF. So I used gdal_translate to convert the tif image to a GeoTIFF image. I tried to drag and drop the GeoTIFF image to GE but nothing happened. I did not see the GeoTIFF image in GE and I did not get any error message either.<br>
<br>
I can open the GeoTIFF image with OpenEV and I can read the lan/lon coordinates and they are correct. One thing is that it seems that OpenEV does not set North to Up. Its orientation aligns with the file coordinates - (0,0) is at the upper left corner. I then opened tif file in the same OpenEV and they match to each other.<br>
<br>
Again, I can import the tif image with its kml to GE but I can not import the GeoTIFF to GE (without using kml), it seems that nothing happened. I can import the GeoTIFF to GE with kml - though that is not what I want. But the GeoTIFF is better than the NITF that could not be imported to GE even with the same kml.<br>
<br>
What's wrong with GeoTIFF? I mean why I could not import it to GE? I listed the gdal_translate command line here:<br>
<br>
>gdal_translate -of GTiff tiff.tif gtiff.gtf -a_srs EPSG:4326 -gcp 0 0 -70.887525562763 42.8093748999134 -gcp 560 0 -70.887525562763 42.8082925732318 -gcp 560 419 -70.8894939447889 42.8082925732318 -gcp 0 419 -70.8894939447889 42.8093748999134<br>
<br>
I don't have a .ntif file that was not created by gdal to test GE via the "Import Image Tool".<br>
<div class="im"><br>
Thanks.<br>
<br>
Mo<br>
<br>
<br>
--- On Thu, 4/9/09, Roger André <<a href="mailto:randre@gmail.com">randre@gmail.com</a>> wrote:<br>
<br>
> From: Roger André <<a href="mailto:randre@gmail.com">randre@gmail.com</a>><br>
> Subject: Re: [gdal-dev] Problem in importing to Google Earth a nitf image converted from a tif image by gdal_translate<br>
> To: "mohwawang" <<a href="mailto:mohwawang@yahoo.com">mohwawang@yahoo.com</a>><br>
> Cc: "<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>" <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>><br>
</div>> Date: Thursday, April 9, 2009, 12:47 PM<br>
<div><div></div><div class="h5">> Hi Mo,<br>
><br>
> Thanks for that pointer on the differences between GE<br>
> Layers and Places. I'll be sure to take a close look<br>
> at those links. I've had occasion in the past to view<br>
> georeferenced imagery in Google Earth, much of it created or<br>
> altered by gdal in some way, so this topic interests me.<br>
><br>
><br>
> I'm curious, is your goal to view the NITF format<br>
> specifically and to have GE read the internal georeferencing<br>
> info, or is it just to view the image in GE? It sounds<br>
> like you have already accomplished the latter using a KML<br>
> Ground Overlay and a tif, a method which has also worked<br>
> reliably for me in the past as well. I've also had<br>
> success with PNG and JPEG format files. <br>
><br>
><br>
> Since in your .nitf test the georeferencing was supplied by<br>
> the KML file, the red "X" you are getting implies<br>
> to me that the image format isn't being correctly<br>
> interpreted by GE for some reason. The fact that Envi<br>
> chokes on it as well does seem to point to gdal as a<br>
> possible culprit, although the NITF format is not one that I<br>
> have seen very much. Have you tried importing the GeoTIFF<br>
> version of your file directly into GE Pro as well? Also,<br>
> do you have a .nitf file that was not created by gdal, and<br>
> which you could use to test GE via the "Add Image<br>
> Overlay" tool?<br>
><br>
><br>
> Roger<br>
> --<br>
><br>
> On Thu, Apr 9, 2009 at 8:37 AM,<br>
> mohwawang <<a href="mailto:mohwawang@yahoo.com">mohwawang@yahoo.com</a>><br>
> wrote:<br>
><br>
><br>
><br>
> Roger,<br>
><br>
><br>
><br>
> I'm using Google Earth Pro 5.0. Thank you for the<br>
> suggestions.<br>
><br>
><br>
><br>
> Google Earth Pro 4.0 also supports importing NITF:<br>
><br>
> <a href="http://earth.google.com/userguide/v4/ug_importdata.html" target="_blank">http://earth.google.com/userguide/v4/ug_importdata.html</a><br>
> that is for importing your data (including vector data and<br>
> imagery data) to the Places of Google Earth while <a href="http://earth.google.com/userguide/v4/ug_imageoverlays.html" target="_blank">http://earth.google.com/userguide/v4/ug_imageoverlays.html</a><br>
> is for "Using Image Overlays and 3D Models".<br>
><br>
><br>
><br>
><br>
> See <a href="http://earth.google.com/userguide/v4/ug_layers.html#layers_vs_places" target="_blank">http://earth.google.com/userguide/v4/ug_layers.html#layers_vs_places</a><br>
> for the difference between Layers and Places in GE.<br>
><br>
><br>
><br>
><br>
> This is the first time I'm importing geo-referenced<br>
> images to Google Earth Pro and so far I don't have much<br>
> luck. As I said that I could not use GE to import the NITF<br>
> images converted from gdal_translate (with EPSG:4326 that is<br>
> the same projection, Simple Cylindrical projection, or known<br>
> as Lat/Lon WGS84 that GE uses). So I tried to narrow down<br>
> the problem. This time I imported to GE an native Erdas<br>
> IMAGINE image (.img) (with UTM projection that GE supports<br>
> too) but still failed. The later test case has nothing to do<br>
> with gdal and is purely a question for GE. That .img image<br>
> can be opened by both IMAGINE and OpenEV.<br>
><br>
><br>
><br>
><br>
> The NITF image (converted by gdal_translate) not just could<br>
> not be opened by GE it could not be opened by ENVI 4.1<br>
> either. It can be opened by OpenEV (tightly related to gdal)<br>
> though. So it could be a problem in either gdal_translate or<br>
> ENVI (I doubt though) or both.<br>
><br>
><br>
><br>
><br>
> Thanks.<br>
><br>
><br>
><br>
> Mo<br>
><br>
><br>
><br>
> --- On Thu, 4/9/09, Roger André <<a href="mailto:randre@gmail.com">randre@gmail.com</a>><br>
> wrote:<br>
><br>
><br>
><br>
> > From: Roger André <<a href="mailto:randre@gmail.com">randre@gmail.com</a>><br>
><br>
> > Subject: Re: [gdal-dev] Problem in importing to Google<br>
> Earth a nitf image converted from a tif image by<br>
> gdal_translate<br>
><br>
> > To: "mohwawang" <<a href="mailto:mohwawang@yahoo.com">mohwawang@yahoo.com</a>><br>
><br>
> > Cc: "<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>"<br>
> <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>><br>
><br>
> > Date: Thursday, April 9, 2009, 12:44 AM<br>
><br>
> > Granted, I haven't<br>
> tried V 5 yet,<br>
><br>
> > but your quote also states, "Google Earth Pro or<br>
><br>
> > EC". Are you using one of those versions of<br>
> the<br>
><br>
> > client? In any case, if the file opens in OpenEV,<br>
> chances<br>
><br>
> > are good that the .ntf generated by gdal is ok, and<br>
> that<br>
><br>
> > there is some sort of problem with how Google Earth<br>
> is<br>
><br>
> > reading it. Have you tried emailing the KML support<br>
> list<br>
><br>
> > as well?<br>
><br>
> ><br>
><br>
> > --<br>
><br>
> ><br>
><br>
> > On Wed, Apr 8, 2009 at 8:51 PM,<br>
><br>
> > mohwawang <<a href="mailto:mohwawang@yahoo.com">mohwawang@yahoo.com</a>><br>
><br>
> > wrote:<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > Google Earth 5.0 supports NITF see<br>
><br>
> ><br>
><br>
> > <a href="http://earth.google.com/intl/en/userguide/v5/ug_importdata.html" target="_blank">http://earth.google.com/intl/en/userguide/v5/ug_importdata.html</a><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > [Importing Imagery<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > You can open GIS imagery files in Google Earth Pro or<br>
> EC<br>
><br>
> > and have the files correctly projected over the proper<br>
> map<br>
><br>
> > coordinates in the 3D viewer. Google Earth Pro and EC<br>
><br>
> > support the following types of GIS imagery:<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > * TIFF (.tif), including GeoTiff and compressed<br>
> TIFF<br>
><br>
> > files<br>
><br>
> ><br>
><br>
> > * National Imagery Transmission Format (.ntf)<br>
><br>
> ><br>
><br>
> > * Erdas Imagine Images (.img)<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > In addition, you can also import the following<br>
> images.<br>
><br>
> > Because they do not contain projection information,<br>
> you must<br>
><br>
> > manually edit their coordinates for correct<br>
> positioning:<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > * Atlantis MFF Raster (.hdr)<br>
><br>
> ><br>
><br>
> > * PCIDSK Database File (.pix)<br>
><br>
> ><br>
><br>
> > * Portable Pixmap Format (.pnm)<br>
><br>
> ><br>
><br>
> > * Device Independent Bitmap (.bmp)<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > Note - All imagery files must contain the correct<br>
><br>
> > projection information in order to be accurately<br>
><br>
> > re-projected by the Google Earth software.]<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > Mo<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > --- On Wed, 4/8/09, Roger André <<a href="mailto:randre@gmail.com">randre@gmail.com</a>><br>
><br>
> > wrote:<br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> > > From: Roger André <<a href="mailto:randre@gmail.com">randre@gmail.com</a>><br>
><br>
> ><br>
><br>
> > > Subject: Re: [gdal-dev] Problem in importing to<br>
> Google<br>
><br>
> > Earth a nitf image converted from a tif image by<br>
><br>
> > gdal_translate<br>
><br>
> ><br>
><br>
> > > To: "mohwawang" <<a href="mailto:mohwawang@yahoo.com">mohwawang@yahoo.com</a>><br>
><br>
> ><br>
><br>
> > > Cc: "<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>"<br>
><br>
> > <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>><br>
><br>
> ><br>
><br>
> > > Date: Wednesday, April 8, 2009, 10:45 PM<br>
><br>
> ><br>
><br>
> > > See <a href="http://earth.google.com/userguide/v4/ug_imageoverlays.html#requirements" target="_blank">http://earth.google.com/userguide/v4/ug_imageoverlays.html#requirements</a>,<br>
><br>
> ><br>
><br>
> > > I don't believe the "NITF (rw+):<br>
> National<br>
><br>
> > Imagery<br>
><br>
> ><br>
><br>
> > > Transmission Format" is supported by Google<br>
><br>
> > Earth.<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > Roger<br>
><br>
> ><br>
><br>
> > > --<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > On Wed, Apr 8, 2009 at 3:27 PM,<br>
><br>
> ><br>
><br>
> > > mohwawang <<a href="mailto:mohwawang@yahoo.com">mohwawang@yahoo.com</a>><br>
><br>
> ><br>
><br>
> > > wrote:<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > Hi all,<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > I'm sorry that this is the third time I tried<br>
> to<br>
><br>
> > send<br>
><br>
> ><br>
><br>
> > > this message out because I myself didn't get<br>
> the<br>
><br>
> > first<br>
><br>
> ><br>
><br>
> > > two through <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
><br>
> ><br>
><br>
> > > so I thought others might not get it either.<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > I used gdal_translate to convert a tif image to<br>
> a<br>
><br>
> > nitf<br>
><br>
> ><br>
><br>
> > > image as:<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > >gdal_translate -of nitf in.tif out.ntf -co<br>
><br>
> > ICORDS=G<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > Input file size is 561, 420<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
> 0...10...20...30...40...50...60...70...80...90...100<br>
><br>
> > -<br>
><br>
> ><br>
><br>
> > > done.<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > I can display both in.tif and out.ntf with<br>
> OpenEV. So<br>
><br>
> > both<br>
><br>
> ><br>
><br>
> > > in.tif and out.ntf were ok to OpenEV.<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > With a simple Google Earth kml file(specifying<br>
> the<br>
><br>
> ><br>
><br>
> > > LanLonBox)(printed below) I could import the<br>
> in.tif<br>
><br>
> > to<br>
><br>
> ><br>
><br>
> > > Google Earth viewer to the right geo-location.<br>
> So<br>
><br>
> > in.tif was<br>
><br>
> ><br>
><br>
> > > ok to GE.<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > However, after replacing the image file name<br>
> from<br>
><br>
> > in.tif to<br>
><br>
> ><br>
><br>
> > > out.ntf in the same kml file (printed below) I<br>
> could<br>
><br>
> > not<br>
><br>
> ><br>
><br>
> > > import the out.ntf to Google Earth viewer (shown<br>
> as a<br>
><br>
> > big<br>
><br>
> ><br>
><br>
> > > red cross in a big red rectangle at the<br>
> geo-location<br>
><br>
> > in the<br>
><br>
> ><br>
><br>
> > > GE viewer). So out.ntf was not ok to GE. Any<br>
> ideal<br>
><br>
> > about<br>
><br>
> ><br>
><br>
> > > what might cause the problem? Was the use of<br>
><br>
> > gdal_translate<br>
><br>
> ><br>
><br>
> > > wrong or missing some options? I tried not to use<br>
> -co<br>
><br>
> ><br>
><br>
> > > ICRODS=G but I got the same problem. Thank you.<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > printed kml for in.tif:<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <?xml version="1.0"<br>
><br>
> ><br>
><br>
> > > encoding="UTF-8"?><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <kml xmlns="<a href="http://www.opengis.net/kml/2.2" target="_blank">http://www.opengis.net/kml/2.2</a>"<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > xmlns:gx="<a href="http://www.google.com/kml/ext/2.2" target="_blank">http://www.google.com/kml/ext/2.2</a>"<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > xmlns:kml="<a href="http://www.opengis.net/kml/2.2" target="_blank">http://www.opengis.net/kml/2.2</a>"<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > xmlns:atom="<a href="http://www.w3.org/2005/Atom" target="_blank">http://www.w3.org/2005/Atom</a>"><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <GroundOverlay><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <description><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > *** Meta-Data ***<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > Lat = 42.808863<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > </description><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <name>in.tif</name><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <Icon><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <href>in.tif</href><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <br>
><br>
> ><br>
><br>
> > ><br>
> <viewBoundScale>0.75</viewBoundScale><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > </Icon><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <LatLonBox><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <br>
><br>
> > <north>42.8093748999134</north><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <br>
><br>
> > <south>42.8082925732318</south><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <br>
><br>
> > <east>-70.887525562763</east><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <br>
><br>
> > <west>-70.8894939447889</west><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <br>
><br>
> > <rotation>-95.909027</rotation><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > </LatLonBox><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > </GroundOverlay><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > </kml><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > printed kml for out.ntf: same as in.tif<br>
><br>
> ><br>
><br>
> > > except:<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <name>out.ntf</name><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <Icon><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <href>out.ntf</href><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <br>
><br>
> ><br>
><br>
> > ><br>
> <viewBoundScale>0.75</viewBoundScale><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > </Icon><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > Best Regards,<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > Mo Wang<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > _______________________________________________<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > gdal-dev mailing list<br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > > <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> > ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
> ><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
<br>
<br>
<br>
</div></div></blockquote></div><br>