[Paraview] Shapefiles to Paraview (or VTK) format

Aashish Chaudhary aashish.chaudhary at kitware.com
Wed Jul 6 08:49:28 EDT 2011


Hi Takuya,

First of all thank you so much for testing and improving
vtkGDALVectorReader and for this nice comparison..

On Wed, Jul 6, 2011 at 8:38 AM, Takuya OSHIMA
<oshima at eng.niigata-u.ac.jp> wrote:
> Hi,
>
> I may be a bit persistent about this and may be complicating things
> more, but went on to port VisIt Shapefile database reader as a
> ParaView plugin via VisItBridge
>
> https://gitorious.org/avtshapefilefileformat_plugin
>
> because I wanted to examine as much options as possible.
>
> So now we have three options: ParaViewGeo (LGPL), vtkGDALVectorReader
> (MIT License), and the VisIt reader (BSD License). Each of the three
> turned out to have its strengths, to illustrate I took a screenshot:
>
> http://dl.dropbox.com/u/7352393/ShapefileReadersScreenshot.png
>
> where the two above are represented in Surface and the two below are
> in Surface With Edges. Observations are
>
> * ParaViewGeo and vtkGDALVectorReader represent polygons in lines,
>  whereas the VisIt reader in polygons, propably due to difference in
>  philosophy in handling polygons with holes, which is not supported
>  natively in VTK. VisIt reader is characteristic in this point
>  because it offers an option to tessellate polygons using the OpenGL
>  tessellator.

Yes, vtkGDALVectorReader does not support polygons and hence
tessellation  because holes are not supported natively in VTK.  User
could run other filters on top of the output of vtkGDALVectorReader (I
can't remember the name of the filter but I think it was
vtkTriangleFilter ) to produce polygons.

>
> * The VisIt reader with tessellation and vtkGDALVectorReader allows
>  field values to be loaded as well.
>
> For our own particular purpose vtkGDALVectorReader turned out to be
> best suited, but for others other readers might be better. Either way,
> I am really looking forward to seeing one (or more) of them included
> in ParaView/VTK.

Glad to hear that. I will try to get vtkGDALVectorReader into VTK
sometime soon.

Thanks again.


>
> Takuya
>
> Takuya OSHIMA, Ph.D.
> Faculty of Engineering, Niigata University
> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>
>
> From: Aashish Chaudhary <aashish.chaudhary at kitware.com>
> Subject: Re: [Paraview] Shapefiles to Paraview (or VTK) format
> Date: Wed, 8 Jun 2011 21:25:42 -0400
>
>> Sure. I might be able make this reader as part of VTK and if you are
>> willing to share your plugin then probably we could make that as part
>> of Paraview source code.
>>
>> Looking forward to your feedback.
>>
>> Thanks
>>
>>
>> On Wed, Jun 8, 2011 at 8:23 PM, Takuya OSHIMA
>> <oshima at eng.niigata-u.ac.jp> wrote:
>>> Hi Aashish,
>>>
>>> Great! My big thanks for sharing your reader. I will check and
>>> hopefully I should be able to wrap the reader as a ParaView plugin.
>>>
>>> Takuya
>>>
>>> Takuya OSHIMA, Ph.D.
>>> Faculty of Engineering, Niigata University
>>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>>
>>> From: Aashish Chaudhary <aashish.chaudhary at kitware.com>
>>> Subject: Re: [Paraview] Shapefiles to Paraview (or VTK) format
>>> Date: Wed, 8 Jun 2011 09:20:05 -0400
>>>
>>>> Hi Takuya,
>>>>
>>>> Instead of sending it over the email I decided to put it over
>>>> gitorious so that it could be maintained.
>>>>
>>>> Checkout source code from here:
>>>>
>>>> https://gitorious.org/vtkgis_vector_reader
>>>>
>>>> The repository has a test program as well that could be used to view a
>>>> shape file or write shape file gdal layers as vtk files. This test
>>>> program won't work when you don't have a projection information in the
>>>> shape file but you can still look at the test code to get an idea on
>>>> how to convert the data into vtk files.
>>>>
>>>> If you have any questions or if you find any bugs please let me know.
>>>>
>>>> Thanks
>>>>
>>>>
>>>> On Tue, Jun 7, 2011 at 12:12 PM, Aashish Chaudhary
>>>> <aashish.chaudhary at kitware.com> wrote:
>>>>> Sure. I will attach the reader header and source in my next email (by
>>>>> the end of the day).
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>> On Tue, Jun 7, 2011 at 4:27 AM, Takuya OSHIMA
>>>>> <oshima at eng.niigata-u.ac.jp> wrote:
>>>>>> Hi Aashish,
>>>>>>
>>>>>> Would be great for me too if your reader may be shared (thus we have
>>>>>> more options for importing Shapefiles)!
>>>>>>
>>>>>> Takuya
>>>>>>
>>>>>> Takuya OSHIMA, Ph.D.
>>>>>> Faculty of Engineering, Niigata University
>>>>>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>>>>>
>>>>>> From: Aashish Chaudhary <aashish.chaudhary at kitware.com>
>>>>>> Subject: Re: [Paraview] Shapefiles to Paraview (or VTK) format
>>>>>> Date: Mon, 6 Jun 2011 10:29:22 -0400
>>>>>>
>>>>>>> Hi Lester,
>>>>>>>
>>>>>>> I have a Shapefile reader (actually a vector format reader) for VTK.
>>>>>>> You would have to write a program to use it (I can send a sample app
>>>>>>> too). It will require VTK and GDAL.
>>>>>>>
>>>>>>> I can send you the code in my next email if you are interested.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Jun 5, 2011 at 11:16 AM, Robert Maynard
>>>>>>> <robert.maynard at kitware.com> wrote:
>>>>>>>> It should be noted that the implementation in ParaViewGeo is LGPL not BSD.
>>>>>>>>
>>>>>>>> On Sun, Jun 5, 2011 at 6:33 AM, Takuya OSHIMA <oshima at eng.niigata-u.ac.jp>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Just to share my finding, ParaViewGeo has a Shapefile reader plugin.
>>>>>>>>> http://paraviewgeo.mirarco.org/index.php/Main_Page
>>>>>>>>>
>>>>>>>>> Several warnings are issued when I tried to compile the plugin in
>>>>>>>>> conjunction with the latest git master of PV. Besides I don't know if
>>>>>>>>> it is supposed to be a complete implementation, but as far as I tested
>>>>>>>>> importing geometry worked.
>>>>>>>>>
>>>>>>>>> Takuya
>>>>>>>>>
>>>>>>>>> Takuya OSHIMA, Ph.D.
>>>>>>>>> Faculty of Engineering, Niigata University
>>>>>>>>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> From: Lester Anderson <lester_anderson1963 at hotmail.com>
>>>>>>>>> Subject: [Paraview] Shapefiles to Paraview (or VTK) format
>>>>>>>>> Date: Wed, 16 Mar 2011 09:19:24 +0000
>>>>>>>>>
>>>>>>>>> >
>>>>>>>>> > Hello
>>>>>>>>> >
>>>>>>>>> > Is there an easy way to get Shapefile data from ArcGIS into Paraview? It
>>>>>>>>> > is an important file format and one which is widely used so it would be
>>>>>>>>> > great if there was a method of importing this. As I see it, one has to
>>>>>>>>> > somehow convert the format to a VTK structure (vector-based), not sure of
>>>>>>>>> > the easiest solution.
>>>>>>>>> >
>>>>>>>>> > Any suggestions?
>>>>>>>>> >
>>>>>>>>> > Thanks
>>>>>>>>> >
>>>>>>>>> > Lester
>>>>>>>>> >
>>>>>>>>> _______________________________________________
>>>>>>>>> Powered by www.kitware.com
>>>>>>>>>
>>>>>>>>> Visit other Kitware open-source projects at
>>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>>>
>>>>>>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>>>>>> http://paraview.org/Wiki/ParaView
>>>>>>>>>
>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Robert Maynard
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Powered by www.kitware.com
>>>>>>>>
>>>>>>>> Visit other Kitware open-source projects at
>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>>
>>>>>>>> Please keep messages on-topic and check the ParaView Wiki at:
>>>>>>>> http://paraview.org/Wiki/ParaView
>>>>>>>>
>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> | Aashish Chaudhary
>>>>>>> | R&D Engineer
>>>>>>> | Kitware Inc.
>>>>>>> | www.kitware.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> | Aashish Chaudhary
>>>>> | R&D Engineer
>>>>> | Kitware Inc.
>>>>> | www.kitware.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> | Aashish Chaudhary
>>>> | R&D Engineer
>>>> | Kitware Inc.
>>>> | www.kitware.com
>>>
>>
>>
>>
>> --
>> | Aashish Chaudhary
>> | R&D Engineer
>> | Kitware Inc.
>> | www.kitware.com
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com


More information about the ParaView mailing list