[Gdal-dev] Warping a warped file C# bindings

edomazlicky edomazlicky at gmail.com
Sun May 31 16:47:38 EDT 2009


I am trying to warp a NAD27 UTM file to Google Mercator 900913. My
understanding is that for this to happen you have to first warp the file to
WGS84 and then to 900913. I have tried going straight from NAD27->900913 and
I get projection errors similar to if you plotted a WGS84 coordinate on a
NAD27 map. So to accomplish this two-step warp I have been trying to do
something kind of like this:

Dim oWGS84 As New OSGeo.OSR.SpatialReference("")
' WGS84 UTM Zone 10
oWGS84.ImportFromEPSG(32610)
Dim wgs84_wkt As String = ""
oWGS84.ExportToPrettyWkt(wgs84_wkt, 0)
InterMed = OSGeo.GDAL.Gdal.AutoCreateWarpedVRT(SrcGdalDataSet, src_wkt,
wgs84_wkt, eReSample, 0.125)
GdalDataSet = OSGeo.GDAL.Gdal.AutoCreateWarpedVRT(InterMed, wgs84_wkt,
dst_wkt, eReSample, 0.125)

Where src_wkt contains the NAD27 WKT and dst_wkt contains the 900913 WKT.
This doesn't work- I am getting the same results I get if I try to go
straight from NAD27->900913. However if instead I warp the file in gdal_warp
first to WGS84 and then go from that to 900913 it works fine. Is there
anyway to warp these files without making a new file fist? I would like for
it all to be done in memory without messing with temporary files or calling
gdal_warp externally.
-- 
View this message in context: http://n2.nabble.com/Warping-a-warped-file-C--bindings-tp3003215p3003215.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.



More information about the gdal-dev mailing list