[gradsusr] shape files and printim: memory allocation error

Jeff Lake admin at michiganwxsystem.com
Wed May 2 04:17:34 EDT 2012


how much memory does your system have ??
I have no problems with large shapefiles or GRIB2
running 16gb on a Quad Core i7 CentOS 6 64bit

-Jeff Lake
MichiganWxSystem.com
WeatherMichigan.net
TheWeatherCenter.net
GRLevelXStuff.com


On 5/2/2012 4:03 AM, Sergey Varlamov wrote:
> Dear GrADS users,
>
> If some of you is interested in saving your images with
> the large FILLED POLYGONS from the shape files
> using the GrADS printim command or other GrADS utilities
> that parse the metafile content, it could be fixed.
>
> You have to modify source code to get it working.
> Problem is that the filled polygon size
> is saved in the metafile/buffer as C short int  (<32765).
> The real filled polygon sizes in the shape files like Japan outline
> (JPN_adm0.shp) are much larger. The solution I used was to save/write
> the filled polygon size in the metafile buffer using two short numbers
> instead of one at the write/save stage and restore it on the read/parse
> stage.
>
> Have to modify code in:
> gxmeta.c
> gxsubs.c
> gxhpng.c
>
> and the code of related utilities:
> gxeps.c
> gxps.c
> gxgif.c
> gxtran.c (this one has one more problem that the buffer
> size is statically fixed and could be small in some cases...)
>
> For me now printim works without problem.
> Who is interested to get modified code please e-mail me
> and I'll send you the modified files.
>
> Sincerely yours,
> Sergey Varlamov
>
>
> Sergey Varlamov wrote:
>> Dear GrADS users,
>>
>> Have somebody met a problem with printim that an attempt to save
>> grads image that includes FILLED poligon constructed using shape files
>> permanently results in the memory allocation error: gxhpng?
>>
>> I am running GrADS 2.0.1 build from the source
>> on openSUSE linux computer. No problems when
>> the fillcolor is not set, but regular error with the filled
>> shapes...
>>
>> Would be very thankful for any solution or patch!
>>
>> Sergey Varlamov
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>



More information about the gradsusr mailing list