'Geometry Column on PostGIS truncated the values after decimal point

I am trying to insert the Geometry data from KWT into the postgresql (Postgresql 12 with PostGIS extension).

WKT of Geometry used is-

POLYGON ((621122.85028076171875 3177262.60992431640625, 621121.83392333984375 3177255.69830322265625, ...... ))

When I convert to Geometry using ST_GeometryFromText() function before inserting to the Geometry data typed table the values gets truncated as follows-

-- converted
POLYGON ((621122.8502807617 3177262.6099243164, 621121.8339233398 3177255.6983032227, .....))

How can we prevent the values from truncating while storing on Geometry column?



Solution 1:[1]

AFAIK PistGIS like most other systems store coordinates as double floating point type. This gives you 15-17 decimal points precision (total - before and after dot), and is usually enough to keep precision around micrometer or less (depends on projection).

Precision of the values you have is well into fractions of nanometers. Are you sure you care about it? If so, you will likely have to use a different system or store it as plain text rather than geometry values. But more likely the PostGIS precision is OK, and this rounding can be ignored.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Michael Entin