[Paraview] large elevation data file

Paul Adams paul.adams.jr at gmail.com
Wed Feb 21 16:13:40 EST 2007


Are you running under Windows or Linux?  I have had many "large" vtk data
sets that crash ParaView on a Windows system because it cannot allocate the
memory.  These same vtk data sets load correctly under Linux.  I was able to
get a simple dataset based on your description to load under Linux.  The
same dataset would not load in ParaView under Windows.  The reason that this
occurs is the default windows version of ParaView is 32-bit.  32-bit memory
addressing under Windows is slightly less than 2 GB.  According to "top" on
Linux, ParaView is running at 2GB.  (FYI: My Windows machine is running
Windows XP 64-bit and has 8 GB of RAM.)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(int argc, const char* argv[])
{
   FILE *out;
   int i, j;

   out = fopen("test.vtk", "w");
   if (!out) {
     fprintf(stderr, "Write failed: can't open file to write.\n");
     exit(1);
   }
   fprintf(out,"# vtk DataFile Version 2.0\n");
   fprintf(out,"elevation\n");
   fprintf(out,"ASCII\n");
   fprintf(out,"DATASET STRUCTURED_POINTS\n");
   fprintf(out,"DIMENSIONS 6060 6060 1\n");
   fprintf(out,"ORIGIN 0 0 0\n");
   fprintf(out,"SPACING 1 1 1\n");
   fprintf(out,"POINT_DATA 36723600\n");
   fprintf(out,"SCALARS elevation float 1\n");
   fprintf(out,"LOOKUP_TABLE default\n");
   for (i=0;i<6060;i++)
   {
     for (j=0;j<6060;j++)
     {
        fprintf(out,"%f\n",(float)j);
     }
   }
   fclose(out);
   return 0;
}


Paul Adams
http://wiki.vizworld.com/index.php/ParaView

On 2/21/07, Jack Gundrum <jsg3 at psu.edu> wrote:
>
> Hi,
>
> I have a LIDAR data file that is too large to load in ParaView.  I
> define it as a vtk file with the header
>
> # vtk DataFile Version 2.0
> elevation
> ASCII
> DATASET STRUCTURED_POINTS
> DIMENSIONS 6060 6060 1
> ORIGIN 0 0 0
> SPACING 1 1 1
> POINT_DATA 36723600
> SCALARS elevation float 1
> LOOKUP_TABLE default
>
> ParaView blows up with an error vtkFloatArray: Unable to allocate xxx
> elements.
>
> Should I partition the data file somehow to work with ParaView, or did I
> define the header info wrong?
> Any ideas welcome.
>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20070221/87524dd8/attachment.htm


More information about the ParaView mailing list