[Gdal-dev] Re: imagewarp help (previously no subject)

Bill Bob saddergoat at hotmail.com
Thu May 29 10:43:59 EDT 2003


Hi Frank,

Thanks for your suggestion.  I am not sure if I am doing it right.  I have 
added the following:

	if( verbose )
	{
		fprintf(stderr,"using projection parameters of 
%s\n",CPLStrdup(GDALGetProjectionRef(hSrsDataset)) );
	}

What I get is an empty string, which leaves me wondering is it that I 
haven't setup the correct projection, or that I don't know how to use 
GDALGetProjectionRef().




Date: Tue, 27 May 2003 16:06:01 -0400
From: Frank Warmerdam <warmerdam at pobox.com>
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] (no subject)
Reply-To: gdal-dev at remotesensing.org

Bill Bob wrote:
>Hi,
>
>I am trying to get familiar with the API by following the WarpAPI tutorial 
>and also from gdalwarp.c and gdalwarptest.c.
>
>I have included some of my code.  It appears that I do not setup the 
>correct transformation.  My resulting image is in the orginal projection.
>
>Any thoughts?
...
>     // set projection transformer
>     psWarpOptions->pTransformerArg = GDALCreateGenImgProjTransformer( 
>hSrsDataset,
>                                                                       
>GDALGetProjectionRef(hSrsDataset),
>                                                                       
>hDstDataset,
>                                                                       
>GDALGetProjectionRef(hDstDataset),
>                                                                       
>FALSE,
>                                                                       0.0,
>                                                                       1
>                                                                     );

Bill,

I think the most likely problem is that the source or destination coordinate
systems are not properly defined.  Trying printing out the results of
GDALGetProjectionRef() on the source and destination and see if they make
sense or post them here.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, 
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the Gdal-dev mailing list