[gdal-dev] gdal_rasterize

Jason Mathis jmathis at redzonesoftware.com
Wed Apr 9 09:01:38 PDT 2014


All right I think I fixed it. 

I created a centos vm and installed gdal from yum and everything worked fine. Which made me very suspect of my box:( 

I have been using an older version of the postgres.app that comes with postgis and apparently some gdal binaries. I realized when I did a “which gdal_rasterize” that I was pointed at the postgres.app binaries. In the past I had installed binaries from kyngchaos’ site

http://www.kyngchaos.com/software:frameworks

so all I needed to do was: 

export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH

to point at the binaries from the kyngchaos’ install and now I have run my script several times without error. Some thing before I couldn’t do even once. I was using an older postgres.app so upgrading that could have solved the issue as well. May try that later but so happy it running good now! 

Thanks for the responds but I believe I am good to go. 

-jason 


On April 9, 2014 at 9:02:24 AM, Jason Mathis (jmathis at redzonesoftware.com) wrote:

Well that was easy. You can use the attached shape file, I can certainly reproduce the error no problem. I am currently bringing up a centos vm to see if it has the same behavior. 

Here are the commands to reproduce:

gdal_rasterize -a region -where "region='0'" -burn 2  -ts 1000 1000 countries.shp countries.tif
gdal_rasterize -a region -where "region='2'" -b 1 -burn 3 countries.shp countries.tif
gdal_rasterize -a region -where "region='9'" -b 1 -burn 4 countries.shp countries.tif
gdal_rasterize -a region -where "region='19'" -b 1 -burn 5 countries.shp countries.tif
gdal_rasterize -a region -where "region='142'" -b 1 -burn 6 countries.shp countries.tif
gdal_rasterize -a region -where "region='150'" -b 1 -burn 7  countries.shp countries.tif


thanks,
-jason 


On April 9, 2014 at 8:43:59 AM, Jason Mathis (jmathis at redzonesoftware.com) wrote:

That maybe difficult, not sure I can share the shapefile I am using. Although I could try and find a sample and reproduce the error; if I can. 

Are you thinking this could be data related? 

I will respond when i can reproduce. 

Thanks! 


On April 8, 2014 at 11:08:20 PM, Chaitanya kumar CH (chaitanya.ch at gmail.com) wrote:

Jason,

Can you provide some sample data to reproduce the error?


On Wed, Apr 9, 2014 at 3:51 AM, Jason Mathis <jmathis at redzonesoftware.com> wrote:
Hi all was wondering if anyone could help out here. I have been trying to rasterize a shp file using gdal_rasterize and I keep getting an error I have no idea about.


gdal_rasterize(1844,0x7fff7a393310) malloc: *** error for object 0x7f8f40d032e0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug


the command I am using is:
gdal_rasterize -at -burn 1 -a $attribute -where “$attribute=‘value'" -ts 5000 5000 $shapefile $outfile


version is: 
GDAL 1.10.0, released 2013/04/24

I am running os x 10.9.2.

It seems to happen randomly. I have about 10 different values I need to get out. Not sure what other info would be useful so please let me know. 

thanks!

-jason 





This transmission contains confidential and privileged information intended solely for the party identified above. If you receive this message in error, you must not use it or convey it to others. Please destroy it immediately and contact the sender at (303) 386-3955 or by return e-mail to the sender.


_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev



--
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-- 
 

This transmission contains confidential and privileged information intended 
solely for the party identified above. If you receive this message in 
error, you must not use it or convey it to others. Please destroy it 
immediately and contact the sender at (303) 386-3955 or by return e-mail to 
the sender.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140409/16a421de/attachment-0001.html>


More information about the gdal-dev mailing list