[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] can not get st_split to work.
From: "Regina Obe" <lr () pcorp ! us>
Date: 2019-12-23 19:31:02
Message-ID: 003a01d5b9c7$84029590$8c07c0b0$ () pcorp ! us
[Download RAW message or body]
This is a multipart message in MIME format.
[Attachment #2 (multipart/alternative)]
This is a multipart message in MIME format.
I don't see your blade CTE used at all and both a and b are roads which
wouldn't work with ST_Split, since the blade needs to be one dimension lower
than the thing you are splitting.
So the error you are getting "Splitter line has linear intersection with
input SQL state: XX000"
Is because your intersection literally is returning a line instead a point.
From: postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] On Behalf
Of paul.malm@lfv.se
Sent: Monday, December 23, 2019 2:52 AM
To: postgis-users@lists.osgeo.org
Subject: [postgis-users] can not get st_split to work.
Hi ,
I've created a point-table (point) where I would like to split the lines in
table roads.
SQL:
CREATE TABLE roads_splitted AS
WITH
blade AS (SELECT ST_Collect(the_geom) AS the_geom FROM point)
SELECT fid, (ST_Dump
(ST_Split(
a.the_geom, (SELECT
ST_Collect(b.the_geom) AS geom FROM
roads AS b WHERE ST_Intersects(a.the_geom, b.the_geom)
)
)
)).geom
FROM roads AS a
UNION ALL SELECT fid, the_geom FROM roads AS a
WHERE NOT EXISTS (
SELECT 1 FROM point AS b WHERE ST_Intersects(a.the_geom,
b.the_geom)
);
I'm getting this error message:
ERROR: Splitter line has linear intersection with input SQL state: XX000
Anyone who knows wat I'm doing wrong? Linear intersection with a point and a
line?
Kind regards,
Paul
[Attachment #5 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" \
CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 \
(filtered medium)"><style><!-- /* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>I don’t see \
your blade CTE used at all and both a and b are roads which wouldn’t work with \
ST_Split, since the blade needs to be one dimension lower than the thing you are \
splitting.<o:p></o:p></span></p><p class=MsoNormal><span \
style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span \
style='color:#1F497D'>So the error you are getting “</span><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'>Splitter \
line has linear intersection with input SQL state: XX000” \
<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'>Is \
because your intersection literally is returning a line instead a point.</span><span \
style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span \
style='color:#1F497D'><o:p> </o:p></span></p><div><div \
style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p \
class=MsoNormal><b>From:</b> postgis-users \
[mailto:postgis-users-bounces@lists.osgeo.org] <b>On Behalf Of \
</b>paul.malm@lfv.se<br><b>Sent:</b> Monday, December 23, 2019 2:52 AM<br><b>To:</b> \
postgis-users@lists.osgeo.org<br><b>Subject:</b> [postgis-users] can not get st_split \
to work.<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p \
class=MsoNormal>Hi ,<o:p></o:p></p><p class=MsoNormal>I’ve created a \
point-table (point) where I would like to split the lines in table \
roads.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p \
class=MsoNormal>SQL:<o:p></o:p></p><p class=MsoNormal>CREATE TABLE \
roads_splitted AS<o:p></o:p></p><p class=MsoNormal>WITH \
\
<o:p></o:p></p><p class=MsoNormal>blade AS (SELECT ST_Collect(the_geom) \
AS the_geom FROM point) <o:p></o:p></p><p \
class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>SELECT fid, \
(ST_Dump<o:p></o:p></p><p class=MsoNormal> \
(ST_Split(<o:p></o:p></p><p \
class=MsoNormal> \
&n \
bsp; a.the_geom, \
(SELECT ST_Collect(b.the_geom) AS geom FROM <o:p></o:p></p><p \
class=MsoNormal> &nbs \
p; \
&n \
bsp; &nbs \
p; roads \
AS b WHERE ST_Intersects(a.the_geom, b.the_geom)<o:p></o:p></p><p \
class=MsoNormal> \
&n \
bsp; &nbs \
p; \
&n \
bsp; )<o:p></o:p></p><p \
class=MsoNormal> \
)<o:p></o:p></p><p \
class=MsoNormal> &nbs \
p; \
)).geom <o:p></o:p></p><p class=MsoNormal>FROM roads AS a <o:p></o:p></p><p \
class=MsoNormal>UNION ALL SELECT fid, the_geom FROM roads AS a <o:p></o:p></p><p \
class=MsoNormal>WHERE NOT EXISTS (<o:p></o:p></p><p \
class=MsoNormal> SELECT \
1 FROM point AS b WHERE ST_Intersects(a.the_geom, \
b.the_geom)<o:p></o:p></p><p class=MsoNormal>);<o:p></o:p></p><p \
class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m getting this error \
message:<o:p></o:p></p><p class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'>ERROR: \
Splitter line has linear intersection with input SQL state: \
XX000<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'>Anyone \
who knows wat I’m doing wrong? Linear intersection with a point and a \
line?<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'>Kind \
regards,<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:9.5pt;font-family:Consolas;color:#222222;background:white'>Paul</span><o:p></o:p></p><p \
class=MsoNormal><o:p> </o:p></p></div></body></html>
[Attachment #6 (text/plain)]
_______________________________________________
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