How to Load data with GDAL


(Phillip Allen) #1

Hi all,

I am just getting started with ParaView and am interested in working with my GIS (Geochemical/Geology/Mining) data. Much is stored in my PostgreSQL/PostGIS database.

I see that ParaView can import/load data using the gdal drivers but I cannot discover how to do it?
Are there any examples of loading data using gdal?

regards,
Phil


(Dan Lipsa) #2

Phil,
You’ll need to compile ParaView from source and enable

PARAVIEW_ENABLE_GDAL

You’ll have to have GDAL library installed on your computer so that it can be used by the build.

On my Ubuntu 18.04 I have libgdal-dev installed.

Dan


(Phillip Allen) #3

Dan,
Thanks.
I am on Windows 10 so I will have to read up on what is necessary.
So again any suggestions from the community would be nice.

Phil


(Bane Sullivan (PVGeo)) #4

Hi @pallen! PVGeo might be a project of interest to you!

I’m the lead developer for PVGeo and I’d be happy to get some feature requests going for your data types and formats! Essentially PVGeo provides a way to rapidly develop new geoscience focused reader and filter algorithms that can be used directly in ParaView’s graphical user interface or in a Python environment with VTK friendly libraries like vtki.

I’ve been using the Python gdal package to load geotiffs into ParaView lately for a project and have it on my agenda to migrate that code into PVGeo. I’d love to hear how you use ParaView for geological/mining data/model visualization!


(Frank Horowitz) #5

Hi All,
OK, so I managed to compile Paraview (v5.6.0) with GDAL (and OGR) enabled. At this point, I see .shp files added to the “File Open” dialog, but none of the other GDAL/OGR file types appear to be available. While I could always convert vector stuff from my PostGIS database to .shp files, I’m just wondering of there is some other way of connecting directly to other GDAL/OGR file types that are supported by the library?


(Mathieu Westphal (Kitware)) #6

Which file extension are your files ?


(Dan Lipsa) #8

I see that only tif and shp are added as a file extensions that ParaView knows about.

I’ll work on a MR to add those other extensions to ParaView.

Dan


(Dan Lipsa) #9

See
https://gitlab.kitware.com/paraview/paraview/merge_requests/3105


(Dan Lipsa) #10

I just merged this MR. Please let us know if this works better for your data.

Dan


(Frank Horowitz) #11

Thank you! Yes, a couple other of my common formats appear to be importing just fine! (I have not tested exhaustively, however.)

One thing not working is an option supported by GDAL that is a newly created one-file-only alternative to shapefiles: the OGC geopackage format https://www.geopackage.org/. It is actually an sqlite database underneath, so it is not surprising that your I/O routines expecting rasters or vectors don’t quite know what to do with one. (I tested with a .gpkg containing vector data. While it showed up in the pipeline browser, I couldn’t discover any way to actually display the information.)

Your GDAL support is very, very promising, and putting viable geopackage support behind the GDAL I/O routines would be a tremendous addition!

Many thanks for your efforts in this area!!!


(Dan Lipsa) #12

Thank you! Yes, a couple other of my common formats appear to be importing just fine! (I have not tested exhaustively, however.)

Great. Thanks for testing.

One thing not working is an option supported by GDAL that is a newly created one-file-only alternative to shapefiles: the OGC geopackage format https://www.geopackage.org/. It is actually an sqlite database underneath, so it is not surprising that your I/O routines expecting rasters or vectors don’t quite know what to do with one. (I tested with a .gpkg containing vector data. While it showed up in the pipeline browser, I couldn’t discover any way to actually display the information.)

Do you have a file you can share with us? If GDAL can read that file we should be able to read it as well.

Your GDAL support is very, very promising, and putting viable geopackage support behind the GDAL I/O routines would be a tremendous addition!

Thank you for your interest! Let us know of things you would like to see in this geopackage. We do intend to work on improving support for geovisualization in ParaView.

Many thanks for your efforts in this area!!!

Thank you for you support,

Best,

Dan