[postgis-users] Preparing for Topology - St_CreateTopoGeo

Chris English sglish at hotmail.com
Sat Dec 3 10:22:32 PST 2011


in any case, to your point of trying to isolate a portion that triggers a bug in 
St_CreateTopoGeo, some candidates are suggested by taking the geoms reported as Error initially:

select gid, mun from unioncountyparcels where geom && ST_AsEWKT('01060000200B7D00000100000001030000000100000007000000204F2F7CE23C214140AA79907071244180EF6AE12B3D2141C0EF55BC50712441E0ACD564CC3C21414008958C7470244140F668FF823C2141C0C2B86094702441E0C3B6D3A23C21414066FBC5DD702441607EDAA7C23C2141C006372B27712441204F2F7CE23C214140AA799070712441')
 ;
(later-> possible_triggers_2)
gid____mun
37854;"2004"
27568;"2004"
31314;"2004"
32373;"2004"
34949;"2004"
36301;"2004"
36303;"2004"
37096;"2004"
133778;"2019"
133779;"2019"

or

select gid, mun from unioncountyparcels where geom && ST_AsEWKT('01060000200B7D0000010000000103000000010000000500000080CD197443872141804C827B8B72244160C59F12AC872141007C974465722441200CCDF85687214100F7FE58B6712441006624DF018721410032D76ED571244180CD197443872141804C827B8B722441');

(later -> possible_triggers)
gid_____mun
25221;"2004"
32369;"2004"
34946;"2004"
34947;"2004"
34948;"2004"

select topology.createtopology('possible_triggers', 32011);

Select topology.ST_createtopogeo('possible_triggers',St_collect(geom)) from possible_triggers;
<this populated for the second group>
"Topology possible_triggers (3), SRID 32011, precision 0
8 nodes, 12 edges, 5 faces, 0 topogeoms in 0 layers"

Select topology.ST_createtopogeo('possible_triggers_2',St_collect(geom)) from possible_triggers_2;
"Topology possible_triggers_2 populated"

Well, that approach didn't isolate.  Better thoughts on isolating?
Chris
From: sglish at hotmail.com
To: postgis-users at postgis.refractions.net
Date: Sat, 3 Dec 2011 09:22:29 -0500
Subject: Re: [postgis-users] Preparing for Topology - St_CreateTopoGeo








strk,

I think that's the next, next step, first I have to figure out the final updateof my topo tables and the topology documentation has left me head scratching, i.e. the topology.CreateTopoGeom stage:select edge_id, start_node, end_node, next_left_edge, abs_next_left_edge, next_right_edge, 
abs_next_right_edge, left_face, geom from union_cty_topo.edge_data limit 1;20952;271096;271075;20954;20954;-20953;20953;0;"01020000200B7D00000200000060C7D31DEF042041807D82545CA72441C087CB2AB504204140C7FC7E07AA2441"select face_id, mbr from union_cty_topo.face limit 2;0;""7447;"01030000200B7D00000100000005000000C087CB2AB5042041807D82545CA72441C087CB2AB5042041C0E1276882AC2441E06B43906F082041C0E1276882AC2441E06B43906F082041807D82545CA72441C087CB2AB5042041807D82545CA72441"select node_id, containing_face, geom from union_cty_topo.node limit 1;271075;;"01010000200B7D0000C087CB2AB504204140C7FC7E07AA2441"select topogeo_id, layer_id, element_id,element_type from union_cty_topo.relation limit 1;<no data>select gid, pams_pin, cost, topo  from union_cty_topo.summit_parcels limit 1;<no data>So I take the fact that I don't have node_id.containing_face, and no data in eitherrelation or summit_parcels as my failure to understand this final step of CreateTopoGeom

update union_cty_topo.summit_parcels as sp   -- sp is  summit_parcels
    set topo = topology.createtopoGeom('union_cty_topo',
            3,1
            , foo.sfaces)
from (Select s.gid, topology.TopoElementaryArray_Agg(Array[f.face.id,3]) as sfaces
        From union_cty_topo.summit_parcels as s
            Inner Join union_cty_topo.face as f on s.topo && f.mbr -- a little confusion here 
        where ST_Covers (s.geom, topology.ST_GetFaceGeometry('union_cty_topo', f.face_id))
            Group by s.gid) as foo
Where foo.gid =sp.gid;

ERROR:  schema "f" does not exist

Chris

--switched to firefox from chrome in hopes of better plain text client

> Date: Sat, 3 Dec 2011 09:44:37 +0100
> From: strk at keybit.net
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] Preparing for Topology - St_CreateTopoGeo
> 
> On Fri, Dec 02, 2011 at 10:53:16PM -0500, Chris English wrote:
> 
> > SELECT topology.st_createtopogeo('union_cty_topo',ST_Collect(geom))
> > FROM summit_parcels;
> > "Topology union_cty_topo populated"
> 
> Great ! Congratulations !
> Now maybe you would want to try with another subset of the data
> as I think you were trying to isolate a portion of it that triggers
> a bug in ST_CreateTopoGeo, right ?
> 
> --strk; 
> 
>   ,------o-. 
>   |   __/  |    Thank you for PostGIS-2.0 Topology !
>   |  / 2.0 |    http://www.pledgebank.com/postgistopology
>   `-o------'
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
 		 	   		  

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111203/a2982820/attachment.html>


More information about the postgis-users mailing list