[vtkusers] VTK in a GIS software

Vincent Thomas vthomas at imajing.org
Fri May 18 12:00:57 EDT 2018


Hello all,

I'm looking for guidance, I'm currently trying to determine if VTK would 
be a good fit to be the foundation of a Map component (as in 2D top-down 
view Map) in a new software i'll be working on. After searching for a 
bit I found vtkMap (https://github.com/OpenGeoscience/vtkMap).

I looked into it and I found answers to almost every questions i had. 
The only "problem" I have right now is line representation. For example, 
I would like to be able to have lines represented by a wide red piece in 
the center surrounded by a black piece on each side. For this I 
understand that the lines have to have a surface so at the moment I have 
tested 2 solutions:

1) have something like vtkRibbonFilter to generate polygons around the 
lines then apply a texture on them. I have tested it and it works ok, 
but it's not perfect. The down side is that obviously the width of the 
lines depends on the zoom level, the more you zoom the wider they appear 
and potentially hides details.

2) write a geometry shader that will generate the ribbon and apply a 
texture to it. This way I can draw the lines with a width independent 
from the zoom level. The down side on this one is that in order to have 
a pretty lines I need to modify opengl's draw call primitive from 
GL_LINES to GL_LINE_ADJACENCY and also reorganize data in the VBOs/IBOs. 
So if I'm not mistaken I would have to derive from 
vtkOpenGLPolyDataMapper and make the necessary adjustments (this part I 
haven't tested yet).

For now, I'm more inclined to go with 1) and add filters in the pipeline 
that would simplify the geometries and generate ribbons based on the 
zoom level of at least by ranges of zoom levels (like LOD for meshes). 
Those different level of details could be precomputed and stored in 
files when they are not in use to minimize memory and computation load.

So I guess my question is am I missing something and I'm trying too hard 
to fix a problem that has already been solved ? (Since I'm discovering 
VTK at the same time I may have missed something). Or am I on the right 
path and I should pursue in that direction ?

Thank you for taking the time to read me.

Vincent


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180518/926d50b4/attachment.html>


More information about the vtkusers mailing list