How to Load data with GDAL

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

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

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

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!

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?

Which file extension are your files ?

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

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

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

Dan

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!!!

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

Hi!
I am trying to build paraview with GDAL enabled with no luck. I am on windows 10, with latest cmake 3.15.1, Qt 5.12, VS 2019. I can make a build without GDAL enabled but with it I get errors (see attached file). I tried two different GDAL libraries GDAL (3.0.1) and Libgdal (3.0.1) from Anaconda Cloud and gdal (3.1.0) and gdal-dev (3.1.0) from OSGeo.
Is there a specific version/library of GDAL I need to use?
Should it work with VS compiler? I tried with ninja but with it I can’t even get a normal build.

I am new to building from source so I would appriciate your help.
Best,
Lovrenc
build_errors.txt (10.0 KB)

please open your own topic.