[GRASS-dev] vtkGRASSBridge update

Soeren Gebbert soerengebbert at googlemail.com
Sat Sep 26 12:30:53 EDT 2009


Hello Markus,

2009/9/26 Markus Neteler <neteler at osgeo.org>:
> On Sat, Sep 26, 2009 at 5:01 PM, Soeren Gebbert
> <soerengebbert at googlemail.com> wrote:
>> Dear grass devs,
>> JFYI, i have updated the vtkGRASSBridge to work only with grass7 and added
>> vector support without topology handling.
>>
>> The vtkGRASSBridge is hosted on code.google.com as svn repository:
>> http://code.google.com/p/vtk-grass-bridge/
>
> Congratulations!
> I have taken liberty to create a WIKI page:
> http://grass.osgeo.org/wiki/GRASS_and_VTK

Thanks :)
I will maybe add some content about the project there.
But first i need to add some content to the google code wiki. ;)
And my time is sooo limited ... :(

>
>> Here a small python example to triangulate vector points from the nc
>> demo data set with the VTK delaunay filter class:
>
> Curiosity: how much faster is this compared to v.delaunay or likewise?

The VTK Version is twice as fast, but does not write the data back to
grass and therefor
do not build a topology in grass.
The VTK output is base64 XML written to /tmp.

GRASS output:

GRASS 7.0.svn (nc_spm_08):~/src/vtkGRASSBridge/vtk-grass-bridge/Examples
> time v.delaunay -r input=elev_lid792_randpts at user1 output=test2 --o
WARNING: Vector map <test2> already exists and will be overwritten
Building topology for vector map <test2>...
Registering primitives...
17948 primitives registered
35896 vertices registered
Building areas...
 100%
11949 areas built
1 isles built
Number of nodes: 6000
Number of primitives: 17948
Number of points: 0
Number of lines: 0
Number of boundaries: 17948
Number of centroids: 0
Number of areas: 11949
Number of isles: 1
Number of areas without centroid: 11949
 100%
Building topology for vector map <test2>...
Attaching islands...
 100%
Attaching centroids...
 100%
Number of nodes: 17949
Number of primitives: 29897
Number of points: 0
Number of lines: 0
Number of boundaries: 17948
Number of centroids: 11949
Number of areas: 11949
Number of isles: 1

real    0m2.543s
user    0m2.100s
sys     0m0.392s



GRASS 7.0.svn (nc_spm_08):~/src/vtkGRASSBridge/vtk-grass-bridge/Examples
> time python VectorDelaunyTriangulation.py
'vector/elev_lid792_randpts' was found in more mapsets (also found in
<user1>)Using <elev_lid792_randpts at PERMANENT>Debug: Off
Modified Time: 254
Reference Count: 1
Registered Events: (none)
Is Open: True:
  Organisation: NC OneMap
  CreationDate:
  Person: hmitaso
  Title: Rural area (in tile 792), random points from lidar-based DEM
  FullName: elev_lid792_randpts at PERMANENT
  Mapset: PERMANENT
  MapDate: Mon Mar 19 00:37:45 2007
  Scale: 1
  Comment:
  Zone: 0
  Threshold: 0
  Projection: 99
  ProjectionName: Lambert Conformal Conic
  Is 3d: No
  Total number of coor points: 6000

real    0m1.107s
user    0m1.048s
sys     0m0.040s


Best regards
Soeren

>
> Markus
>


More information about the grass-dev mailing list