1

Is there any way to reduce precision in Linestring coordinates to specified decimal point? For example:

LINESTRING (16.418792399944802 54.24801559999939, 16.4176588 54.248003)

becomes

LINESTRING (16.4187924 54.2480156, 16.4176588 54.248003)

4
  • 9
    Have you done a search query for that question and found St_ReducePrecision(geom, tolerance) ?
    – Kasper
    Commented Aug 20, 2023 at 18:17
  • 1
    @Kasper Yes. I've also tried this function on data, but it did not get me expected results.
    – zwornik
    Commented Aug 21, 2023 at 5:27
  • 1
    To get an answer or a solution, you should mention everything you tried in your question
    – Kasper
    Commented Aug 21, 2023 at 10:31
  • 2
    Does the example query from the documentation postgis.net/docs/en/ST_ReducePrecision.html SELECT ST_AsText(ST_ReducePrecision('POINT(1.412 19.323)', 0.1)); return the expected result for you?
    – user30184
    Commented Aug 21, 2023 at 10:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.