Geotiff problem with "small" images???

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Geotiff problem with "small" images???

Duncan Mercer-2
Hi

I'm new to the world of geotiff and I'm running
into a problem when generating small area coverage
geotiffs

I'm collecting images using a robotic submarine (an AUV)
and want to use geotiff to locate these images for use in a
GIS etc. Typical footprint for the images is 1m x 1.5m

If I write the geotiff tags using the correct size then the
image appears badly distorted when viewed in openev and
in arcgis. If however I keep everything else the same and
pretend that the image is 1Km x 1.5Km the image will appear
undistorted.

Has anyone come across this issue before, is there some fundamental
lower limit on the image size that I've not picked up on? Or can someone
tell me how to search the mailing list archives for similar issues?

Example images are available at.
http://www-personal.acfr.usyd.edu.au/d.mercer/geotiff
Large image appears ok, but oversized. Small image is distorted
(at least in openev. I haven't been able to check this one in arcgis
but I have seen the issue with other images I have generated in the past)




FYI.
I am using libgeotiff and writing the following geotags...

  TIFFSetField(tif_ptr, TIFFTAG_GEOTRANSMATRIX, 16, position.transform);

  GTIFKeySet(gtif_ptr, GTModelTypeGeoKey, TYPE_SHORT, 1, ModelTypeProjected);
  GTIFKeySet(gtif_ptr, GTRasterTypeGeoKey, TYPE_SHORT, 1, RasterPixelIsArea);
 
  GTIFKeySet(gtif_ptr, ProjectedCSTypeGeoKey, TYPE_SHORT, 1, utm_zone);
  GTIFKeySet(gtif_ptr, PCSCitationGeoKey, TYPE_ASCII, PCS_Zone.str().length(), PCS_Zone.str().c_str());


Any help or suggestions gratefully received.
Best regards
Duncan


--
Dr Duncan Mercer
Australian Centre for Field Robotics
The Rose Street Building, J04
The University of Sydney.
2006 NSW, Australia
Tel: +61 (0) 2 9036 7178
Fax: +61 (0) 2 9351 7474

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

RE: Geotiff problem with "small" images???

Max Martinez

Duncan,

 

There isn’t a limit that is specific to GeoTIFF but computers in general have limitations in their standard floating point representations. In the small image, the UTM projection in combination with the small image area means that the difference between the coordinates in adjacent pixels doesn’t show up until the tenth decimal place. This is not a problem if double precision floating point numbers (64-bit quantities) are used (where 17 decimal digits of precision can be accommodated), but if floats (32-bit quantities) are used anywhere in these software products, you may see funny behavior.

 

ERDAS IMAGINE seems to display the images OK ;-)

 

Max

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Duncan Mercer
Sent: Tuesday, July 22, 2008 8:51 PM
To: [hidden email]
Subject: [Geotiff] Geotiff problem with "small" images???

 

Hi

I'm new to the world of geotiff and I'm running
into a problem when generating small area coverage
geotiffs

I'm collecting images using a robotic submarine (an AUV)
and want to use geotiff to locate these images for use in a
GIS etc. Typical footprint for the images is 1m x 1.5m

If I write the geotiff tags using the correct size then the
image appears badly distorted when viewed in openev and
in arcgis. If however I keep everything else the same and
pretend that the image is 1Km x 1.5Km the image will appear
undistorted.

Has anyone come across this issue before, is there some fundamental
lower limit on the image size that I've not picked up on? Or can someone
tell me how to search the mailing list archives for similar issues?

Example images are available at.
http://www-personal.acfr.usyd.edu.au/d.mercer/geotiff
Large image appears ok, but oversized. Small image is distorted
(at least in openev. I haven't been able to check this one in arcgis
but I have seen the issue with other images I have generated in the past)




FYI.
I am using libgeotiff and writing the following geotags...

  TIFFSetField(tif_ptr, TIFFTAG_GEOTRANSMATRIX, 16, position.transform);

  GTIFKeySet(gtif_ptr, GTModelTypeGeoKey, TYPE_SHORT, 1, ModelTypeProjected);
  GTIFKeySet(gtif_ptr, GTRasterTypeGeoKey, TYPE_SHORT, 1, RasterPixelIsArea);
 
  GTIFKeySet(gtif_ptr, ProjectedCSTypeGeoKey, TYPE_SHORT, 1, utm_zone);
  GTIFKeySet(gtif_ptr, PCSCitationGeoKey, TYPE_ASCII, PCS_Zone.str().length(), PCS_Zone.str().c_str());


Any help or suggestions gratefully received.
Best regards
Duncan


--
Dr Duncan Mercer
Australian Centre for Field Robotics
The Rose Street Building, J04
The University of Sydney.
2006 NSW, Australia
Tel: +61 (0) 2 9036 7178
Fax: +61 (0) 2 9351 7474

- Register for Workflow Solved: High Fidelity Mosaics, a free ERDAS webinar on Thursday, July 31st (11 am & 8 pm EDT)
_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

Re: Geotiff problem with "small" images???

Frank Warmerdam
Max Martinez wrote:
> If I write the geotiff tags using the correct size then the
> image appears badly distorted when viewed in openev and
> in arcgis. If however I keep everything else the same and
> pretend that the image is 1Km x 1.5Km the image will appear
> undistorted.
>
> Has anyone come across this issue before, is there some fundamental
> lower limit on the image size that I've not picked up on? Or can someone
> tell me how to search the mailing list archives for similar issues?

Duncan,

As Max suggests this can easily occur if values are converted to floating,
or even in full double precision in some extreme cases.  OpenEV uses 32bit
floats for the OpenGL meshes through which the raster textures are drawn
so it can easily fall into serious precision problems.  I've seen this effect
with images less extreme than yours.

Nothing wrong with your image - it's just the software.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff
Reply | Threaded
Open this post in threaded view
|

RE: Geotiff problem with "small" images???

Gennady Khokhorin
In reply to this post by Duncan Mercer-2
Duncan,
both images in ArcMap located at the same upper-left corner and rotated
around it about 45 degrees clockwise:
Is it location you are expecting? Looks fine for me.
Did mention that both images have 0 resolution:

Image width=1360, length=1024 (1392640 pixels)
resolution: 0.00/0.00 pixels/inch
scan line size =4080
bits/sample =8
photometric RGB color model
samples/pixel =3
compression JPEG DCT compression
 
Somebody on dev list might give you more insights.
 
Happy programming!
Gennady
 

From: Duncan Mercer [mailto:[hidden email]]
Sent: Tuesday, July 22, 2008 4:51 PM
To: [hidden email]
Subject: [Geotiff] Geotiff problem with "small" images???

Hi

I'm new to the world of geotiff and I'm running
into a problem when generating small area coverage
geotiffs

I'm collecting images using a robotic submarine (an AUV)
and want to use geotiff to locate these images for use in a
GIS etc. Typical footprint for the images is 1m x 1.5m

If I write the geotiff tags using the correct size then the
image appears badly distorted when viewed in openev and
in arcgis. If however I keep everything else the same and
pretend that the image is 1Km x 1.5Km the image will appear
undistorted.

Has anyone come across this issue before, is there some fundamental
lower limit on the image size that I've not picked up on? Or can someone
tell me how to search the mailing list archives for similar issues?

Example images are available at.
http://www-personal.acfr.usyd.edu.au/d.mercer/geotiff
Large image appears ok, but oversized. Small image is distorted
(at least in openev. I haven't been able to check this one in arcgis
but I have seen the issue with other images I have generated in the past)




FYI.
I am using libgeotiff and writing the following geotags...

  TIFFSetField(tif_ptr, TIFFTAG_GEOTRANSMATRIX, 16, position.transform);

  GTIFKeySet(gtif_ptr, GTModelTypeGeoKey, TYPE_SHORT, 1, ModelTypeProjected);
  GTIFKeySet(gtif_ptr, GTRasterTypeGeoKey, TYPE_SHORT, 1, RasterPixelIsArea);
 
  GTIFKeySet(gtif_ptr, ProjectedCSTypeGeoKey, TYPE_SHORT, 1, utm_zone);
  GTIFKeySet(gtif_ptr, PCSCitationGeoKey, TYPE_ASCII, PCS_Zone.str().length(), PCS_Zone.str().c_str());


Any help or suggestions gratefully received.
Best regards
Duncan


--
Dr Duncan Mercer
Australian Centre for Field Robotics
The Rose Street Building, J04
The University of Sydney.
2006 NSW, Australia
Tel: +61 (0) 2 9036 7178
Fax: +61 (0) 2 9351 7474

_______________________________________________
Geotiff mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/geotiff