<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=443585513-18012008>OK I was showing my naivety with thinking GDAL didn't
have EPSG:27700 pre-configured. Please ignore the the first half of my
query. However, having reinstalled Proj4 (4.6.0) and gdal-1.5.0, I still
have the same problem:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=443585513-18012008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>$ gdalwarp -t_srs
EPSG:27700 -te -100000 -100000 600000 600000 -ts 400 400 map.tif
trans.tif</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>ERROR 6: Failed to
initialize PROJ.4 with `+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717
+x_0=400000 +y_0=-100000 +ellps=airy +datum=OSB36 +units=m +no_defs
'.<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=443585513-18012008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=443585513-18012008>map.tif is a global
bitmap that has been georeferenced with GCPs:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=443585513-18012008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=443585513-18012008>gdalinfo
map.tif<BR>Driver: GTiff/GeoTIFF<BR>Files: map.tif<BR>Size is 960,
480<BR>Coordinate System is `'<BR>GCP Projection = GEOGCS["WGS
84",DATUM["WGS_1984",SPHEROID["WGS
84",6378137,298.2572235629972,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]<BR>GCP[
0]: Id=1, Info=<BR> (0,0)
-> (-180,90,0)<BR>GCP[ 1]: Id=2,
Info=<BR> (0,480) ->
(-180,-90,0)<BR>GCP[ 2]: Id=3,
Info=<BR> (960,0) ->
(180,90,0)<BR>GCP[ 3]: Id=4,
Info=<BR> (960,480) ->
(180,-90,0)<BR>Metadata:<BR> AREA_OR_POINT=Area<BR>Image Structure
Metadata:<BR> INTERLEAVE=PIXEL<BR>Corner Coordinates:<BR>Upper Left
( 0.0, 0.0)<BR>Lower Left
( 0.0, 480.0)<BR>Upper Right (
960.0, 0.0)<BR>Lower Right ( 960.0,
480.0)<BR>Center ( 480.0,
240.0)<BR>Band 1 Block=960x2 Type=Byte, ColorInterp=Red<BR> Mask Flags:
PER_DATASET ALPHA<BR>Band 2 Block=960x2 Type=Byte, ColorInterp=Green<BR>
Mask Flags: PER_DATASET ALPHA<BR>Band 3 Block=960x2 Type=Byte,
ColorInterp=Blue<BR> Mask Flags: PER_DATASET ALPHA<BR>Band 4 Block=960x2
Type=Byte, ColorInterp=Alpha<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=443585513-18012008>S.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2>---</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Stephen Pascoe +44 (0)1235
445980</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>British Atmospheric Data
Centre</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Rutherford Appleton
Laboratory</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV><FONT face=Arial
size=2></FONT><FONT face=Arial size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> gdal-dev-bounces@lists.osgeo.org
[mailto:gdal-dev-bounces@lists.osgeo.org] <B>On Behalf Of </B>Pascoe, S
(Stephen)<BR><B>Sent:</B> 18 January 2008 11:58<BR><B>To:</B>
gdal-dev@lists.osgeo.org<BR><B>Subject:</B> [gdal-dev] Adding Datums to
GDAL<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>I am relatively new
to GDAL and OpenGIS technology in general to apologies if this is the wrong
forum.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=028134611-18012008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>I want to use GDAL
to transform a EPSG:4326 raster to British National Grid coordinates
(EPSG:27700). With a bit a bit of googling I found the WKT for EPSG:27700
and installed it in <gdal-root>/share/epsg.wkt:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=028134611-18012008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>27700,PROJCS["OSGB
1936 / British National Grid",<BR>
GEOGCS["OSGB
1936",<BR>
DATUM["OSGB_1936",<BR>
SPHEROID["Airy
1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],<BR>
TOWGS84[375,-111,431,0,0,0,0],<BR>
AUTHORITY["EPSG","6277"]],<BR>
PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],<BR>
UNIT["DMSH",0.0174532925199433,AUTHORITY["EPSG","9108"]],<BR>
AXIS["Lat",NORTH],<BR>
AXIS["Long",EAST],<BR>
AUTHORITY["EPSG","4277"]],<BR>
PROJECTION["Transverse_Mercator"],<BR>
PARAMETER["latitude_of_origin",49],<BR>
PARAMETER["central_meridian",-2],<BR>
PARAMETER["scale_factor",0.999601272],<BR>
PARAMETER["false_easting",400000],<BR>
PARAMETER["false_northing",-100000],<BR>
UNIT["metre",1,AUTHORITY["EPSG","9001"]],<BR>
AXIS["E",EAST],<BR>
AXIS["N",NORTH],<BR>
AUTHORITY["EPSG","27700"]]<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>Tests indicate it is
found. However, when I try to use gdalwarp I get an
error:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=028134611-18012008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>$ gdalwarp -t_srs
EPSG:27700 -te -100000 -100000 600000 600000 -ts 400 400 map.tif
trans.tif</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>ERROR 6: Failed to
initialize PROJ.4 with `+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717
+x_0=400000 +y_0=-100000 +ellps=airy +datum=OSB36 +units=m +no_defs
'.<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>Guessing that it
didn't know what +datum=OSB36 was I tried changing it to WGS84 and it worked
(the proj parameters were taken directly from the error
above):</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=028134611-18012008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=028134611-18012008>$ gdalwarp -t_srs
'+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000
+ellps=airy +datum=WGS84 +units=m +no_defs' -te -100000 -100000 600000 600000
-ts 400 400 map.tif trans.tif</DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=028134611-18012008><FONT face=Arial size=2>My question is how
do I install the OSGB36 datum into GDAL? The WKT above appears to contain
parameters for this datum so why is proj_4 failing?</FONT></SPAN></DIV>
<DIV><SPAN class=028134611-18012008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=028134611-18012008><FONT face=Arial size=2>Many
thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=028134611-18012008><FONT face=Arial
size=2>Stephen.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2>---</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Stephen Pascoe +44 (0)1235
445980</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>British Atmospheric Data
Centre</FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Rutherford Appleton
Laboratory</FONT></DIV>
<DIV> </DIV></BODY></HTML>