[gdal-dev] Raster to array, then array to Raster (while preserving projection info)

Chaitanya kumar CH chaitanya.ch at gmail.com
Mon Jun 21 21:31:44 EDT 2010


GDALCreateCopy() can help you with creating a raster with the same data
including the projection and stuff. You can edit the pixels without
bothering about the projection. Use GDALRasterIO() to read and write to that
raster.

http://www.gdal.org/gdal_tutorial.html
http://www.gdal.org/gdal_8h.html

On Tue, Jun 22, 2010 at 3:06 AM, Discourse Maps <discoursemap at live.com>wrote:

>  I am using "convertRastertoArray" (modifying the array) and then using
> "convertArraytoRaster".
>
> The problem is that when I convert back to raster, the projection
> information is lost.
> The projection of my input is: WGS 84, UTM 17N. (EPSG = 32617)
>
> Can someone provide some code as to the cleanest way to grab the projection
> (wkt) during the raster to array conversion so that I can read projection
> info in when I convert back?
>
> Thanks.
>
> ------------------------------
> Hotmail has tools for the New Busy. Search, chat and e-mail from your
> inbox. Learn more.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100622/dd5feaa1/attachment.html


More information about the gdal-dev mailing list