Re: [postgis-users] breake lines

2020-10-27 Thread paul.malm
Hi, I’ve checked: all geometries are of type ST_MultiLineString Kind regards, Paul Från: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] För Malm, Paul (Operations AIM) Skickat: den 27 oktober 2020 13:10 Till: postgis-users@lists.osgeo.org Ämne: Re: [postgis-users] breake lines

Re: [postgis-users] breake lines

2020-10-27 Thread paul.malm
Thanks, will check! /paul Från: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] För Alexandre Neto Skickat: den 27 oktober 2020 12:40 Till: PostGIS Users Discussion Ämne: Re: [postgis-users] breake lines Hello Paul, It seems that, at least, one geometry in the data table is not

Re: [postgis-users] breake lines

2020-10-27 Thread Alexandre Neto
Hello Paul, It seems that, at least, one geometry in the data table is not correctly defined. Use this to confirm: SELECT geom, ST_Geometrytype(geom) FROM data; Best regards, Alexandre Neto QGIS/PostGIS Support www.cooperative.net On Tue, Oct 27, 2020 at 9:40 AM wrote: > > > Hi I would like

[postgis-users] breake lines

2020-10-27 Thread paul.malm
Hi I would like to break lines in intersections of polygons, but without erasing anything. I have used this (but now suddenly, it does not work) : Create table tmpint2 as WITH data AS ( SELECT * FROM public."linesToBeCut" AS t(id, geom) ), cutter AS ( SELECT * FROM "cutterPolygons" AS t(g

Re: [postgis-users] breake lines

2019-09-09 Thread Martin Davis
es are cutted but here are missing a lot of > cutted lines (is it because of lines intersected several times ) > > > > *Från:* postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] *För > *Martin Davis > *Skickat:* den 9 september 2019 00:10 > *Till:* PostGIS Users Dis

Re: [postgis-users] breake lines

2019-09-08 Thread paul.malm
ines intersected several times ) Från: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] För Martin Davis Skickat: den 9 september 2019 00:10 Till: PostGIS Users Discussion Ämne: Re: [postgis-users] breake lines You have to love how SQL always provides multiple ways of expressing things

Re: [postgis-users] breake lines

2019-09-08 Thread Martin Davis
You have to love how SQL always provides multiple ways of expressing things (and the options increase with each new release of the standard). So here's Solution #3 to this problem. This one uses the nifty Postgres JOIN LATERAL functionality. I think it's the simplest of the 3 alternatives, but I

Re: [postgis-users] breake lines

2019-09-06 Thread Martin Davis
To be more concrete. the 'id' column in the example is a proxy for the full set of attribute columns in the data table. So wherever 'id' appears in a SELECT list you will need to substitute the full set of required columns. On Fri, Sep 6, 2019 at 10:37 AM Martin Davis wrote: > > > On Fri, Sep 6

Re: [postgis-users] breake lines

2019-09-06 Thread Martin Davis
On Fri, Sep 6, 2019 at 5:48 AM wrote: > Hi, I’ve succeeded in creating the table as you suggested Martin > (Thanks!). With some small modifications (CollectionExtract etc.) > > The problem is that I would like to transfer all attributes from the > original file to the result file. I’ve tried so m

Re: [postgis-users] breake lines

2019-09-06 Thread paul.malm
FROM "tmp"; ALTER TABLE "tmp2" DROP COLUMN IF EXISTS geom; Från: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] För Martin Davis Skickat: den 6 september 2019 00:02 Till: PostGIS Users Discussion Ämne: Re: [postgis-users] breake lines Here's a slightly diffe

Re: [postgis-users] breake lines

2019-09-06 Thread paul.malm
@lists.osgeo.org Ämne: Re: [postgis-users] breake lines Hi Another option to handle merging off different simple feature datasets into a single dataset can be Postgis Topology. What we basically do is that we pipe the datasets into Postgis Topology which solves the problems related to breaking up lines and

Re: [postgis-users] breake lines

2019-09-06 Thread Lars Aksel Opsahl
: Wednesday, September 4, 2019 1:53 PM To: postgis-users@lists.osgeo.org Subject: Re: [postgis-users] breake lines Hi, If I understand your question correct, yes I would like to break all lines in the intersections with another layer. No I have not tried MultiLinestrings comprised of all lines

Re: [postgis-users] breake lines

2019-09-05 Thread Martin Davis
Here's a slightly different way to do the same thing. Instead of using a LEFT JOIN to find the non-split lines, it checks whether the result of the ST_Collect of intersecting lines, and then either computes the split or keeps the original input line. WITH data AS ( SELECT * FROM (VALUES

Re: [postgis-users] breake lines

2019-09-05 Thread Martin Davis
On Thu, Sep 5, 2019 at 6:38 AM wrote: > > > > Result*: all of the lines* from LayerToBeSplitted where copied into tmp2*, > not just the ones NOT intersecting*, and I don't know how to > > get the attributes to be transferred to tmp2 for those new lines. > To get the lines from LayerToBeSplitted

Re: [postgis-users] breake lines

2019-09-05 Thread paul.malm
erent between the two tables, I think... Kind regards, Paul Från: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] För Martin Davis Skickat: den 5 september 2019 00:02 Till: PostGIS Users Discussion Ämne: Re: [postgis-users] breake lines On Wed, Sep 4, 2019 at 4:54 AM mailto:paul.m..

Re: [postgis-users] breake lines

2019-09-05 Thread Komяpa
On Tue, Sep 3, 2019 at 7:48 PM wrote: > It is not possible to use update on the table when splitting one geomety > to two. > For cases where you want to change number of rows in processing, there's a CTE trick that is INSERT FROM DELETE, you can find an example in ST_Subdivide manual page and ad

Re: [postgis-users] breake lines

2019-09-04 Thread Martin Davis
On Wed, Sep 4, 2019 at 4:54 AM wrote: > Hi, > > If I understand your question correct, yes I would like to break all lines > in the intersections with another layer. > > No I have not tried MultiLinestrings comprised of all lines that are > intersecting the lines to be broken. Don’t know how to d

Re: [postgis-users] breake lines

2019-09-04 Thread paul.malm
sers [mailto:postgis-users-boun...@lists.osgeo.org] För Martin Davis Skickat: den 3 september 2019 19:18 Till: PostGIS Users Discussion Ämne: Re: [postgis-users] breake lines Have you tried using ST_Split passing each input line and for the second argument a MultiLineString comprised of all

Re: [postgis-users] breake lines

2019-09-03 Thread Andrea Peri
St_node could work with a collection. I guess the collection could have the two geometries. A. Il mar 3 set 2019, 19:36 Martin Davis ha scritto: > If I'm understanding the requirement correctly, the problem with ST_Node > is that it accepts a single geometry and nodes all lines in that geometry.

Re: [postgis-users] breake lines

2019-09-03 Thread Martin Davis
If I'm understanding the requirement correctly, the problem with ST_Node is that it accepts a single geometry and nodes all lines in that geometry. It sounds like what's required is an ST_Node variant which would accept two arguments: a target geometry and a noding geometry. The target geometry w

Re: [postgis-users] breake lines

2019-09-03 Thread Andrea Peri
Hi, I will a chance trying to use the ST_Node. A. Il mar 3 set 2019, 19:18 Martin Davis ha scritto: > Have you tried using ST_Split passing each input line and for the second > argument a MultiLineString comprised of all lines that it might intersect > (obtained via BBOX or ST_Intersects que

Re: [postgis-users] breake lines

2019-09-03 Thread Martin Davis
Have you tried using ST_Split passing each input line and for the second argument a MultiLineString comprised of all lines that it might intersect (obtained via BBOX or ST_Intersects query)? It seems like that should not create any duplicate linework from the input line. As far as I know there's

Re: [postgis-users] breake lines

2019-09-03 Thread paul.malm
Users Discussion Ämne: Re: [postgis-users] breake lines You probably want ST_Split(). If you are working with your previous example, one way to avoid precision problems after applying the split might be to use the linear referencing funtions to shrink the lines by your preferred tolerance. In case you h

Re: [postgis-users] breake lines

2019-09-01 Thread paul.malm
Thanks, Simon! Från: postgis-users [mailto:postgis-users-boun...@lists.osgeo.org] För Simon Norris Skickat: den 30 augusti 2019 18:14 Till: PostGIS Users Discussion Ämne: Re: [postgis-users] breake lines You probably want ST_Split(). If you are working with your previous example, one way to

Re: [postgis-users] breake lines

2019-08-30 Thread Simon Norris
You probably want ST_Split(). If you are working with your previous example, one way to avoid precision problems after applying the split might be to use the linear referencing funtions to shrink the lines by your preferred tolerance. In case you haven't already seen it, this illustrates the nu

[postgis-users] breake lines

2019-08-30 Thread paul.malm
Hi, What PostGIS command do I use to breake linestrings or multilinestrings using another "breaking" table including linestrings or multilinestrings, without erasing any points or adding anything from the "braking" layer? Thanks in advance, Paul ___ p