<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<font face="Times New Roman, Times, serif">On 05/03/11 16:25, Frank
Warmerdam wrote:
</font>
<blockquote cite="mid:4DC0106A.40906@pobox.com" type="cite"><font
face="Times New Roman, Times, serif"><br>
I just tried and ran into the same thing. It is because NTv2
format also <br>
has two error range bands. Try creating a four band find with
the last two <br>
bands all zeros. <br>
</font>
</blockquote>
<font face="Times New Roman, Times, serif"><br>
Hi Frank,<br>
<br>
I was able to create a valid NTV2 file from a four-band raster tif
(see gdalinfo output below). First two bands are displacements in
lon and lat (arcseconds), last two are zero. When I use that file
in a +nadgrids clause in proj, I get the following error:<br>
<br>
GS_COUNT(160000) does not match expected cells (400x-397=-158800)<br>
<br>
Any idea ?<br>
<br>
Jan<br>
<br>
-----------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
$ gdalinfo test.ntv2<br>
Driver: NTv2/NTv2 Datum Grid Shift<br>
Files: test.ntv2<br>
Size is 400, 400<br>
Coordinate System is:<br>
GEOGCS["WGS 84",<br>
DATUM["WGS_1984",<br>
SPHEROID["WGS 84",6378137,298.257223563,<br>
AUTHORITY["EPSG","7030"]],<br>
TOWGS84[0,0,0,0,0,0,0],<br>
AUTHORITY["EPSG","6326"]],<br>
PRIMEM["Greenwich",0,<br>
AUTHORITY["EPSG","8901"]],<br>
UNIT["degree",0.0174532925199433,<br>
AUTHORITY["EPSG","9108"]],<br>
AUTHORITY["EPSG","4326"]]<br>
Origin = (3.386235000000001,50.762069400000001)<br>
Pixel Size = (0.009627452750000,0.007066402750000)<br>
Metadata:<br>
GS_TYPE=SECONDS<br>
VERSION=<br>
SYSTEM_F=<br>
SYSTEM_T=<br>
MAJOR_F=0<br>
MINOR_F=0<br>
MAJOR_T=0<br>
MINOR_T=0<br>
SUB_NAME=<br>
PARENT=NONE<br>
CREATED=<br>
UPDATED=<br>
Subdatasets:<br>
SUBDATASET_0_NAME=NTv2:0:test.ntv2<br>
SUBDATASET_0_DESC=<br>
Corner Coordinates:<br>
Upper Left ( 3.3862350, 50.7620694) ( 3d23'10.45"E,
50d45'43.45"N)<br>
Lower Left ( 3.3862350, 53.5886305) ( 3d23'10.45"E,
53d35'19.07"N)<br>
Upper Right ( 7.2372161, 50.7620694) ( 7d14'13.98"E,
50d45'43.45"N)<br>
Lower Right ( 7.2372161, 53.5886305) ( 7d14'13.98"E,
53d35'19.07"N)<br>
Center ( 5.3117256, 52.1753499) ( 5d18'42.21"E,
52d10'31.26"N)<br>
Band 1 Block=400x1 Type=Float32, ColorInterp=Undefined<br>
Description = Latitude Offset<br>
Band 2 Block=400x1 Type=Float32, ColorInterp=Undefined<br>
Description = Longitude Offset<br>
Band 3 Block=400x1 Type=Float32, ColorInterp=Undefined<br>
Description = Latitude Error<br>
Band 4 Block=400x1 Type=Float32, ColorInterp=Undefined<br>
Description = Longitude Error<br>
</font><br>
</body>
</html>