# How to Load data with GDAL

**URL:** https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184
**Category:** ParaView Support
**Created:** [January 25, 2019, 5:45pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184 "2019-01-25T17:45:54Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![pallen](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pallen](https://discourse.paraview.org/u/pallen)
#### Post date: [January 25, 2019, 5:45pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/1 "2019-01-25T17:45:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [January 25, 2019, 9:37pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/2 "2019-01-25T21:37:15Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pallen](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/a88e4f/32.png) [@pallen](https://discourse.paraview.org/u/pallen)
#### Post date: [January 25, 2019, 11:06pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/3 "2019-01-25T23:06:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![banesullivan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/banesullivan/32/11714_2.png) [@banesullivan](https://discourse.paraview.org/u/banesullivan)
#### Post date: [January 27, 2019, 8:45pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/4 "2019-01-27T20:45:54Z")

</div>

Hi @pallen! [PVGeo](https://github.com/OpenGeoVis/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`](https://vtkinterface.readthedocs.io/en/latest/?badge=latest).

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!

---

<div class="post-metadata">

### Author: ![fghorow](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fghorow/32/1135_2.png) [@fghorow](https://discourse.paraview.org/u/fghorow)
#### Post date: [March 10, 2019, 11:37pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/5 "2019-03-10T23:37:13Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 11, 2019, 10:10am UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/6 "2019-03-11T10:10:42Z")

</div>

Which file extension are your files ?

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [March 11, 2019, 1:53pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/8 "2019-03-11T13:53:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [March 11, 2019, 2:26pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/9 "2019-03-11T14:26:59Z")

</div>

See  
[https://gitlab.kitware.com/paraview/paraview/merge\_requests/3105](https://gitlab.kitware.com/paraview/paraview/merge_requests/3105)

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [March 11, 2019, 5:28pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/10 "2019-03-11T17:28:53Z")

</div>

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

Dan

---

<div class="post-metadata">

### Author: ![fghorow](https://discourse.paraview.org/user_avatar/discourse.paraview.org/fghorow/32/1135_2.png) [@fghorow](https://discourse.paraview.org/u/fghorow)
#### Post date: [March 14, 2019, 10:28pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/11 "2019-03-14T22:28:55Z")

</div>

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/](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!!!

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [March 15, 2019, 1:59pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/12 "2019-03-15T13:59:13Z")

</div>

> 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/](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

---

<div class="post-metadata">

### Author: ![Lovrenc\_Pavlin](https://discourse.paraview.org/user_avatar/discourse.paraview.org/lovrenc_pavlin/32/1879_2.png) [@Lovrenc\_Pavlin](https://discourse.paraview.org/u/Lovrenc_Pavlin)
#### Post date: [August 9, 2019, 1:40pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/13 "2019-08-09T13:40:45Z")

</div>

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](https://discourse.paraview.org/uploads/short-url/bXVX8Nb5YxXJ3ccvFIw09fLYq8x.txt) (10.0 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 9, 2019, 1:59pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/14 "2019-08-09T13:59:29Z")

</div>

please open your own topic.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 9, 2019, 1:59pm UTC](https://discourse.paraview.org/t/how-to-load-data-with-gdal/1184/15 "2019-08-09T13:59:37Z")

</div>


