# Double Precision for ASCII Legacy VTK?

**URL:** https://discourse.paraview.org/t/double-precision-for-ascii-legacy-vtk/7743
**Category:** ParaView Support
**Created:** [August 2, 2021, 9:12pm UTC](https://discourse.paraview.org/t/double-precision-for-ascii-legacy-vtk/7743 "2021-08-02T21:12:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![alechouse](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@alechouse](https://discourse.paraview.org/u/alechouse)
#### Post date: [August 2, 2021, 9:12pm UTC](https://discourse.paraview.org/t/double-precision-for-ascii-legacy-vtk/7743/1 "2021-08-02T21:12:18Z")

</div>

Are there currently any methods to save data (using ascii) as a legacy VTK with double precision (or to specify the number of sig figs) like you can with CSV for instance? I am trying to order some data sets so they match the order of the data in the VTK files and be pasted in (so I need the order of the connectivity preserved), but the coordinate data of very fine boundary layer meshes becomes indistinguishable due to the (presumably) single precision limit.

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [August 5, 2021, 7:04am UTC](https://discourse.paraview.org/t/double-precision-for-ascii-legacy-vtk/7743/2 "2021-08-05T07:04:05Z")

</div>

In the ASCII Legacy VTK file, you can set the **dataType** of the points to **double** as shown below to get double precision.

> DATASET UNSTRUCTURED\_GRID  
> POINTS 514 double

---

<div class="post-metadata">

### Author: ![alechouse](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/3e96dc/32.png) [@alechouse](https://discourse.paraview.org/u/alechouse)
#### Post date: [August 5, 2021, 1:12pm UTC](https://discourse.paraview.org/t/double-precision-for-ascii-legacy-vtk/7743/3 "2021-08-05T13:12:43Z")

</div>

Great news! Is there a place to set this so that when writing Legacy VTK from paraview it defaults to double?

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [August 6, 2021, 12:04am UTC](https://discourse.paraview.org/t/double-precision-for-ascii-legacy-vtk/7743/4 "2021-08-06T00:04:47Z")

</div>

There is no setting to set the dataType of the coordinates to double in the Legacy VTK file from ParaView. The dataType is automatically determined whether it is float or double by the precision of the output coordinate data. (To be precise, the dataType is set in vtkPoints class)

Even if you have data with double precision coordinates, it may not be easy to keep the precision of the coordinates double, because some filters in ParaView use single precision.
