[Gdal-dev] Gdal Warp in C#
Tamas Szekeres
szekerest at gmail.com
Wed Jan 31 19:42:31 EST 2007
Frank,
This approach is not working properly with the current implementation
since AutoCreateWarpedVRT does not set up the warped extent and the
ReprojectionTransformer.
I've attached my patch against vrtwarped.cpp to make this feature work.
When the fix is applied I will also commit my corresponding C# example.
Best Regards,
Tamas Szekeres
2007/1/30, Frank Warmerdam <warmerdam at pobox.com>:
> Jean Michel PIERRET wrote:
> > Hi,
> >
> >
> >
> > How can i reproject images in BNG (British National Grid : epsgcode =
> > 27700) to Geographic (epsgcode 4326) using gdal in c#.
> >
> > Else how can i user gdal warp in c#.
>
> Jean Michel,
>
> The warp api per-se is not wrapped in c# and other non-C++ languages.
>
> But I do see the AutoCreateWarpedVRT() function is wrapped though I'm
> not sure if it works fully. For this you would roughly call the
> AutoCreateWarpedVRT() function in the gdal package with the arguments:
>
>
> GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
> const char *src_wkt = 0,
> const char *dst_wkt = 0,
> GDALResampleAlg eResampleAlg =
> GRA_NearestNeighbour,
> double maxerror = 0.0 ) {
>
> So you give it a source dataset the coordinate system of the source,
> the coordinate system you want to warp to, the resampling type, and
> the approximation error that is acceptable, and it returns a handle
> to a "virtual warped dataset" that you could pass to CreateCopy() to
> write to disk as a warped image.
>
> 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 | President OSGeo, http://osgeo.org
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vrtwarped.cpp.patch
Type: application/octet-stream
Size: 3187 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070201/c9fe8ce5/vrtwarped.cpp.obj
More information about the Gdal-dev
mailing list