resample: tiled images are not supported

#1
Hello everybody!

I have again a small problem with the resample.exe...
I want to make a mesh. For that I have many SRTM-tifs with the elevation data.
These are not modified, just converted from the .bil to the .tif-format by using ArcPy.

First my (test) .inf-file:
Code:
[Destination]
DestDir = "C:\Users\mknue\Desktop\Mesh\bgl"
DestBaseFileName = "mesh_test_1"
DestFileType = BGL
LOD = 12
FractionBits=2

[Source]
Type = MultiSource
NumberOfSources = 3

[Source0]
Type = GeoTIFF
Layer = Elevation
SourceDir = "C:\Users\mknue\Desktop\Mesh\tif"
SourceFile = s22_e014_1arc_v3.tif
nCols = 3601
nRows = 3601
xDim = 0.000277777777777778
yDim = 0.000277777777777778

[Source1]
Type = GeoTIFF
Layer = Elevation
SourceDir = "C:\Users\mknue\Desktop\Mesh\tif"
SourceFile = s22_e015_1arc_v3.tif
nCols = 3601
nRows = 3601
xDim = 0.000277777777777778
yDim = 0.000277777777777778

[Source2]
Type = GeoTIFF
Layer = Elevation
SourceDir = "C:\Users\mknue\Desktop\Mesh\tif"
SourceFile = s23_e014_1arc_v3.tif
nCols = 3601
nRows = 3601
xDim = 0.000277777777777778
yDim = 0.000277777777777778
But when I try to resample it, I am getting the following error:
Code:
C:\Users\mknue\Desktop\Mesh>resample createMesh.inf
Lockheed Martin(R) api_strings 4.4.16.27106
(C) Lockheed Martin. All rights reserved.

Resample Info File: 'createMesh.inf'
[Source] Type = 'MultiSource'
[Source] NumberOfSources = 3
[Source1] Type = 'GeoTIFF'
[Source1] SourceDir = 'C:\Users\mknue\Desktop\Mesh\tif'
[Source1] SourceFile = 's22_e015_1arc_v3.tif'
[Source1] Layer = 'Elevation'
[Source1] NCOLS = 3601
[Source1] NROWS = 3601
[Source1] XDIM = 0.000278
[Source1] YDIM = 0.000278
TIFFReadDirectory: Warning, C:\Users\mknue\Desktop\Mesh\tif\s22_e015_1arc_v3.tif: unknown field with tag 42112 (0xa480) encountered.
TIFFReadDirectory: Warning, C:\Users\mknue\Desktop\Mesh\tif\s22_e015_1arc_v3.tif: unknown field with tag 42113 (0xa481) encountered.
GeoTIFF: Tiled images are not supported.
Unable to open data source 'C:\Users\mknue\Desktop\Mesh\tif\s22_e015_1arc_v3.tif'.
Failed to create data source.
The two warnings I get, I can neglect as much as I know.
But the message "Tiled images are not supported" bothers me, especially because I don't know what to do to fix it...
The spatial reference is the GCS WGS 84, so there should be also no problem.
(As far as I can tell, the tifs aren't tiled either.)

Does anyone have any idea how to get resample.exe to run anyway?

Thank you very much as always in advance!
 
Last edited:

rhumbaflappy

Moderator
Staff member
Resource contributor
#2
It looks like the geotiffs are tiled images. That's a geotiff type of format. You should be able to 'untile' them by loading into gdal or QGIS or another program and re-exporting them as a simple LZW compressed geotiff.

Dick
 
#3
Hello:

IMHO, both the SRTM 1-Arc Second (30 Meter) v3 GeoTIFF (*.TIF) elevation data files and their (required) accompanying GeoTIFF "world" files (*.TFW) are best downloaded from one of the 'offical' USA servers.

IIUC, the above example *.INF source file names were from a Chinese server ? :scratchch

I recommend the 'official' USA server data instead of the questionable Chinese University "imaged" < yet edited ? :alert: > server data (found online via Google by searching for one of the file names in the OP example *.INF code above).

The reason for that recommendations because the 'official' USA server data for SRTM 1-Arc Second (30 Meter) v3 GeoTIFF (*.TIF) elevation data files and their (required) accompanying GeoTIFF "world" files (*.TFW) which I am familiar with ...meet the following criteria:

* 'official' USA server data is already in a GIS cartographic format required by SDK Resample

* 'official' USA server does not require re-projection or other conversion

* 'official' USA server data can be used via a simple *.INF


If the OP has not already done so, IMHO, he could register at USGS and download the tiles from the EarthExplorer GIS portal via a login session.


Alternatively, he can even more simply utilize the FSX / P3D compatible terrain mesh BGL files available by Torrent peer-to-peer download from FREEMESHX.

FYI: Rather than attempting to create your own custom terrain mesh BGLs, you instead can utilize a 'ready-to-use', free to download, SRTM elevation raster-derived, 1-Arc Second resolution (38.2 Meter / LOD-10 SDK Resample output) terrain mesh BGLs here:

FreeMeshX

http://ninetwopro.com/freemeshx/

http://ninetwopro.com/freemeshx/bit-torrent-download-links/

Use u-Torrent as a peer-to-peer Torrent download application, to pick only the files you want for your local project Geographic coverage area from the big FreeMeshX "Global" torrent file.


GaryGB
 
Last edited:
#4
Yes, I HAVE a account at USGS.
The data IS downloaded from USGS with the official bulk downloader tool.

I also know, that there is the FreeMeshX, but that's not enough for my purpose. So I am creating the mesh on my own.

I also know all these advantages of official sources, and I AM using official sources. But the bulk download allows only the download of .bil files.
I am using the downloader, because I need more than 100 scenes.

There just seems to be an problem by exporting the raster files with ArcPy. And I am not sure how to solve this...

PS: I don't know, which data is provided on Chinese Server. The data I downloaded from USGS comes as .bil. With ArcPy I converted it to .tif. That's all I have done for now, now I just have to get it to compile with resample.exe
 
Last edited:
#5
Should your numbering of Source not start with "1" instead of "0" ?

Code:
[Source]
Type = MultiSource
NumberOfSources = 3

[Source1]
Type = GeoTIFF
...
...
Your numbering schema is the real problem not the TIF-files!:banghead:

Kind regards from Switzerland

Conrad
 
Last edited:
#6
Should your numbering of Source not start with "1" instead of "0" ?

Code:
[Source]
Type = MultiSource
NumberOfSources = 3

[Source1]
Type = GeoTIFF
...
...
Your numbering schema is the real problem not the TIF-files!:banghead:

Kind regards from Switzerland

Conrad
Hi Conrad:

Please scroll through all of the OP's top-most CODE entries in his first post above.

It appears he did actually have 3 sources in his *.INF. ;)


IIUC, his second CODE entries in his first post above shows the Resample errors (...only a partial excerpt copied from his command mode session console text output by Resample). :scratchch

GaryGB
 
#7
Hi Matthias:

My apologies for the filename-based inference regarding the 'possible' server source for your SRTM files cited above.


While I suggest that use of the 1-Arc Second SRTM GeoTIFFs from the EarthExplorer site would be easier, if you post the metadata for the original SRTM *.BIL files you cited above that you downloaded via the "USGS Bulk Downloader", we can further advise you on how to process those *.BIL files .

NOTE: Depending on the GIS projection of the *.BIL files in question, SDK Resample may accept *.BIL file format as elevation source data:

https://docs.microsoft.com/en-us/pr...ft-esp/cc707102(v=msdn.10)#the-terrain-system

GaryGB
 
#8
Good morning, thank you for your answer!

Of course I can give you all the metadata to the scenes I have...
Code:
Identification_Information:  
  Citation:  
    Citation_Information:  
      Originator:  U.S. Geological Survey (USGS)
      Originator:  National Geospatial-Intelligence Agency (NGA)
      Originator:  National Aeronautics and Space Administration (NASA)
      Publication_Date:  
      Title:  Shuttle Radar Topography Mission 1 Arc-Second Global: SRTM1S22E014V3
      Geospatial_Data_Presentation_Form:   Elevation Data in Raster Format
      Series_Information:  
        Series_Name:  SRTM 1 Arc-Second Global
        Issue_Identification:  Digital Elevation Data
      Publication_Information:  
        Publication_Place:  Sioux Falls, South Dakota
        Publisher:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
      Online_Linkage:  https://lta.cr.usgs.gov/SRTM1Arc
  Description:  
    Abstract:  The Shuttle Radar Topography Mission (SRTM) was a partnership between NASA and the National Geospatial-Intelligence Agency (NGA). Flown aboard the NASA Space Shuttle Endeavour (11-22 February 2000), SRTM fulfilled its mission to map the world in three dimensions.  The USGS is under agreement with NGA and NASA's Jet Propulsion Laboratory to distribute SRTM elevation products derived from the C-band radar data.  SRTM utilized interferometric C-band Spaceborne Imaging Radar to generate elevation data over 80 percent of the Earth's land surface. 
 
Global SRTM data at a resolution of 1 arc-second  have been edited to delineate and flatten water bodies, better define coastlines, remove spikes and wells, and fill small voids.  Larger areas of missing data or voids were filled by the NGA  using interpolation algorithms in conjunction with other sources of elevation data.  The SRTM 1 Arc-Second Global data offer worldwide coverage of void filled data at a resolution of 1 arc-second (30 meters) and provide open distribution of this high-resolution global data set.  




    Purpose:  SRTM elevation data of the Earth's land surface are available with data points posted every 1 arc second for global coverage. 


    Supplemental_Information:  Gobal coverage is between 60 degrees North and 56 degrees South latitude.
Raster size is 1 degree tiles.  The data are expressed in geographic coordinates (latitude/longitude) and is horizontally referenced to WGS84 and vertically referenced to EGM96 Geoid.
Formats:
1. DTED - Digital Terrain Elevation Data is a standard mapping format designed by the NGA. Each file or cell contains a matrix of vertical elevation values spaced at regular horizontal intervals measured in geographic latitude and longitude units. DTED is a trademark of NGA.

2. BIL - Band interleaved by line is a simple binary raster format with accompanying ASCII descriptor files. The BIL integer format is recommended for software packages that do not support floating-point data. 

3. GeoTIFF - Georeferenced Tagged Image File Format is a TIFF file with embedded geographic information. This is standard image format for GIS applications.
  Time_Period_of_Content:  
    Time_Period_Information:  
       
        Single_Date/Time:  
          Calendar_Date:  11-FEB-00
    Currentness_Reference:  Ground Condition
  Status:  
    Progress:  In Work
    Maintenance_and_Update_Frequency:  As Needed
  Spatial_Domain:  
    Data_Set_G-Polygon:  
      Data_Set_G-Polygon_Outer_G-Ring:  
         
          G-Ring_Latitude:  -21
          G-Ring_Longitude:  14
         
          G-Ring_Latitude:  -21
          G-Ring_Longitude:  15
         
          G-Ring_Latitude:  -22
          G-Ring_Longitude:  15
         
          G-Ring_Latitude:  -22
          G-Ring_Longitude:  
  Keywords:  
    Theme:  
       
        Theme_Keyword_Thesaurus:  None
        Theme_Keyword:  30 meter
        Theme_Keyword:  Global
        Theme_Keyword:  Shuttle Radar Topography Mission (SRTM)
        Theme_Keyword:  National Geospatial-Intelligence Agency (NGA)
        Theme_Keyword:  National Aeronautics and Space Administration (NASA
        Theme_Keyword:  Digital Terrain Elevation Data (DTED)
        Theme_Keyword:  Imaging Radar
        Theme_Keyword:  Topography
        Theme_Keyword:  Mapping
        Theme_Keyword:  Elevation
        Theme_Keyword:  C-band
    Place:  
       
        Place_Keyword_Thesaurus:  U.S. Department of Commerce, 1995, Countries, dependencies, areas of special sovereignty, and their principal administrative divisions, Federal Information Processing Standard 10-4,): Washington, D.C., National Institute of Standards and Technology
        Place_Keyword:  Global
  Access_Constraints:  Any downloading and use of these data signifies a user's agreement to comprehension and compliance of the USGS Standard Disclaimer.  Insure all portions of metadata are read and clearly understood before using these data in order to protect both user and USGS interests.
  Use_Constraints:  There is no guarantee of warranty concerning the accuracy of these data.  Users should be aware that temporal changes may have occurred since the data was collected and that some parts of these data may no longer represent actual surface conditions.  Users should not use these data for critical applications without a full awareness of their limitations.  Acknowledgement of NASA, NGA and the USGS would be appreciated in products derived from these data.  Any user who modifies the data set is obligated to describe the types of modifications they perform.  User specifically agrees not to misrepresent the data set, nor to imply that changes made were approved or endorsed by the originating agencies.  Please refer to http://www.usgs.gov/privacy.html for the USGS disclaimer.
  Point_of_Contact:  
    Contact_Information:  
       
        Contact_Person_Primary:  
          Contact_Person:  custserv@usgs.gov
          Contact_Organization:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
        Contact_Organization_Primary:  
          Contact_Organization:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
          Contact_Person:  custserv@usgs.gov
      Contact_Position:  Customer Service Representative
      Contact_Address:  
        Address_Type:  Mailing and Physical Address
        Address:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center 47914 252nd Street
        City:  Sioux Falls
        State_or_Province:  SD
        Postal_Code:  57198-0001
        Country:  USA
      Contact_Electronic_Mail_Address:  custserv@usgs.gov
      Hours_of_Service:  0800 - 1600 CT, M-F, -6 h GMT
      Contact_Instructions:  custserv@usgs.gov
  Browse_Graphic:  
    Browse_Graphic_File_Name:  browse graphic for:http://earthexplorer.usgs.gov/browse/srtm_v3/1arc/e014/s22_e014_1arc_v3.jpg
    Browse_Graphic_File_Description:  This is a compressed and resampled version of the data set of interest to help validate area of interest, data quality, and the impact of cloud cover, if it exists.
    Browse_Graphic_File_Type:  JPEG
  Security_Information:  
    Security_Classification_System:  None
    Security_Classification:  Unclassified
    Security_Handling_Description:  None
  Native_Data_Set_Environment:  Oracle
Data_Quality_Information:  
  Attribute_Accuracy:  
    Attribute_Accuracy_Report:  The SRTM data meet the absolute horizontal and vertical accuracies of 20 meters (circular error at 90% confidence) and 16 meters (linear error at 90% confidence), respectively, as specified for the mission.
  Logical_Consistency_Report:  None
  Completeness_Report:  Unknown
  Lineage:  
    Process_Step:  
      Process_Description:  This image collection was produced under strict military guidelines and initially used to produce maps and charts, providing stereo-optical coverage of selected areas, for the U.S. Department of Defense.
      Process_Contact:  
        Contact_Information:  
           
Contact_Person_Primary:  
Contact_Person:  custserv@usgs.gov
Contact_Organization:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
Contact_Organization_Primary:  
Contact_Organization:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
Contact_Person:  custserv@usgs.gov
          Contact_Position:  Customer Service Representative
          Contact_Address:  
Address_Type:  Mailing and Physical Address
Address:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center 47914 252nd Street
City:  Sioux Falls
State_or_Province:  SD
Postal_Code:  57198-0001
Country:  USA
          Contact_Electronic_Mail_Address:  custserv@usgs.gov
          Hours_of_Service:  0800 - 1600 CT, M-F, -6 h GMT
          Contact_Instructions:  custserv@usgs.gov
Spatial_Data_Organization_Information:  
   
    Direct_Spatial_Reference_Method:  Raster
Distribution_Information:  
   
    Distributor:  
      Contact_Information:  
         
          Contact_Person_Primary:  
Contact_Person:  custserv@usgs.gov
Contact_Organization:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
          Contact_Organization_Primary:  
Contact_Organization:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
Contact_Person:  custserv@usgs.gov
        Contact_Position:  Customer Service Representative
        Contact_Address:  
          Address_Type:  Mailing and Physical Address
          Address:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center 47914 252nd Street
          City:  Sioux Falls
          State_or_Province:  SD
          Postal_Code:  57198-0001
          Country:  USA
        Contact_Electronic_Mail_Address:  custserv@usgs.gov
        Hours_of_Service:  0800 - 1600 CT, M-F,   -6 h GMT
        Contact_Instructions:  custserv@usgs.gov
    Distribution_Liability:  Although these data have been processed successfully on a computer system at the U.S. Geological Survey, no warranty expressed or implied is made by the USGS regarding the use of the data on any other system, nor does the act of distribution constitute any such warranty.  
    Standard_Order_Process:  
       
        Digital_Form:  
          Digital_Transfer_Information:  
Format_Name:  DTED, BIL, or GeoTIFF
          Digital_Transfer_Option:  
 
Online_Option:  
Computer_Contact_Information:  
 
Network_Address:  
Network_Resource_Name:  http://earthexplorer.usgs.gov
      Fees:  SRTM data are available from the USGS EROS Center at no cost to the user. 
      Ordering_Instructions:  SRTM products are available via download through EarthExplorer (http://earthexplorer.usgs.gov).
      Turnaround:  The Global SRTM 1 Arc-Second (30 meters) data set will be released in phases. Users should check the coverage map in EarthExplorer to verify if their area of interest is available.  Existing data are available for immediate download.
    Technical_Prerequisites:  SRTM data are intended for scientific use with Geographic Information System (GIS) or other special application software that is compatible with the DTED, BIL, or GeoTIFF format.
Metadata_Reference_Information:  
   
    Metadata_Review_Date:  As Needed
  Metadata_Contact:  
    Contact_Information:  
       
        Contact_Person_Primary:  
          Contact_Person:  custserv@usgs.gov
          Contact_Organization:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
        Contact_Organization_Primary:  
          Contact_Organization:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center
          Contact_Person:  custserv@usgs.gov
      Contact_Position:  Customer Service Representative
      Contact_Address:  
        Address_Type:  Mailing and Physical Address
        Address:  U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center 47914 252nd Street
        City:  Sioux Falls
        State_or_Province:  South Dakota
        Postal_Code:  57198-0001
        Country:  USA
      Contact_Electronic_Mail_Address:  custserv@usgs.gov
      Hours_of_Service:  0800 - 1600 CT, M-F, -6 h GMT
      Contact_Instructions:  custserv@usgs.gov
  Metadata_Standard_Name:  Content Standard for Digital Geospatial Metadata
  Metadata_Standard_Version:  FGDC-STD-001-1998, Version 2
  Metadata_Time_Convention:  Local Time
  Metadata_Access_Constraints:  None
  Metadata_Use_Constraints:  None
  Metadata_Security_Information:  
    Metadata_Security_Classification_System:  None
    Metadata_Security_Classification:  Unclassified
    Metadata_Security_Handling_Description:  None

Entity ID SRTM1S22E014V3
Acquisition Date 11-FEB-00
Publication Date 23-SEP-14
Resolution 1-ARC
Date Updated
NW Corner Lat 21°00'00.00"
SNW Corner Long 14°00'00.00"
ENE Corner Lat 21°00'00.00"
SNE Corner Long 15°00'00.00"
ESE Corner Lat 22°00'00.00"
SSE Corner Long 15°00'00.00"
ESW Corner Lat 22°00'00.00"
SSW Corner Long 14°00'00.00"
ENW Corner Lat dec -21
NW Corner Long dec 14
NE Corner Lat dec -21
NE Corner Long dec 15
SE Corner Lat dec -22
SE Corner Long dec 15
SW Corner Lat dec -22
SW Corner Long dec 14
And the prj-file:
Code:
Projection    GEOGRAPHIC                                                        
Datum         WGS84                                                             
Zunits        METERS                                                            
Units         DD                                                                
Spheroid      WGS84                                                             
Xshift        0.0000000000                                                      
Yshift        0.0000000000                                                      
Parameters
 
#10
Just as a reminder, an excerpt from the Terrain SDK Resample-tool description:

[Source] section
It is possible to define more than one source image in a single .inf file. This is extremely useful when working with imagery that has seasonal and night time variations. To define multiple source images, set the value of the [Source] Type directive to MultiSource. Then add a NumberOfSource directive whose value is the number of source images you want to define. Finally, add additional sections with names like [Source1], [Source2], and so on that contain the source directives for each of the individual source Images.

This has been a common source of Errors going through the FSDeveloper Forum for many many years by People not correctly specifying the sequencing.

Kind regards from Switzerland

Conrad
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#11
Hi Matthias.

Thanks for posting. We all learned something new about geotiff formats... tiled data is not allowed by resample. :)
 
#12
Just as a reminder, an excerpt from the Terrain SDK Resample-tool description:

[Source] section
It is possible to define more than one source image in a single .inf file. This is extremely useful when working with imagery that has seasonal and night time variations. To define multiple source images, set the value of the [Source] Type directive to MultiSource. Then add a NumberOfSource directive whose value is the number of source images you want to define. Finally, add additional sections with names like [Source1], [Source2], and so on that contain the source directives for each of the individual source Images.

This has been a common source of Errors going through the FSDeveloper Forum for many many years by People not correctly specifying the sequencing.

Kind regards from Switzerland

Conrad
Yes, you are right, that's a mistake i make every time :D

Hi Matthias.

Thanks for posting. We all learned something new about geotiff formats... tiled data is not allowed by resample. :)
Indeed... Ehm... The resample.exe was probably right with the error message...
 
#13
It has been a dozen years since FSX was released, and working with SDK Resample continues to be a source of new info. :scratchch

Interestingly, many 'legacy' functions / parameter terms / values are still present in- and honored as valid by- SDK Resample. :pushpin:


Here's a "re-sample" from an older thread, of some fascinating info otherwise 'hidden' inside SDK Resample.exe: :santahat:

https://www.fsdeveloper.com/forum/threads/what-does-resample-exe-do.436204/post-733113

https://www.fsdeveloper.com/forum/threads/what-does-resample-exe-do.436204/post-733115

GaryGB
 
Last edited:
#15
Hi again:

I just saw this info on "tiled Raster" data while reviewing a different- but frequently used- USGS ERDAS *.IMG GIS file format criteria, which underscores the importance of converting ones original data into a file format compatible with SDK Resample:

"ERDAS IMAGINE software uses a tiled format to store raster layers. The tiled format allows raster layers to be displayed and resampled quickly. The default tile size used to be 64 pixels by 64 pixels, but now appears to be 512 pixels by 512 pixels. Within a tile, raster data uses the BSQ_enc ordering for pixels. Optionally, a large raster layer may be organized in a "pyramid" for faster processing. In pyramid layers, reduced, subsampled raster layers are created from the original raster layer.


ERDAS_IMG is based on a Hierarchical File Format (HFA) structure. Many of the items that can be included are optional. In addition, because of the open nature of the HFA format, developers may create and add new types of items to the file. Raster layers may be compressed using a variant of Run Length Encoding known as Dynamic Range Run Length Encoding."


This is one of the details which one must deal with through a careful selection of features / functions in one's GIS application.

Thankfully, some GIS commercial software (ex: Global Mapper) may perform many such functions (semi-) automatically. ;)


Generally speaking one must merge all source tiles into a 1-piece Raster image, then re-project that 1-piece into a ex: GeoTIFF. :pushpin:


GaryGB
 
#16
You're right, a good GIS software is really worth its money.
Both ERDAS and ArcGIS (or Global Mapper, which I don't work with) are really great.
Unfortunately I haven't yet found a price for ERDAS that would be affordable for a student...
Do I always have to use ERDAS at university... :D
 
Top