<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://www.fsdeveloper.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nz255</id>
	<title>FSDeveloper Wiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="http://www.fsdeveloper.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nz255"/>
	<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php/Special:Contributions/Nz255"/>
	<updated>2026-05-13T15:33:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GeoTIFF_file_creation_with_GDAL&amp;diff=7775</id>
		<title>GeoTIFF file creation with GDAL</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GeoTIFF_file_creation_with_GDAL&amp;diff=7775"/>
		<updated>2010-08-03T11:45:17Z</updated>

		<summary type="html">&lt;p&gt;Nz255: /* Copying tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
Now that the FsX resample tool can also read GeoTIFF files, it has become very interesting to use these for your photo scenery. The main advantage of using GeoTIFF files is that they contain the placement information of your photo, so that means you don&#039;t have to specify all those numbers in the INF file.&lt;br /&gt;
&lt;br /&gt;
But what do you do when you don&#039;t have your images in the GeoTIFF format? Or when you have images that are not in the WGS84 projection required by resample? In those cases you need some tools to create the correct GeoTIFF files for you.&lt;br /&gt;
&lt;br /&gt;
In this article I will describe how you can use the [http://fwtools.maptools.org/ FwTools] toolkit to perform such tasks. Of course there will also be other tools that can do such tasks for you. But I choose to write about FwTools as I am familiar with these tools from work. And another advantage is that FwTools is an open source project, so you can use the software for free.&lt;br /&gt;
&lt;br /&gt;
==Starting the FwTools shell==&lt;br /&gt;
&lt;br /&gt;
After you have installed FwTools you can best start the &amp;quot;FwTools shell&amp;quot;. The installer should have placed a shortcut for this shell in your start menu. When you use this special shell, you are sure that the path is set correctly for all tools of the toolkit.&lt;br /&gt;
&lt;br /&gt;
A very useful command is the gdalinfo command. When you use this on your image file, it will show all the information stored in the file. So this allows you to see if some geo information is already stored in your image.&lt;br /&gt;
&lt;br /&gt;
  gdalinfo myfile.tif&lt;br /&gt;
&lt;br /&gt;
This is an example of the output you can get when using gdalinfo on your image file:&lt;br /&gt;
&lt;br /&gt;
  Driver: GTiff/GeoTIFF&lt;br /&gt;
  Size is 1600, 1200&lt;br /&gt;
  Coordinate System is:&lt;br /&gt;
  GEOGCS[&amp;quot;WGS 84&amp;quot;,&lt;br /&gt;
      DATUM[&amp;quot;WGS_1984&amp;quot;,&lt;br /&gt;
          SPHEROID[&amp;quot;WGS 84&amp;quot;,6378137,298.2572235630016,&lt;br /&gt;
              AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;7030&amp;quot;]],&lt;br /&gt;
          AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;6326&amp;quot;]],&lt;br /&gt;
      PRIMEM[&amp;quot;Greenwich&amp;quot;,0],&lt;br /&gt;
      UNIT[&amp;quot;degree&amp;quot;,0.0174532925199433],&lt;br /&gt;
      AUTHORITY[&amp;quot;EPSG&amp;quot;,&amp;quot;4326&amp;quot;]]&lt;br /&gt;
  Origin = (2.873697280883789,51.239551252582089)&lt;br /&gt;
  Pixel Size = (0.000042915344238,-0.000026909535546)&lt;br /&gt;
  Metadata:&lt;br /&gt;
    AREA_OR_POINT=Area&lt;br /&gt;
    TIFFTAG_SOFTWARE=Adobe Photoshop CS2 Windows&lt;br /&gt;
    TIFFTAG_DATETIME=2007:03:03 09:28:16&lt;br /&gt;
    TIFFTAG_XRESOLUTION=96&lt;br /&gt;
    TIFFTAG_YRESOLUTION=96&lt;br /&gt;
    TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)&lt;br /&gt;
  Corner Coordinates:&lt;br /&gt;
  Upper Left  (   2.8736973,  51.2395513) (  2d52&#039;25.31&amp;quot;E, 51d14&#039;22.38&amp;quot;N)&lt;br /&gt;
  Lower Left  (   2.8736973,  51.2072598) (  2d52&#039;25.31&amp;quot;E, 51d12&#039;26.14&amp;quot;N)&lt;br /&gt;
  Upper Right (   2.9423618,  51.2395513) (  2d56&#039;32.50&amp;quot;E, 51d14&#039;22.38&amp;quot;N)&lt;br /&gt;
  Lower Right (   2.9423618,  51.2072598) (  2d56&#039;32.50&amp;quot;E, 51d12&#039;26.14&amp;quot;N)&lt;br /&gt;
  Center      (   2.9080296,  51.2234055) (  2d54&#039;28.91&amp;quot;E, 51d13&#039;24.26&amp;quot;N)&lt;br /&gt;
  Band 1 Block=1600x5 Type=Byte, ColorInterp=Red&lt;br /&gt;
  Band 2 Block=1600x5 Type=Byte, ColorInterp=Green&lt;br /&gt;
  Band 3 Block=1600x5 Type=Byte, ColorInterp=Blue&lt;br /&gt;
&lt;br /&gt;
==Adding positional information to an image==&lt;br /&gt;
&lt;br /&gt;
One of the most common tasks will be to add position information to an image and thus creating a GeoTIFF file in that way. Let&#039;s assume you have the following information about your image:&lt;br /&gt;
&lt;br /&gt;
  [GEOGRAPHIC]&lt;br /&gt;
  North=51.2395125258209&lt;br /&gt;
  South=51.20725980992728&lt;br /&gt;
  West=2.873697280883789&lt;br /&gt;
  East=2.942361831665039&lt;br /&gt;
&lt;br /&gt;
To add this information to you image, you need to use the following command:&lt;br /&gt;
&lt;br /&gt;
  gdal_translate -a_srs &amp;quot;+proj=latlong +datum=WGS84&amp;quot; -of GTiff&lt;br /&gt;
    -co &amp;quot;INTERLEAVE=PIXEL&amp;quot; -a_ullr 2.873697280883789 51.23955125258209&lt;br /&gt;
    2.942361831665039 51.20725980992728 myfile.jpg myfile.tif&lt;br /&gt;
&lt;br /&gt;
The INTERLEAVE=PIXEL option is required to make the GeoTIFF in a format that resample can process. By default FwTools makes them in a band interleaved format, but resample can not read those.&lt;br /&gt;
&lt;br /&gt;
For the input image you can use many different formats, the GDAL tools can read most common image formats. For the output file we will select GeoTIFF of course in this case.&lt;br /&gt;
&lt;br /&gt;
==Reprojecting an image==&lt;br /&gt;
&lt;br /&gt;
But what to do if the image you have is not yet in the WGS84 projection that resample requires? Of course you can still use the gdal_translate command as shown before to add your positional information, but you need to add it in the projection system that your image uses. This could for example be UTM or some local projection system. This means that you need to specify a different projection after the -s_srs parameter.&lt;br /&gt;
&lt;br /&gt;
Once you have done that, you can reproject your image to the WGS84 projection. You need to use the gdalwarp tool for that:&lt;br /&gt;
&lt;br /&gt;
  gdalwarp  -of GTiff -co &amp;quot;INTERLEAVE=PIXEL&amp;quot;&lt;br /&gt;
    -s_srs &amp;quot;+proj=utm +zone=31 +datum=WGS84&amp;quot;&lt;br /&gt;
    -t_srs &amp;quot;+proj=latlong +datum=WGS84&amp;quot; -r cubic&lt;br /&gt;
    myfile.tif myfile_wgs84.tif&lt;br /&gt;
&lt;br /&gt;
For the source projection you need to enter the projection you used with the gdal_translate command. In this example I showed the projection string for a UTM projection, but of course you need to use the projection that matches your image. The target projection should be WGS84, as that is what resample requires.&lt;br /&gt;
&lt;br /&gt;
For the resampling I have specified that cubic sampling should be used. From the tests with all options I have done this one gives the best results, must better than the default near sampling.&lt;br /&gt;
&lt;br /&gt;
==Copying tags==&lt;br /&gt;
&lt;br /&gt;
Most programs that you can use to edit your imagery do not understand the geo related tags in the GeoTIFF file, so they will probably save your image back as a normal TIFF image. In that case you will have to insert the geo information again yourself. Of course you could provide the boundaries again as explained above, but you could also save the previous tags and just apply them again. To do this use the listgeo and geotifcp tools.&lt;br /&gt;
&lt;br /&gt;
First you will need to save the current geo tags to a file on your harddisk. To do that we will be using the listgeo tool:&lt;br /&gt;
&lt;br /&gt;
  listgeo myfile_wgs84.tif &amp;gt; myfile_wgs84.gtf&lt;br /&gt;
&lt;br /&gt;
The GTF file is just plain ASCII, so you can open it with your text editor and view the information.&lt;br /&gt;
&lt;br /&gt;
After you have edited your image in your painting program, all you have to do now is put the tags back into the TIFF file, so that it becomes a GeoTIFF again. We will use the geotiffcp tool for that:&lt;br /&gt;
&lt;br /&gt;
  geotifcp -g myfile_wgs84.gtf myfile_geotiff.tif myfile_edited.tif&lt;br /&gt;
&lt;br /&gt;
This will give you a new GeoTIFF file that can again be used by the resample tool to place your imagery in FS. So all you have to do before you start editing in your painting program is make sure yo have save the geo information to a GTF file, then you can always put it back later on.&lt;br /&gt;
&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[category:Terrain Design]]&lt;/div&gt;</summary>
		<author><name>Nz255</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GPoly_requirements&amp;diff=7049</id>
		<title>GPoly requirements</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GPoly_requirements&amp;diff=7049"/>
		<updated>2009-10-11T10:07:04Z</updated>

		<summary type="html">&lt;p&gt;Nz255: /* Functionalities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:Ambox-Content-WIP}}&lt;br /&gt;
&lt;br /&gt;
This Wiki page gives an overview of the issues when working with ground polygons and the requirements and functionality that a tool to assist with making them should have. As such it is a summary of the discussion in the [http://www.fsdeveloper.com/forum/forumdisplay.php?f=110 gPoly forum].&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
This is a list of the problems when designing ground polygons (with GMax):&lt;br /&gt;
&lt;br /&gt;
* Requirement to use FS2002 gamepack, which not all developers have access to nowadays&lt;br /&gt;
* Need to tweak intermediate ASM source files to get properly working ground polygons&lt;br /&gt;
* Autogen exclusion caused by the polygons&lt;br /&gt;
* Having night textures on the ground polygons gives trouble in DX10 mode of FSX&lt;br /&gt;
* Difficult to align background images&lt;br /&gt;
* Need to cut polygons in to smaller parts due to FSX earth curvation&lt;br /&gt;
&lt;br /&gt;
== Functionalities ==&lt;br /&gt;
&lt;br /&gt;
This is a list of the possible functionalities that gPoly could get:&lt;br /&gt;
&lt;br /&gt;
* Ability to read ground polygons from FS2004/FSX MDL files. gPoly will then create FS2002 style output automatically.&lt;br /&gt;
* Automatically clip polygons to prevent trouble with FSX earth curvation.&lt;br /&gt;
* Import ASM file and do the tweaking with a few mouse clicks&lt;br /&gt;
* Ability to easily draw polygons in a GUI (no need for GMax), for example if you just want to place some ground markings (text) at  a certain location.&lt;br /&gt;
* Ability to import source data from other formats (shapefile, autocad, ...).&lt;br /&gt;
* Ability to deal with different projections in data and reproject automatically so that it ends up at the right location in the FS world.&lt;br /&gt;
* Creating of light pool polygons using transparent textures and conditional display.&lt;br /&gt;
* Import GeoTIFF background images&lt;br /&gt;
* Make background images geo references by providing coordinates of control points&lt;/div&gt;</summary>
		<author><name>Nz255</name></author>
	</entry>
</feed>