[GRASS-dev] convert 3D polygons or Tins to a DEM?

Benjamin Ducke benjamin.ducke at ufg.uni-kiel.de
Fri Feb 1 04:04:17 EST 2008


In sw_main.c, function readsite ( void ) I find this:

sites = (struct Site *) myalloc(4000*sizeof(*sites));

Since the "sites" structure is meant to contain all points of the
input map: why is it allocated to a pre-defined number of 4000?
Should this not rather be the number of points in the input map?

The size of 4000 is roughly the magnitude of Helena's dataset, so
it would not be too surprising if it crashes for anything well
above that.

(myalloc is a function that just does some out-of-mem error catching).

Benjamin

Helena Mitasova wrote:
> I tested it with the nc_spm data set on an older Mac (~500MB RAM)
> and it ran fine with
> elev_lid792_randpts (6000 points)
> subset of elev_lid792_bepts within the rural_1m region (~45000 points)
> and crashed with the full elev_lid792_bepts (319000 points)
> with the following message:
> 
> GRASS 6.3.cvs (nc_spm_05):~ > v.delaunay -r elev_lid792_bepts
> out=tintest_bebig
> v.delaunay(182) malloc: *** vm_allocate(size=8421376) failed (error code=3)
> v.delaunay(182) malloc: *** error: can't allocate region
> .
> v.delaunay(182) malloc: *** error: can't allocate region
> v.delaunay(182) malloc: *** set a breakpoint in szone_error to debug
> node.c:48: failed assertion `n'
> Abort trap
> 
> It may run with that data set on a bigger machine but it is obvious that
> there is a problem with the triangulation as you have suggested.
> I am not sure how difficult the fix would be and whether it is worth the
> effort
> if it is going to be replaced with something more general,
> 
> Helena
> 
> On Jan 30, 2008, at 4:07 AM, Maris Nartiss wrote:
> 
>> As topology building for large vector datasets works slowly but
>> correctly, I would blame delaunay module for generating garbage. I
>> interupted v.delaunay run during topology building phase and was able
>> to display resulting vector map as lines instead of areas and still it
>> made sense only for first 1/3 of map. IMHO it means, that module
>> chokes somewhere before requesting to Vect_build_partial
>> (vector/v.voronoi/dt_main.c:108).
>>
>>
>> Just my 0.002,
>> Maris.
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
> 
> 

-- 
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg



More information about the grass-dev mailing list