<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ebe7dc>
<DIV><FONT size=2><FONT color=#0000ff size=1>
<P><FONT face="Courier New" color=#000000 size=2>Hi list,</FONT></P>
<P><FONT face="Courier New" color=#000000 size=2>I was required to use GeoTIFF
1:500 000 maps of areas in Algeria generated using Descartes/MicroStation, and
to project them using PROJ4. The images have the following important
GeoTIFF tags:</FONT></P>
<P><FONT face="Courier New" color=#000000 size=2>PCS = 30591 (Voirol Unifie /
Nord Algerie)<BR>Projection = 18021 (Nord Algerie)<BR>Projection Method:
CT_LambertConfConic_1SP<BR>GCS: 4305/Voirol Unifie<BR>Datum: 6305/Voirol Unifie
1960<BR>Ellipsoid: 7012/Clarke 1880 (RGS) (6378249.14,6356514.87)<BR>Prime
Meridian: 8901/Greenwich (0.000000/000 00 00.00E)</FONT></P>
<P><FONT face="Courier New" color=#000000 size=2>Of course, looking through the
file 'geotiff_proj4.c', it had to be unsupported. Undeterred, I
implemented the GeoTIFF to PROJ4 conversion as follows, ala Gerald
Evenden:</FONT></P>
<P><FONT face="Courier New" color=#000000 size=2>..</FONT></P>
<P><FONT face="Courier New" color=#000000 size=2>else if(
psDefn->CTProjection == CT_LambertConfConic_1SP )<BR>{<BR> /* this
appears to be an unsupported formulation with PROJ.4 */</FONT></P>
<P><FONT color=#000000><FONT face="Courier New" size=2> /* to at least some
degree this can be treated similarly to<BR> * the 2SP case.<BR>
*<BR> * See </FONT><A
href="http://www.mentorsoftwareinc.com/CC/asknorm/ASK0699.HTM#Q2"><FONT
face="Courier New"
size=2>http://www.mentorsoftwareinc.com/CC/asknorm/ASK0699.HTM#Q2</FONT></A><BR><FONT
face="Courier New" size=2> */</FONT></FONT></P>
<P><FONT color=#000000><FONT face="Courier New" size=2> /* Mods according
to:<BR> * </FONT><A
href="http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_1sp.html"><FONT
face="Courier New"
size=2>http://www.remotesensing.org/geotiff/proj_list/lambert_conic_conformal_1sp.html</FONT></A><BR><FONT
face="Courier New" size=2> */<BR> <BR> sprintf(
szProjection+strlen(szProjection),<BR> "+proj=lcc +lat_0=%.9f
+lat_1=%.9f +lon_0=%.9f"<BR> " +k_0=%.9f +x_0=%.3f +y_0=%.3f
",<BR> psDefn->ProjParm[0],<BR> psDefn->ProjParm[0],<BR> psDefn->ProjParm[1],<BR> psDefn->ProjParm[4],<BR> psDefn->ProjParm[5],<BR> psDefn->ProjParm[6]
);</FONT></FONT></P>
<P><FONT face="Courier New" color=#000000 size=2>}</FONT></P>
<P><FONT face="Courier New" color=#000000 size=2></FONT><FONT face=Arial
color=#000000><FONT size=2></FONT><FONT face="Courier New" size=2>This worked
fine, except for what appeared like a scale creep effect when comparing my PROJ4
grid longitudes to those on the underlying map. Also, for the area I was
testing, the PROJ4 latitudes were offset by a good 3 to 3.5
kilometers!</FONT></FONT></P>
<P><FONT color=#000000><FONT face="Courier New" size=2>After some investigation
it seems as if there is a bug in 'trf_nonpolynomial.c/csv' files. The value for
k_0 is given as 0.999625544 for Nord Algerie and 0.999625769 for Sud
Algerie. Other sources suggest these values should be 0.99625544 and
0.99625769, respectively.</FONT></FONT></P>
<P><FONT face=Arial color=#000000><FONT size=2><FONT face="Courier New">I
changed the values accordingly in the above files, and hey presto!, the
underlying map grids and my PROJ4 generated grids overlapped pretty
neatly.</FONT></FONT></FONT></P>
<P><FONT face=Arial color=#000000><FONT size=2><FONT face="Courier New">Hope
this is of some use to someone out there.</FONT><BR></P></FONT></FONT>
<P><FONT face=Arial color=#000000><FONT
size=2> </P></FONT></FONT></FONT><FONT size=1><FONT
face=Arial></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>