>Message: 1 >Date: Thu, 8 Sep 2022 00:08:23 +0200 >From: Sandro Santilli <s...@kbt.io> >To: GEOS Development List <geos-devel@lists.osgeo.org> >Subject: Re: [geos-devel] GEOS C API for Polygonal Coverage > operations? >Message-ID: <YxkWV0gym7hqAesi@c19> >Content-Type: text/plain; charset=us-ascii > >On Tue, Sep 06, 2022 at 02:37:37PM -0700, Martin Davis wrote: >> I've started to build out operations on Polygonal Coverages in JTS ([1], >> [2]). > >[...] > >> A key question is how to expose these operations in the GEOS C API. I see >> two options: >> 1) Model a Polygonal Coverage as an array of simple Polygons (and possibly >> MultiPolygons) >> 2) Provide a Polygonal Coverage datatype (which might contain internal >> topology) > >Could a coverage datatype allow performing operations on PostGIS Topologies >w/out building the polygons for each face ? There's an ISO standard >representation of topologies, maybe such representation could be used >to transfer those topologies back and forth with GEOS ? > >--strk; > > >------------------------------ >
Hi To speed up now I sometimes use the faces directly like below so yes it would be very nice to avoid code like this: SELECT distinct t.omrade, ((t.omrade).id) FROM topo_rein.arstidsbeite_var_flate t, topology tt, topology.layer tl, topo_rein_sysdata_rvr.relation tr, topo_rein_sysdata_rvr.face tf WHERE ((t.omrade).topology_id = tt.id AND (t.omrade).layer_id = tl.layer_id AND (t.omrade).type = tl.feature_type) AND tr.topogeo_id = ((t.omrade).id) AND ((t.omrade).layer_id) = tr.layer_id AND ((t.omrade).id) = tr.topogeo_id AND tf.face_id = tr.element_id AND ((t.omrade).type) = tr.element_type AND tf.mbr && '0103000020A21000000100000005000000EF94C2D58F783C4082E16983FE605140EF94C2D58F783C40AA4578DB36945140A4B7A470A6453D40AA4578DB36945140A4B7A470A6453D4082E16983FE605140EF94C2D58F783C4082E16983FE605140' AND ST_Intersects('0103000020A21000000100000005000000EF94C2D58F783C4082E16983FE605140EF94C2D58F783C40AA4578DB36945140A4B7A470A6453D40AA4578DB36945140A4B7A470A6453D4082E16983FE605140EF94C2D58F783C4082E16983FE605140', t.omrade) So could it also be an option to let && operator to know about about Topology type is extension added as a start and then the && operator could include code like this ? '((t.omrade).topology_id = tt.id AND (t.omrade).layer_id = tl.layer_id AND (t.omrade).type = tl.feature_type) AND tr.topogeo_id = ((t.omrade).id) AND ((t.omrade).layer_id) = tr.layer_id AND ((t.omrade).id) = tr.topogeo_id AND tf.face_id = tr.element_id AND ((t.omrade).type) = tr.element_type AND' The best off course is if this was solved in geos as you suggest, but it would help a lot if the code below used the face.mbr indexes also as a start. SELECT distinct t.omrade, ((t.omrade).id) FROM topo_rein.arstidsbeite_var_flate t WHERE t.omrade && '0103000020A21000000100000005000000EF94C2D58F783C4082E16983FE605140EF94C2D58F783C40AA4578DB36945140A4B7A470A6453D40AA4578DB36945140A4B7A470A6453D4082E16983FE605140EF94C2D58F783C4082E16983FE605140' AND ST_Intersects('0103000020A21000000100000005000000EF94C2D58F783C4082E16983FE605140EF94C2D58F783C40AA4578DB36945140A4B7A470A6453D40AA4578DB36945140A4B7A470A6453D4082E16983FE605140EF94C2D58F783C4082E16983FE605140', t.omrade) Lars
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel