[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] PostGIS "Subdivide" should insert vertex where subdivision lines intersect
From: Marco Boeringa <marco () boeringa ! demon ! nl>
Date: 2021-02-24 10:58:39
Message-ID: dd36fff1-0186-98b0-2470-5c5d0867627b () boeringa ! demon ! nl
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Darafei,
I am not a PostGIS, nor C(++) developer, so unfortunately can't help
with coding. I also have no idea of the technical consequences of what I
am asking here, so it is merely a suggestion at this point.
"Subdivision should be done in target projection as a final step of
processing."
I am just speaking as a GIS user here. I understand 'ST_Subdivide' is a
kind of "end-of-pipeline" process.
However, the data coming out is simply not guaranteed to be used in
single "target projection" nowadays. With increasing usage of WFS and
vector tile services, the ability to reproject the data resulting from
'ST_Subdivide', is of increasing value. Web services or GIS's using the
data primarily for "dumb" display, not subsequent processing or
geographical analysis, may be perfectly happy with subdivided polygons
(and may even need it for performance reasons).
Hence it would be a kind of nice to have such an option to insert an
extra vertex, and allow "seamless/gap-less" reprojection to another
projection.
Marco
Op 24-2-2021 om 11:19 schreef Darafei "Komяpa" Praliaskouski:
> Hello Marco,
>
> Subdivision should be done in target projection as a final step of
> processing. If you expect to keep topology after reprojection, you
> should be either merging the polygon back before the reprojection, or
> investing in using the topology framework of postgis. That's the base
> of all overlay operations.
>
> Insertion of an extra vertex breaks the logic of "every time you do a
> split on a node, you have less nodes in each half" and will lead to
> undesired behavior in sawtooth polygons. Thus behavior you're
> requesting has to be under a flag.
>
> Please send in the pull request for keeping the nodes.
>
>
>
> On Wed, Feb 24, 2021 at 1:08 PM Marco Boeringa
> <marco@boeringa.demon.nl <mailto:marco@boeringa.demon.nl>> wrote:
>
> Hi all,
>
> I don't know how much of an effort it would be, but I think it
> would be
> nice if PostGIS's "Subdivide" was enhanced to insert a vertex where
> subdivision lines "intersect". Currently, when a large shape is
> subdivided, if a vertical sudivide line "hits" a horizontal one, the
> sub-part of the large geometry being subdivided that is above or
> below
> the horizontal subdivision line, won't receive a vertex where the
> vertical subdivision line "hits" it.
>
> This has the negative consequence that as soon as you start
> reprojecting
> the geometries resulting of this subdivide operation to another
> projection and depending on that projection's properties, e.g. with
> on-the-fly projection in QGIS, that the three geometries around this
> "virtual" intersection of subdivision lines, won't match, and show a
> clearly visible gap.
>
> This could be prevented if "Subdivide" always inserted an extra
> vertex
> at the intersection of the subdivision lines, even if the geometry
> part
> above or below the horizontal subdivision line, won't be cut
> vertically
> at that point.
>
> Marco
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org <mailto:postgis-users@lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/postgis-users
> <https://lists.osgeo.org/mailman/listinfo/postgis-users>
>
>
>
> --
> Darafei "Komяpa" Praliaskouski
> OSM BY Team - http://openstreetmap.by/ <http://openstreetmap.by/>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
[Attachment #5 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Darafei,</p>
<p>I am not a PostGIS, nor C(++) developer, so unfortunately can't
help with coding. I also have no idea of the technical
consequences of what I am asking here, so it is merely a
suggestion at this point.<br>
</p>
<p>"Subdivision should be done in target projection as a final step
of processing."</p>
<p>I am just speaking as a GIS user here. I understand
'ST_Subdivide' is a kind of "end-of-pipeline" process. <br>
</p>
<p>However, the data coming out is simply not guaranteed to be used
in single "target projection" nowadays. With increasing usage of
WFS and vector tile services, the ability to reproject the data
resulting from 'ST_Subdivide', is of increasing value. Web
services or GIS's using the data primarily for "dumb" display, not
subsequent processing or geographical analysis, may be perfectly
happy with subdivided polygons (and may even need it for
performance reasons). <br>
</p>
<p>Hence it would be a kind of nice to have such an option to insert
an extra vertex, and allow "seamless/gap-less" reprojection to
another projection. <br>
</p>
<p> Marco</p>
<p><br>
</p>
<div class="moz-cite-prefix">Op 24-2-2021 om 11:19 schreef Darafei
"Komяpa" Praliaskouski:<br>
</div>
<blockquote type="cite"
cite="mid:CAC8Q8t+hn0VV4-9__YdSs+CWXZDsELHN3-16ydP__muMDmKUDw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello Marco,
<div><br>
</div>
<div>Subdivision should be done in target projection as a final
step of processing. If you expect to keep topology after
reprojection, you should be either merging the polygon back
before the reprojection, or investing in using the topology
framework of postgis. That's the base of all overlay
operations.<br>
<br>
</div>
<div>Insertion of an extra vertex breaks the logic of "every
time you do a split on a node, you have less nodes in each
half" and will lead to undesired behavior in sawtooth
polygons. Thus behavior you're requesting has to be under a
flag.</div>
<div><br>
</div>
<div>Please send in the pull request for keeping the nodes.</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Feb 24, 2021 at 1:08
PM Marco Boeringa <<a href="mailto:marco@boeringa.demon.nl"
moz-do-not-send="true">marco@boeringa.demon.nl</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
all,<br>
<br>
I don't know how much of an effort it would be, but I think it
would be <br>
nice if PostGIS's "Subdivide" was enhanced to insert a vertex
where <br>
subdivision lines "intersect". Currently, when a large shape
is <br>
subdivided, if a vertical sudivide line "hits" a horizontal
one, the <br>
sub-part of the large geometry being subdivided that is above
or below <br>
the horizontal subdivision line, won't receive a vertex where
the <br>
vertical subdivision line "hits" it.<br>
<br>
This has the negative consequence that as soon as you start
reprojecting <br>
the geometries resulting of this subdivide operation to
another <br>
projection and depending on that projection's properties, e.g.
with <br>
on-the-fly projection in QGIS, that the three geometries
around this <br>
"virtual" intersection of subdivision lines, won't match, and
show a <br>
clearly visible gap.<br>
<br>
This could be prevented if "Subdivide" always inserted an
extra vertex <br>
at the intersection of the subdivision lines, even if the
geometry part <br>
above or below the horizontal subdivision line, won't be cut
vertically <br>
at that point.<br>
<br>
Marco<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank"
moz-do-not-send="true">postgis-users@lists.osgeo.org</a><br>
<a
href="https://lists.osgeo.org/mailman/listinfo/postgis-users"
rel="noreferrer" target="_blank" \
moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br> \
</blockquote> </div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">Darafei "Komяpa" Praliaskouski<br>
OSM BY Team - <a href="http://openstreetmap.by/"
target="_blank" moz-do-not-send="true">http://openstreetmap.by/</a><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" \
wrap="">_______________________________________________ postgis-users mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a> <a \
class="moz-txt-link-freetext" \
href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
</body>
</html>
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic