<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.14">
<TITLE>Gdal_translate. Scaling, sizing, georeferencing</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hey Folks,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Synopsis.</FONT>
<BR><FONT SIZE=2 FACE="Arial">---------------</FONT>
<BR><FONT SIZE=2 FACE="Arial"> I am using gdal_translate within a VB application to georeference photos. The X Y are grabbed by user input and Long Lat is grabbed from a database. The outcome is pretty close to what I need but a few behaviours I did not expect.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">1. When I am using outsize I was hoping that this would decrease my resolution and keep a georefed image, but it seems to make the photos smaller (which makes sense I guess)</FONT></P>
<P><FONT SIZE=2 FACE="Arial">2. It appears as though I am maintaining my resoltuion, which I want to drop without affecting geo-referencing</FONT>
<BR><FONT SIZE=2 FACE="Arial">3. Whether I use a factor of 1 (100%), 1.5 (66%) or 4 (25%) I would expect that all three geo-referenced images would accupy the same space, but different resolutions.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">4. The goal is to have a near perfect overlap with images that were created using an old script that I hope to replace with gdal.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">I have provided some info bellow.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">What other bits of info do I need.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thanks</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The Command line so far:</FONT>
<BR><FONT SIZE=2 FACE="Arial">-------------------------------------</FONT>
<BR><FONT SIZE=2 FACE="Arial">gdal_translate -gcp 394.15 212.23 -76.777261 45.67899 -gcp 6001.45 272.87 -76.744739 45.678655 -gcp 5888.83 7561.67 -76.745361 45.649344 -gcp 285.87 7488.04 -76.777866 45.649679 -scale -ot byte -outsize 25% 25% -a_srs WGS84 -mo "Area_or_Point = Area " A38_001.tif oA38_001.tif</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Disection:</FONT>
<BR><FONT SIZE=2 FACE="Arial">--------------</FONT>
<BR><FONT SIZE=2 FACE="Arial"> four control points</FONT>
<BR><FONT SIZE=2 FACE="Arial">Scaling to keep 8 bit histogram 0 to 255</FONT>
<BR><FONT SIZE=2 FACE="Arial">Output Type as byte (moving from 16 bit to 8 bit)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Outsize, either 25% or 66%, based on scaling factor of 4 or 1.5 respectively</FONT>
<BR><FONT SIZE=2 FACE="Arial">Defining projection with generic WGS84 (a small assumption right now, but I believe this is what the long lat is based on in the DB)</FONT></P>
<P><FONT SIZE=2 FACE="Arial">A single metadata tag</FONT>
<BR><FONT SIZE=2 FACE="Arial">Source and destination images</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Images:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">These are aerial images with aprox 60 percent overlap</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">(Screen captures removed, Available upon request in a direct mail)</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">In the screen captures (if they came through) it shows what should be geo-reffed photos. The large overlapping ones were created in an old script that I'm trying to replace using gdal_translate</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Gdal_info</FONT>
<BR><FONT SIZE=2 FACE="Arial">---------------</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Old Script (66%)</FONT>
<BR><FONT SIZE=2 FACE="Arial">============</FONT>
<BR><FONT SIZE=2 FACE="Arial">Driver: GTiff/GeoTIFF</FONT>
<BR><FONT SIZE=2 FACE="Arial">Size is 4162, 5238</FONT>
<BR><FONT SIZE=2 FACE="Arial">Coordinate System is:</FONT>
<BR><FONT SIZE=2 FACE="Arial">GEOGCS["unnamed",</FONT>
<BR><FONT SIZE=2 FACE="Arial"> DATUM["unknown",</FONT>
<BR><FONT SIZE=2 FACE="Arial"> SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],</FONT>
<BR><FONT SIZE=2 FACE="Arial"> PRIMEM["Greenwich",0],</FONT>
<BR><FONT SIZE=2 FACE="Arial"> UNIT["degree",0.0174532925199433],</FONT>
<BR><FONT SIZE=2 FACE="Arial"> AUTHORITY["EPSG","4201"]]</FONT>
<BR><FONT SIZE=2 FACE="Arial">Origin = (-76.779526,45.680473)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Pixel Size = (0.00000878,-0.00000624)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Metadata:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> AREA_OR_POINT=Area</FONT>
<BR><FONT SIZE=2 FACE="Arial">Corner Coordinates:</FONT>
<BR><FONT SIZE=2 FACE="Arial">Upper Left ( -76.7795258, 45.6804733) ( 76d46'46.29"W, 45d40'49.70"N)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Lower Left ( -76.7795258, 45.6477890) ( 76d46'46.29"W, 45d38'52.04"N)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Upper Right ( -76.7429962, 45.6804733) ( 76d44'34.79"W, 45d40'49.70"N)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Lower Right ( -76.7429962, 45.6477890) ( 76d44'34.79"W, 45d38'52.04"N)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Center ( -76.7612610, 45.6641312) ( 76d45'40.54"W, 45d39'50.87"N)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Band 1 Block=4162x1 Type=Byte, ColorInterp=Gray</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">New script (66%)</FONT>
<BR><FONT SIZE=2 FACE="Arial">==============</FONT>
<BR><FONT SIZE=2 FACE="Arial">Driver: GTiff/GeoTIFF</FONT>
<BR><FONT SIZE=2 FACE="Arial">Size is 4183, 5264</FONT>
<BR><FONT SIZE=2 FACE="Arial">Coordinate System is `'</FONT>
<BR><FONT SIZE=2 FACE="Arial">GCP Projection = GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.2572235630016,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIM</FONT></P>
<P><FONT SIZE=2 FACE="Arial">EM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]</FONT>
<BR><FONT SIZE=2 FACE="Arial">GCP[ 0]: Id=1, Info=</FONT>
<BR><FONT SIZE=2 FACE="Arial"> (394.15,212.23) -> (-76.7773,45.679,0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">GCP[ 1]: Id=2, Info=</FONT>
<BR><FONT SIZE=2 FACE="Arial"> (6001.45,272.87) -> (-76.7447,45.6787,0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">GCP[ 2]: Id=3, Info=</FONT>
<BR><FONT SIZE=2 FACE="Arial"> (5888.83,7561.67) -> (-76.7454,45.6493,0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">GCP[ 3]: Id=4, Info=</FONT>
<BR><FONT SIZE=2 FACE="Arial"> (285.87,7488.04) -> (-76.7779,45.6497,0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Metadata:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> AREA_OR_POINT=Area</FONT>
<BR><FONT SIZE=2 FACE="Arial"> TIFFTAG_XRESOLUTION=800</FONT>
<BR><FONT SIZE=2 FACE="Arial"> TIFFTAG_YRESOLUTION=800</FONT>
<BR><FONT SIZE=2 FACE="Arial"> TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Area_or_Point =Area</FONT>
<BR><FONT SIZE=2 FACE="Arial">Corner Coordinates:</FONT>
<BR><FONT SIZE=2 FACE="Arial">Upper Left ( 0.0, 0.0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Lower Left ( 0.0, 5264.0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Upper Right ( 4183.0, 0.0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Lower Right ( 4183.0, 5264.0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Center ( 2091.5, 2632.0)</FONT>
<BR><FONT SIZE=2 FACE="Arial">Band 1 Block=4183x1 Type=Byte, ColorInterp=Gray</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Problems:</FONT>
</P>
</BODY>
</HTML>