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

Tamas Szekeres szekerest at gmail.com
Tue Jun 2 17:30:24 EDT 2009


Hi,

I'm not sure about this problem, I suspect cascading the vrt datasets should
normally work. Could you provide your complete C# example to produce the
output and the gdal_warp command line to examine the difference?

Best regards,

Tamas



2009/5/31 edomazlicky <edomazlicky at gmail.com>

>
> 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.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090602/a770ca50/attachment.html


More information about the gdal-dev mailing list