One more, likely, foolish question.<div><br></div><div>Where is libgdal.dylib living on OSX?  I have used the Kyngchaos binary installer and it looks like it renames libgdal.dylib to simply GDAL.  Should I be soft linking that libgdal.dylib?</div>
<div><br></div><div>Also, evan's test [1] looks like it is using simply libgdal.dylib.  Is that test failing on OS X then?</div><div><br></div><div>[1]<a href="http://svn.osgeo.org/gdal/sandbox/rouault/gdal-openjpeg-trunk/autotest/gcore/testnonboundtoswig.py">http://svn.osgeo.org/gdal/sandbox/rouault/gdal-openjpeg-trunk/autotest/gcore/testnonboundtoswig.py</a><br>
<br><br>Thanks, </div><div>Jay</div><div><br></div><div><br><div class="gmail_quote">On Mon, Jul 30, 2012 at 8:19 AM, Jay L. <span dir="ltr"><<a href="mailto:jzl5325@psu.edu" target="_blank">jzl5325@psu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Chris, <div><br></div><div>Thanks for the link / info.  My issue is not working with the ctypes array, but the fact that, I believe, GDAL returns a numpy array using gdal.ReadAsArray().  Perhaps it is possible to use the GDAL python bindings ReadAsArray() to go directly into a ctypes array (as opposed to the wonderful code post earlier in this thread), but I have missed it.</div>

<div><br></div><div>Is it possible, not using the previously posted code, to do something like:</div><div><br></div><div>empty_ctypes_array = multiprocessing.RawArray(data_type, size)</div><div>empty_ctypes_array.ReadAsArray()</div>

<div><br></div><div>I realize that the above will not work, but offer it only as a pseudo code example.  Using the above we could go direct to the ctypes array without using either any C code, or an intermediate numpy array.</div>

<div><br></div><div>I will definitely check out the SciPy mailing list to see what the current trends in multiprocessing are on large arrays.</div><div><br></div><div>Thanks and please do correct all inaccuracies as I am trying to improve my fluency in GDAL!</div>
<span class="HOEnZb"><font color="#888888">
<div>Jay</div></font></span><div class="HOEnZb"><div class="h5"><div><br><div class="gmail_quote">On Sun, Jul 29, 2012 at 2:20 PM, Chris Barker <span dir="ltr"><<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Fri, Jul 27, 2012 at 8:40 PM, Jay L. <<a href="mailto:jzl5325@psu.edu" target="_blank">jzl5325@psu.edu</a>> wrote:<br>
<br>
> Currently the workflow is to open the dataset and grab the first band, as<br>
> usual. I then read in the array, create an empty ctype array, and use<br>
> memmove to move the numpy array to my ctypes array.<br>
<br>
</div>numpy comes with some utilities for working with ctypes and numpy<br>
arrays -- you certainly should be able to do that without a copy. Poke<br>
around in the numyp source, docs, and mailing list.<br>
<br>
If I understand the docs right, this makes it really simple:<br>
<br>
<a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.ctypes.html" target="_blank">http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.ctypes.html</a><br>
<br>
note that there is a lot of great stuff going on with numpy and<br>
Cython doing this sort of stuff -- numpy arrays may be a good bet anyway.<br>
<br>
<br>
You might also want to check out geo-Dango -- I think they've got a<br>
pretty complete wrapper for GDAL with ctypes<br>
<span><font color="#888888"><br>
-Chris<br>
<br>
<br>
<br>
--<br>
<br>
Christopher Barker, Ph.D.<br>
Oceanographer<br>
<br>
Emergency Response Division<br>
NOAA/NOS/OR&R            <a href="tel:%28206%29%20526-6959" value="+12065266959" target="_blank">(206) 526-6959</a>   voice<br>
7600 Sand Point Way NE   <a href="tel:%28206%29%20526-6329" value="+12065266329" target="_blank">(206) 526-6329</a>   fax<br>
Seattle, WA  98115       <a href="tel:%28206%29%20526-6317" value="+12065266317" target="_blank">(206) 526-6317</a>   main reception<br>
<br>
<a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a><br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>