[postgis-users] PostGis introduction doc code block seems wrong....
Bo Victor Thomsen
bo.victor.thomsen at gmail.com
Thu Apr 21 02:12:39 PDT 2022
Am I the only one that get "semantic itch" looking at the UPDATE
expression? I would prefer it like this:
*UPDATE*nyc_neighborhoods
*SET*geom_invalid=geom,
geom =ST_MakeValid(geom) *WHERE**NOT*ST_IsValid(geom);
where you save the original "geom" value into another column
"geom_invalid" before rectifying it and saving it into the original column.
Disclaimer: I have no clue about the internal methods of the SQL
interpreter and how and in which order it assigns values.
Med venlig hilsen / Kind regards
Bo Victor Thomsen
Den 20-04-2022 kl. 16:59 skrev Regina Obe:
>
> Thanks for the errata. Corrected now.
>
> *From:*postgis-users [mailto:postgis-users-bounces at lists.osgeo.org]
> *On Behalf Of *Jian He
> *Sent:* Wednesday, April 20, 2022 5:12 AM
> *To:* PostGIS Users Discussion <postgis-users at lists.osgeo.org>
> *Subject:* [postgis-users] PostGis introduction doc code block seems
> wrong....
>
> 23. Validity — Introduction to PostGIS
> <https://postgis.net/workshops/postgis-intro/validity.html>
>
> last code block,
>
> /-- Fix invalid and save the original/
> *UPDATE*nyc_neighborhoods
> *SET*geom =ST_MakeValid(geom),
> invalid_geom =geom
> *WHERE**NOT*ST_IsValid(geom);
>
> I think it should be:
>
> /-- Fix invalid and save the original/
> *UPDATE*nyc_neighborhoods
> *SET*geom =ST_MakeValid(geom),
> geom_invalid=geom*WHERE**NOT*ST_IsValid(geom);
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220421/49dee97c/attachment.html>
More information about the postgis-users
mailing list