Re: [gdal-dev] Need some info on geotiff tags missing
Hi, I resolve my troubles. The geotiff as generate from gdal seem to be the minimal necessary tags for a geotiff. I tested the production using geotifcp tool and compare the with that produced using gdal. They are the same. So I guess the gdal tags are the minimal necessary to have a good geotiff. And the geotiff is correct. Sorry for noise, Andrea. 2014-08-02 23:48 GMT+02:00 Andrea Peri aperi2...@gmail.com: Hi, I have transform many old tiff+tfw rasters using this gdal transformation: gdal_translate -ot Byte -of GTiff -b 1 -a_nodata none -stats -co COMPRESS=NONE -co INTERLEAVE=PIXEL -co PROFILE=GDALGeoTIFF -co TILED=YES -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 -co SPARSE_OK=TRUE -co TFW=NO filein.tif fileout.tif They are wrking correctly with qgis and with mapserver for several months. Now I need to use this geotiffs with another program. But this program say that these images are not realy GeoTiffs. I test them using listgeos and have this result: TIFFReadDirectory: Warning, Unknown field with tag 42112 (0xa480) encountered. Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): 000 559417.4456374927786.430528 0 ModelPixelScaleTag (1,3): 0.5 0.5 0 End_Of_Tags. Keyed_Information: End_Of_Keys. End_Of_Geotiff. Some people say me that this is not a true geotiff because are missing several tags. I reported a supposed response from a real geotiff: Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): 0 0 0 6733474298291 0 ModelPixelScaleTag (1,3): 1 1 1 End_Of_Tags. Keyed_Information: GTModelTypeGeoKey (Short,1): ModelTypeProjected GTRasterTypeGeoKey (Short,1): RasterPixelIsArea GTCitationGeoKey (Ascii,37): NAIP 2012 m_3808409_sw_16_1_20120607 ProjectedCSTypeGeoKey (Short,1): PCS_NAD83_UTM_zone_16N PCSCitationGeoKey (Ascii,21): NAD83 / UTM zone 16N ProjLinearUnitsGeoKey (Short,1): Linear_Meter End_Of_Keys. End_Of_Geotiff. PCS = 26916 (NAD83 / UTM zone 16N) Projection = 16016 (UTM zone 16N) Projection Method: CT_TransverseMercator ProjNatOriginLatGeoKey: 0.00 ( 0d 0' 0.00N) ProjNatOriginLongGeoKey: -87.00 ( 87d 0' 0.00W) ProjScaleAtNatOriginGeoKey: 0.999600 ProjFalseEastingGeoKey: 50.00 m ProjFalseNorthingGeoKey: 0.00 m GCS: 4269/NAD83 Datum: 6269/North American Datum 1983 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31) Prime Meridian: 8901/Greenwich (0.00/ 0d 0' 0.00E) Projection Linear Units: 9001/metre (1.00m) Corner Coordinates: Upper Left( 673347.000, 4298291.000) ( 85d 0'12.06W, 38d48'58.87N) Lower Left( 673347.000, 4290632.000) ( 85d 0'18.99W, 38d44'50.54N) Upper Right ( 679532.000, 4298291.000) ( 84d55'55.75W, 38d48'54.41N) Lower Right ( 679532.000, 4290632.000) ( 84d56' 2.92W, 38d44'46.10N) Center( 676439.500, 4294461.500) ( 84d58' 7.43W, 38d46'52.50N) - I'm a bit confused. Because I have produced my GeoTiffs using gdal. And if it fail to produce a real geotiff I have a trouble. So the main question is a geotiff ith only the tags reported a real geotiff ? Thx, -- - Andrea Peri . . . . . . . . . qwerty àèìòù - -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Need some info on geotiff tags missing
Le samedi 02 août 2014 23:48:54, Andrea Peri a écrit : Hi, I have transform many old tiff+tfw rasters using this gdal transformation: gdal_translate -ot Byte -of GTiff -b 1 -a_nodata none -stats -co COMPRESS=NONE -co INTERLEAVE=PIXEL -co PROFILE=GDALGeoTIFF -co TILED=YES -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 -co SPARSE_OK=TRUE -co TFW=NO filein.tif fileout.tif They are wrking correctly with qgis and with mapserver for several months. Now I need to use this geotiffs with another program. But this program say that these images are not realy GeoTiffs. I test them using listgeos and have this result: TIFFReadDirectory: Warning, Unknown field with tag 42112 (0xa480) encountered. Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): 000 559417.4456374927786.430528 0 ModelPixelScaleTag (1,3): 0.5 0.5 0 End_Of_Tags. Keyed_Information: End_Of_Keys. End_Of_Geotiff. Some people say me that this is not a true geotiff because are missing several tags. I reported a supposed response from a real geotiff: Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): 0 0 0 6733474298291 0 ModelPixelScaleTag (1,3): 1 1 1 End_Of_Tags. Keyed_Information: GTModelTypeGeoKey (Short,1): ModelTypeProjected GTRasterTypeGeoKey (Short,1): RasterPixelIsArea GTCitationGeoKey (Ascii,37): NAIP 2012 m_3808409_sw_16_1_20120607 ProjectedCSTypeGeoKey (Short,1): PCS_NAD83_UTM_zone_16N PCSCitationGeoKey (Ascii,21): NAD83 / UTM zone 16N ProjLinearUnitsGeoKey (Short,1): Linear_Meter End_Of_Keys. End_Of_Geotiff. PCS = 26916 (NAD83 / UTM zone 16N) Projection = 16016 (UTM zone 16N) Projection Method: CT_TransverseMercator ProjNatOriginLatGeoKey: 0.00 ( 0d 0' 0.00N) ProjNatOriginLongGeoKey: -87.00 ( 87d 0' 0.00W) ProjScaleAtNatOriginGeoKey: 0.999600 ProjFalseEastingGeoKey: 50.00 m ProjFalseNorthingGeoKey: 0.00 m GCS: 4269/NAD83 Datum: 6269/North American Datum 1983 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31) Prime Meridian: 8901/Greenwich (0.00/ 0d 0' 0.00E) Projection Linear Units: 9001/metre (1.00m) Corner Coordinates: Upper Left( 673347.000, 4298291.000) ( 85d 0'12.06W, 38d48'58.87N) Lower Left( 673347.000, 4290632.000) ( 85d 0'18.99W, 38d44'50.54N) Upper Right ( 679532.000, 4298291.000) ( 84d55'55.75W, 38d48'54.41N) Lower Right ( 679532.000, 4290632.000) ( 84d56' 2.92W, 38d44'46.10N) Center( 676439.500, 4294461.500) ( 84d58' 7.43W, 38d46'52.50N) - I'm a bit confused. Because I have produced my GeoTiffs using gdal. And if it fail to produce a real geotiff I have a trouble. So the main question is a geotiff ith only the tags reported a real geotiff ? Andrea, The difference between the 2 geotiff is that the first one does not have information on the spatial reference system, but only the geotransform that comes from the .tfw file. Skimming quickly through the GeoTIFF specification ( http://www.remotesensing.org/geotiff/spec/contents.html ) doesn't immediately show if it is valid or not, although it would be best if readers are robust to missing information. If you know the SRS of the maps, you can try adding -a_srs EPSG: or -a_srs wkt_string. You could also try -a_srs LOCAL_CS[\Unknown\] if you don't know the SRS at all. This will write a few geotiff keys to define a unknown CRS, but it is not obvious that your reader will like it. Even -- Geospatial professional services http://even.rouault.free.fr/services.html ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Need some info on geotiff tags missing
thx Even for explanation. Also I see the real important for some software is the presence of this section: Keyed_Information: GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint End_Of_Keys. It can have two possibl values: RasterPixelIsPoint or RasterPixelIsArea Seem that without a value for GTRasterTypeGeoKey some software don't work. Is possible configure gdal to add this values when converting a tif+tfw to a geotiff ? Andrea. 2014-08-03 10:49 GMT+02:00 Even Rouault even.roua...@mines-paris.org: Le samedi 02 août 2014 23:48:54, Andrea Peri a écrit : Hi, I have transform many old tiff+tfw rasters using this gdal transformation: gdal_translate -ot Byte -of GTiff -b 1 -a_nodata none -stats -co COMPRESS=NONE -co INTERLEAVE=PIXEL -co PROFILE=GDALGeoTIFF -co TILED=YES -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 -co SPARSE_OK=TRUE -co TFW=NO filein.tif fileout.tif They are wrking correctly with qgis and with mapserver for several months. Now I need to use this geotiffs with another program. But this program say that these images are not realy GeoTiffs. I test them using listgeos and have this result: TIFFReadDirectory: Warning, Unknown field with tag 42112 (0xa480) encountered. Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): 000 559417.4456374927786.430528 0 ModelPixelScaleTag (1,3): 0.5 0.5 0 End_Of_Tags. Keyed_Information: End_Of_Keys. End_Of_Geotiff. Some people say me that this is not a true geotiff because are missing several tags. I reported a supposed response from a real geotiff: Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): 0 0 0 6733474298291 0 ModelPixelScaleTag (1,3): 1 1 1 End_Of_Tags. Keyed_Information: GTModelTypeGeoKey (Short,1): ModelTypeProjected GTRasterTypeGeoKey (Short,1): RasterPixelIsArea GTCitationGeoKey (Ascii,37): NAIP 2012 m_3808409_sw_16_1_20120607 ProjectedCSTypeGeoKey (Short,1): PCS_NAD83_UTM_zone_16N PCSCitationGeoKey (Ascii,21): NAD83 / UTM zone 16N ProjLinearUnitsGeoKey (Short,1): Linear_Meter End_Of_Keys. End_Of_Geotiff. PCS = 26916 (NAD83 / UTM zone 16N) Projection = 16016 (UTM zone 16N) Projection Method: CT_TransverseMercator ProjNatOriginLatGeoKey: 0.00 ( 0d 0' 0.00N) ProjNatOriginLongGeoKey: -87.00 ( 87d 0' 0.00W) ProjScaleAtNatOriginGeoKey: 0.999600 ProjFalseEastingGeoKey: 50.00 m ProjFalseNorthingGeoKey: 0.00 m GCS: 4269/NAD83 Datum: 6269/North American Datum 1983 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31) Prime Meridian: 8901/Greenwich (0.00/ 0d 0' 0.00E) Projection Linear Units: 9001/metre (1.00m) Corner Coordinates: Upper Left( 673347.000, 4298291.000) ( 85d 0'12.06W, 38d48'58.87N) Lower Left( 673347.000, 4290632.000) ( 85d 0'18.99W, 38d44'50.54N) Upper Right ( 679532.000, 4298291.000) ( 84d55'55.75W, 38d48'54.41N) Lower Right ( 679532.000, 4290632.000) ( 84d56' 2.92W, 38d44'46.10N) Center( 676439.500, 4294461.500) ( 84d58' 7.43W, 38d46'52.50N) - I'm a bit confused. Because I have produced my GeoTiffs using gdal. And if it fail to produce a real geotiff I have a trouble. So the main question is a geotiff ith only the tags reported a real geotiff ? Andrea, The difference between the 2 geotiff is that the first one does not have information on the spatial reference system, but only the geotransform that comes from the .tfw file. Skimming quickly through the GeoTIFF specification ( http://www.remotesensing.org/geotiff/spec/contents.html ) doesn't immediately show if it is valid or not, although it would be best if readers are robust to missing information. If you know the SRS of the maps, you can try adding -a_srs EPSG: or -a_srs wkt_string. You could also try -a_srs LOCAL_CS[\Unknown\] if you don't know the SRS at all. This will write a few geotiff keys to define a unknown CRS, but it is not obvious that your reader will like it. Even -- Geospatial professional services http://even.rouault.free.fr/services.html -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Need some info on geotiff tags missing
Le dimanche 03 août 2014 12:24:29, Andrea Peri a écrit : thx Even for explanation. Also I see the real important for some software is the presence of this section: Keyed_Information: GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint End_Of_Keys. It can have two possibl values: RasterPixelIsPoint or RasterPixelIsArea Seem that without a value for GTRasterTypeGeoKey some software don't work. Is possible configure gdal to add this values when converting a tif+tfw to a geotiff Andrea, If you try what I suggested ( adding -a_srs LOCAL_CS[\Unknown\] to gdal_translate command line), you will get : $ listgeo out.tif Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): [ something ] ModelPixelScaleTag (1,3): [ something ] End_Of_Tags. Keyed_Information: GTRasterTypeGeoKey (Short,1): RasterPixelIsArea GTCitationGeoKey (Ascii,8): Unknown GeogAngularUnitsGeoKey (Short,1): Angular_Degree ProjLinearUnitsGeoKey (Short,1): Linear_Meter End_Of_Keys. End_Of_Geotiff. Projection Linear Units: 9001/metre (1.00m) Corner Coordinates: [ something ] You can control RasterPixelIsPoint or RasterPixelIsArea by adding -mo AREA_OR_POINT=Area or -mo AREA_OR_POINT=Point to the gdal_translate command line. The default is Area. Even ? Andrea. 2014-08-03 10:49 GMT+02:00 Even Rouault even.roua...@mines-paris.org: Le samedi 02 août 2014 23:48:54, Andrea Peri a écrit : Hi, I have transform many old tiff+tfw rasters using this gdal transformation: gdal_translate -ot Byte -of GTiff -b 1 -a_nodata none -stats -co COMPRESS=NONE -co INTERLEAVE=PIXEL -co PROFILE=GDALGeoTIFF -co TILED=YES -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 -co SPARSE_OK=TRUE -co TFW=NO filein.tif fileout.tif They are wrking correctly with qgis and with mapserver for several months. Now I need to use this geotiffs with another program. But this program say that these images are not realy GeoTiffs. I test them using listgeos and have this result: TIFFReadDirectory: Warning, Unknown field with tag 42112 (0xa480) encountered. Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): 000 559417.4456374927786.430528 0 ModelPixelScaleTag (1,3): 0.5 0.5 0 End_Of_Tags. Keyed_Information: End_Of_Keys. End_Of_Geotiff. Some people say me that this is not a true geotiff because are missing several tags. I reported a supposed response from a real geotiff: Geotiff_Information: Version: 1 Key_Revision: 1.0 Tagged_Information: ModelTiepointTag (2,3): 0 0 0 6733474298291 0 ModelPixelScaleTag (1,3): 1 1 1 End_Of_Tags. Keyed_Information: GTModelTypeGeoKey (Short,1): ModelTypeProjected GTRasterTypeGeoKey (Short,1): RasterPixelIsArea GTCitationGeoKey (Ascii,37): NAIP 2012 m_3808409_sw_16_1_20120607 ProjectedCSTypeGeoKey (Short,1): PCS_NAD83_UTM_zone_16N PCSCitationGeoKey (Ascii,21): NAD83 / UTM zone 16N ProjLinearUnitsGeoKey (Short,1): Linear_Meter End_Of_Keys. End_Of_Geotiff. PCS = 26916 (NAD83 / UTM zone 16N) Projection = 16016 (UTM zone 16N) Projection Method: CT_TransverseMercator ProjNatOriginLatGeoKey: 0.00 ( 0d 0' 0.00N) ProjNatOriginLongGeoKey: -87.00 ( 87d 0' 0.00W) ProjScaleAtNatOriginGeoKey: 0.999600 ProjFalseEastingGeoKey: 50.00 m ProjFalseNorthingGeoKey: 0.00 m GCS: 4269/NAD83 Datum: 6269/North American Datum 1983 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31) Prime Meridian: 8901/Greenwich (0.00/ 0d 0' 0.00E) Projection Linear Units: 9001/metre (1.00m) Corner Coordinates: Upper Left( 673347.000, 4298291.000) ( 85d 0'12.06W, 38d48'58.87N) Lower Left( 673347.000, 4290632.000) ( 85d 0'18.99W, 38d44'50.54N) Upper Right ( 679532.000, 4298291.000) ( 84d55'55.75W, 38d48'54.41N) Lower Right ( 679532.000, 4290632.000) ( 84d56' 2.92W, 38d44'46.10N) Center( 676439.500, 4294461.500) ( 84d58' 7.43W, 38d46'52.50N) - I'm a bit confused. Because I have produced my GeoTiffs using gdal. And if it fail to produce a real geotiff I have a trouble. So the main question is a geotiff ith only the tags reported a real geotiff ? Andrea, The difference between the 2 geotiff is that the first one does not have information on the spatial reference system,