Re: [postgis-users] PostGIS topology behaviour with polygons

2022-12-07 Thread Sandro Santilli
On Wed, Dec 07, 2022 at 11:13:08AM +0100, Douglas Fan wrote: > I am trying to build topology on PostGIS with 4000+ polygons. The input are > not clean, with overlaps and gaps. I have created a procedure to commit > each update statement for each polygon so that I can catch the exception > and

Re: [postgis-users] PostGIS topology behaviour with polygons

2022-12-07 Thread Douglas Fan
[image: test_withgap.png] [image: test_withoutgap.png] On Wed, Dec 7, 2022 at 11:13 AM Douglas Fan wrote: > Hi all, > > Earlier I have asked a question about topology here >

[postgis-users] PostGIS topology behaviour with polygons

2022-12-07 Thread Douglas Fan
Hi all, Earlier I have asked a question about topology here . I still cannot understand the mechanism behind it so I hope that I may get some help here. I am

[postgis-users] Postgis topology survey (FOSS4G 2022 - Firenze)

2022-08-22 Thread Lars Aksel Opsahl
Hi Nibio.no together with Sandro Santilli has been working on Postgis Topology and ecosystems around for some time, that now are available for many hundred users in Norway. But we miss information about others who are working with/testing Postgis Topology around the world. Here is a very

Re: [postgis-users] Postgis Topology and slow topology.TopoGeo_addLinestring on big datasets

2020-02-26 Thread Lars Aksel Opsahl
Hi >From: postgis-users on behalf of >Sandro Santilli >Sent: Wednesday, February 26, 2020 12:19 PM >To: PostGIS Users Discussion >Subject: Re: [postgis-users] Postgis Topology and slow >topology.TopoGeo_addLinestring on big datasets

Re: [postgis-users] Postgis Topology and slow topology.TopoGeo_addLinestring on big datasets

2020-02-26 Thread Sandro Santilli
On Wed, Feb 26, 2020 at 11:10:36AM +, Lars Aksel Opsahl wrote: > Yes I can do that but then I have to remove this extra lines when done. > This should by able to do by checking if two faces that share edge belongs > the same original polygon. Yes, it is a way. > If checkout this code "git

Re: [postgis-users] Postgis Topology and slow topology.TopoGeo_addLinestring on big datasets

2020-02-26 Thread Lars Aksel Opsahl
Hi >From: postgis-users on behalf of >Sandro Santilli >Sent: Wednesday, February 26, 2020 11:18 AM >To: PostGIS Users Discussion >Subject: Re: [postgis-users] Postgis Topology and slow >topology.TopoGeo_addLinestring on big datasets > >On Wed, Feb 26, 2020 a

Re: [postgis-users] Postgis Topology and slow topology.TopoGeo_addLinestring on big datasets

2020-02-26 Thread Sandro Santilli
On Wed, Feb 26, 2020 at 09:59:52AM +, Lars Aksel Opsahl wrote: > * The output from pg_stat_statements is below, The only strange thing I > see here is that the query “SELECT edge_id,geom FROM > "test_topo_ar5".edge_data WHERE edge_id IN ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,” > has length of

[postgis-users] Postgis Topology and slow topology.TopoGeo_addLinestring on big datasets

2020-02-26 Thread Lars Aksel Opsahl
Hi I have question about Postgis Topology and what seems like scaling problem when converting simple feature datasets to Postgis Topology. The code I am testing on is here. https://github.com/larsop/resolve-overlap-and-gap/tree/add_postgis_topology_TopoGeo_addLinestring_thred_grid When

Re: [postgis-users] PostGIS Topology with Z coordinate

2019-01-14 Thread Berchet, Adrien
I see, thank you very much for these enlightenments. I think it would be nice to add this support to PostGIS. I think it is possible to mix PostGIS Topology and PgRouting to get a similar result so maybe it does not worth it. I will try such a mix when I have some time. Thanks again, Regards,

Re: [postgis-users] PostGIS Topology with Z coordinate

2019-01-10 Thread Sandro Santilli
On Thu, Jan 10, 2019 at 10:44:01AM +0100, Berchet, Adrien wrote: > So is it possible to manage a kind of multilayer topology, to manage > bridges and tunnels in a network for exemple? You'll need different topologies, one for each layer. But what you're really looking for is what ISO defines as

Re: [postgis-users] PostGIS Topology with Z coordinate

2019-01-10 Thread Berchet, Adrien
Thank you for your answer, I reply in the text body. Le mer. 9 janv. 2019 à 17:44, Sandro Santilli a écrit : > On Tue, Jan 08, 2019 at 01:00:54PM +0100, Berchet, Adrien wrote: > > Hello, > > > > I am testing PostGIS Topology with 3D geometries and I am not sure of the > > expected behaviour in

Re: [postgis-users] PostGIS Topology with Z coordinate

2019-01-09 Thread Sandro Santilli
On Tue, Jan 08, 2019 at 01:00:54PM +0100, Berchet, Adrien wrote: > Hello, > > I am testing PostGIS Topology with 3D geometries and I am not sure of the > expected behaviour in this case. In the tests I conducted, it seems that > PostGIS Topo just ignores the Z components when searching for

[postgis-users] PostGIS Topology with Z coordinate

2019-01-08 Thread Berchet, Adrien
Hello, I am testing PostGIS Topology with 3D geometries and I am not sure of the expected behaviour in this case. In the tests I conducted, it seems that PostGIS Topo just ignores the Z components when searching for intersection between geometries and thus creates some nodes where it is not

[postgis-users] Postgis Topology Hierarchal Topogeometries

2018-11-18 Thread Gordon King
I'm seeking guidance on how to correctly organise hierarchal topogeometries. I'm working through the excellent Postgis in Action's chapter on topology and, in summary, it sets up two tables with topogeometries, one called neighbourhoods (which becomes layer 1) based on geometries loaded with

Re: [postgis-users] PostGIS Topology Error

2018-07-04 Thread Sandro Santilli
On Wed, Jul 04, 2018 at 02:01:19PM +0200, Cameron Green wrote: > Using the textbook, Mastering PostGIS chapter 8, where it deals with PostGIS > Topology. Below is the SQL commands I used. When I used SRID as 4026 and > 0,00028 as the snap threshold, the commands execute without any issues. >

Re: [postgis-users] PostGIS Topology Error

2018-07-04 Thread Cameron Green
next step will be to fix them. Kind regards, Cameron Green President - CGIS YouthMappers BSc(Hons) Geoinformatics, University of Pretoria +2783 301 3201 +2712 420 2016 From: Nicolas Ribot Sent: Wednesday, 04 July 2018 2:56 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] PostGIS

Re: [postgis-users] PostGIS Topology Error

2018-07-04 Thread Nicolas Ribot
Hi, Indeed, Postgis Topology works well to build topo from clean geometries, but can fail if input geometries have topological errors. It could be tricky to clean data with just postGIS and sql queries. Topological GIS, like GRASS, can load PostGIS data and clean them at a given precision HTH

[postgis-users] PostGIS Topology Error

2018-07-04 Thread Cameron Green
Good day, My name is Cameron Green and I am an honours (4th year) student at the University of Pretoria in South Africa. I am currently working on a project that requires me to assess the quality of data that was downloaded from OpenStreetMap (OSM), specifically, various topological errors. I

Re: [postgis-users] Postgis topology with several layers

2016-09-17 Thread Luiz Andrade
I fugured it out. This is an example on how to build a topology with more than one layer contributing: select topology.CreateTopology('topo', 3857) --creating topo geom : layer 1 select AddTopoGeometryColumn('topo', 'schema', 'table_a', 'topogeom', 'MULTIPOLYGON') --creating topo geom : layer 2

[postgis-users] Postgis topology with several layers

2016-09-16 Thread Luiz Andrade
Hi there, My name is Luiz Claudio and I'm a QGIS plugin developer. Here in Brazil we have a quite complex Spatial Data Structure (more than 200 layers). Recently, our cartographic production has changed to QGIS, but until today we use GOTHIC LAMPS2 from Laser-Scan to deal with topology. As we

Re: [postgis-users] postgis topology performance

2014-03-28 Thread Sandro Santilli
On Tue, Mar 25, 2014 at 03:13:13PM +0100, Rémi Cura wrote: Back after some other testing . (_from memory, suppressing checks in addpoints was about 2 sec instead of 3 sec. _About 21k unique points.) Here is a little comparison : (32k polylines,21k unique points, already 'topological'(

Re: [postgis-users] postgis topology performance

2014-03-28 Thread Rémi Cura
Surely ! I have to outline that grass export to postgis topology is still in beta mode. Also, I have a feeling the grass export to postgis topology uses the postgis topology functions, which kind of defeat the purpose (should bulk insert into tables). I sent a separate message, but GEOS is also

Re: [postgis-users] postgis topology performance

2014-03-25 Thread Rémi Cura
Back after some other testing . (_from memory, suppressing checks in addpoints was about 2 sec instead of 3 sec. _About 21k unique points.) Here is a little comparison : (32k polylines,21k unique points, already 'topological'( no need to cut the lines) ,with a lot of attributes) Postgis

Re: [postgis-users] postgis topology performance

2014-03-20 Thread Rémi Cura
Hey, addlinestring is topology.topogeo_addlinestring(atopology character varying, aline geometry, tolerance double precision DEFAULT 0). My version : POSTGIS=2.2.0dev r12325 GEOS=3.5.0dev-CAPI-1.9.0 r3963 PROJ=Rel. 4.8.0, 6 March 2012 GDAL=GDAL 1.11dev, released 2013/04/13 LIBXML=2.8.0 TOPOLOGY

[postgis-users] postgis topology performance

2014-03-19 Thread Rémi Cura
Hey, We tried several way to load an already topologically correct shapefile into postgis topology . 10k lines loaded _Using totopogeom : 750 sec _Using addlinestring : 246 sec _Manually using addnode and st_addedgemodface : 86 sec. Still very slow :-/ Considering manually filling table

Re: [postgis-users] postgis topology performance

2014-03-19 Thread Sandro Santilli
On Wed, Mar 19, 2014 at 06:43:21PM +0100, Rémi Cura wrote: Hey, We tried several way to load an already topologically correct shapefile into postgis topology . 10k lines loaded _Using totopogeom : 750 sec _Using addlinestring : 246 sec _Manually using addnode and st_addedgemodface : 86

[postgis-users] postgis topology strange behavior

2014-02-24 Thread Gonçalo Revez
Hello, I'm using the postgis topology with the following example below. It inserts three contiguous polygons, but the third has a strange behavior. It seems that the polygon doesn't snap totally to the other polygon (with model tolerance of 0.1), where he should split the edges and create a

Re: [postgis-users] postgis topology strange behavior

2014-02-24 Thread Sandro Santilli
On Mon, Feb 24, 2014 at 12:01:28PM +, Gonçalo Revez wrote: Hello, I'm using the postgis topology with the following example below. It inserts three contiguous polygons, but the third has a strange behavior. It seems that the polygon doesn't snap totally to the other polygon (with

Re: [postgis-users] postgis topology strange behavior

2014-02-24 Thread Sandro Santilli
On Mon, Feb 24, 2014 at 03:06:04PM +, Gonçalo Revez wrote: On Mon, Feb 24, 2014 at 1:53 PM, Sandro Santilli s...@keybit.net wrote: Does ValidateTopology catches that error ? *G: No the validation doesn't catch any error.* My bet is that there isn't any. In the topology primitives

Re: [postgis-users] postgis topology

2014-01-15 Thread Ludovic Granjon
Hello (Bonjour Christophe) I don't use french cadastre, only specific archaelogical data. Thanks for this, I try but, I don't realy understand how worked topogeo_addpolygon. If I do : CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology; SET search_path = topology,public; I import my

Re: [postgis-users] postgis topology

2014-01-15 Thread Ludovic Granjon
Hello I think, I can do SELECT st_geometryN(geom,1) FROM ec; without error I get POLYGON((504935.64142 2310827.805,504952.19387 2310825.6349,504964.4124 2310824.033,504964.19178 2310823.56,504964.03716 2310822.9832,504963.98743 2310822.5117,504948.94991

Re: [postgis-users] postgis topology

2014-01-15 Thread Rémi Cura
Last chance : this function is a a sloghtly modified topogeom constructor that won't stop when habving an error. This way you can import everything that works, and then deal with the unworking ... 2014/1/15 Sandro Santilli s...@keybit.net On Tue, Jan 14, 2014 at 04:10:45PM +0100, Ludovic

Re: [postgis-users] postgis topology

2014-01-15 Thread Rémi Cura
-- Function: public.rc_totopogeomwithouterrors(geometry, character varying, integer, double precision) -- DROP FUNCTION public.rc_totopogeomwithouterrors(geometry, character varying, integer, double precision); CREATE OR REPLACE FUNCTION public.rc_totopogeomwithouterrors(ageom geometry,

[postgis-users] postgis topology

2014-01-14 Thread Ludovic Granjon
Hi all I try to import a polygon layer to postgis and build topology with tolerance. I try something like that SELECT CreateTopology('ec_topo2', 27572); SELECT AddTopoGeometryColumn('ec_topo2', 'public', 'ec', 'topogeom2', 'MULTIPOLYGON'); UPDATE ec SET topogeom2 = toTopoGeom(geom,

Re: [postgis-users] postgis topology

2013-05-20 Thread Sandro Santilli
On Sun, May 19, 2013 at 10:03:05AM +0200, Eva Linhartová wrote: Hi, thx from your advice, I dropped topology DP_TOPO2 and create new one called dp_topo. I didn't get the error, but the query still working (11 hours). I expected long time for it because it's working with 7000 polygons, but Is

Re: [postgis-users] postgis topology

2013-05-19 Thread Eva Linhartová
-- *From:* postgis-users-boun...@lists.osgeo.org [mailto: postgis-users-boun...@lists.osgeo.org] *On Behalf Of *Eva Linhartová *Sent:* Saturday, May 18, 2013 6:18 AM *To:* postgis-users@lists.osgeo.org *Subject:* [postgis-users] postgis topology Hi, I'm trying

[postgis-users] postgis topology

2013-05-18 Thread Eva Linhartová
Hi, I'm trying to insert geometry data to topology structure. I tryed it on my sample data before and it was ok, but now if I use polygon table with 7000 polygons or 2 lines can't work. I get error like: ERROR: schema dp_topo2 does not exist LINE 1: SELECT

Re: [postgis-users] postgis topology

2013-05-18 Thread Paragon Corporation
_ From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of Eva Linhartová Sent: Saturday, May 18, 2013 6:18 AM To: postgis-users@lists.osgeo.org Subject: [postgis-users] postgis topology Hi, I'm trying to insert geometry data to topology structure