Re: [postgis-users] Topology Attributes

2015-02-10 Thread Ofer Zilberstein
Hi Nicolas,

Thanks for the detailed description that make the unclear clear...

Now I feel ready to implement ...

Your support is a great example for the strength of the open source
community ...

BR.

Ofer

On Tue, Feb 10, 2015 at 11:07 AM, Nicolas Ribot nicolas.ri...@gmail.com
wrote:

 Hi Ofer,

 Some precisions regarding the query I sent:

 A topoGeometry objects stores the following information (
 http://postgis.net/docs/manual-2.1/topogeometry.html):

 • topopology_id: id of the topology, as stored in the Topology metadata
 • layer_id : the id of the layer in the topology
 • id: the id of the topogeometry object
 • type: the geometry type (point, line...)

 When joining between the Polygon table containing the TopoGeometryObject,
 I used a notation seen on this list to compare 2 values:
 (a, b) = (c, d), equivalent to a = b and c = d.
 The 1 in the first part (pe.parcelle p1 on (1, (p1.topo).id)) is the
 hard-coded (not very smart: I copied a test query I used) identifier of the
 Topology layer in the topology.layer metadata table.

 I obtained this value by running:
 select layer_id from topology.layer where schema_name = 'pe' and
 table_name = 'parcelle;

 So, in your case, check the layer_id of the department table and use this
 value.

 Nicolas


 On 9 February 2015 at 21:18, Ofer Zilberstein zilberstein.o...@gmail.com
 wrote:

 Hi,

 1. I advanced ...and I used the  topology.toTopoGeom() and now
 the relation is populated.

 2. I try to understand the following join

 *pe.parcelle** p1 on (1, (p1.topo).id) *= (r1.layer_id, r1.topogeo_id)

 the second part of the join is clear -- comes from the relation table
 however the first part - is not so clear

 according to you - parcelle is the polygon table with a topo column
 containing the TopoGeometry object corresponding to the polygon (you have
 used here pe.parcelle - is it the table name ? )

 so if in my case I have table 'department' with column 'topogeom' it
 would look like

 department d1 on (1,(d1.topogeom).id) = (r1.layer_id, r1.topogeo_id) ?


 Ofer





 On Mon, Feb 9, 2015 at 3:52 PM, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:

 Hi Nicolas,

 1. I used  ST_CreateTopoGeo()  to build the topology (not the 
 topology.toTopoGeom()
 as you mentioned )

 When I look at the relation table its empty ? should I use  
 topology.toTopoGeom()
 instead, and it will populate it ?

 2. can you explain what the parentheses (special the 1, ...) part mean...

 join pe.parcelle p1 on *(1, (p1.topo).id)* = (r1.layer_id,
 r1.topogeo_id)

 Thanks in advanced ...

 Ofer

 On Mon, Feb 9, 2015 at 11:05 AM, Nicolas Ribot nicolas.ri...@gmail.com
 wrote:

 Hi,

 As usual with SQL, there must be several other ways to perform the same
 query.

 As the edge view stores 2 faces id per row (left and right), I
 duplicated the joins to join both left_face and right face against the
 original polygon table (p1 and p2 aliases)

 Nicolas

 On 8 February 2015 at 21:57, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:

 Much Thanks,

 First I will try to understand the join that you did and then try to
 implement it...

 Ofer

 On Sun, Feb 8, 2015 at 12:44 PM, Nicolas Ribot 
 nicolas.ri...@gmail.com wrote:

 Hi,

 When you build the topology, for instance with topology.toTopoGeom(),
 you get back a TopoGeometry object for each polygon added to the 
 topology.
 This TopoGeometry is used to keep a link between your polygon object
 and all the topological elements composing it.
 The relation table inside the topo schema holding the topology
 contains the identifier of the topoGeometry object and the identifiers of
 topo elements composing the polygon.

 To get the right and left original polygons from the topology, you
 make a join between edge, relation and pg table:
 (topo_grass is the topo schema, parcelle is the polygon table with a
 topo column containing the TopoGeometry object corresponding to the
 polygon):

 select e.edge_id, e.left_face, e.right_face,
   p1.id as left_id, p2.id as right_id
 from topo_grass.edge e
   join topo_grass.relation r1 on r1.element_id = e.left_face
   join pe.parcelle p1 on (1, (p1.topo).id) = (r1.layer_id, r1.topogeo_id)
   join topo_grass.relation r2 on r2.element_id = e.right_face
   join pe.parcelle p2 on (1, (p2.topo).id) = (r2.layer_id, 
 r2.topogeo_id);

 Nicolas



 On 8 February 2015 at 10:29, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 

Re: [postgis-users] Topology Attributes

2015-02-10 Thread Nicolas Ribot
Hi Ofer,

Some precisions regarding the query I sent:

A topoGeometry objects stores the following information (
http://postgis.net/docs/manual-2.1/topogeometry.html):

• topopology_id: id of the topology, as stored in the Topology metadata
• layer_id : the id of the layer in the topology
• id: the id of the topogeometry object
• type: the geometry type (point, line...)

When joining between the Polygon table containing the TopoGeometryObject, I
used a notation seen on this list to compare 2 values:
(a, b) = (c, d), equivalent to a = b and c = d.
The 1 in the first part (pe.parcelle p1 on (1, (p1.topo).id)) is the
hard-coded (not very smart: I copied a test query I used) identifier of the
Topology layer in the topology.layer metadata table.

I obtained this value by running:
select layer_id from topology.layer where schema_name = 'pe' and table_name
= 'parcelle;

So, in your case, check the layer_id of the department table and use this
value.

Nicolas


On 9 February 2015 at 21:18, Ofer Zilberstein zilberstein.o...@gmail.com
wrote:

 Hi,

 1. I advanced ...and I used the  topology.toTopoGeom() and now
 the relation is populated.

 2. I try to understand the following join

 *pe.parcelle** p1 on (1, (p1.topo).id) *= (r1.layer_id, r1.topogeo_id)

 the second part of the join is clear -- comes from the relation table
 however the first part - is not so clear

 according to you - parcelle is the polygon table with a topo column
 containing the TopoGeometry object corresponding to the polygon (you have
 used here pe.parcelle - is it the table name ? )

 so if in my case I have table 'department' with column 'topogeom' it would
 look like

 department d1 on (1,(d1.topogeom).id) = (r1.layer_id, r1.topogeo_id) ?


 Ofer





 On Mon, Feb 9, 2015 at 3:52 PM, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:

 Hi Nicolas,

 1. I used  ST_CreateTopoGeo()  to build the topology (not the 
 topology.toTopoGeom()
 as you mentioned )

 When I look at the relation table its empty ? should I use  
 topology.toTopoGeom()
 instead, and it will populate it ?

 2. can you explain what the parentheses (special the 1, ...) part mean...

 join pe.parcelle p1 on *(1, (p1.topo).id)* = (r1.layer_id, r1.topogeo_id)

 Thanks in advanced ...

 Ofer

 On Mon, Feb 9, 2015 at 11:05 AM, Nicolas Ribot nicolas.ri...@gmail.com
 wrote:

 Hi,

 As usual with SQL, there must be several other ways to perform the same
 query.

 As the edge view stores 2 faces id per row (left and right), I
 duplicated the joins to join both left_face and right face against the
 original polygon table (p1 and p2 aliases)

 Nicolas

 On 8 February 2015 at 21:57, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:

 Much Thanks,

 First I will try to understand the join that you did and then try to
 implement it...

 Ofer

 On Sun, Feb 8, 2015 at 12:44 PM, Nicolas Ribot nicolas.ri...@gmail.com
  wrote:

 Hi,

 When you build the topology, for instance with topology.toTopoGeom(),
 you get back a TopoGeometry object for each polygon added to the topology.
 This TopoGeometry is used to keep a link between your polygon object
 and all the topological elements composing it.
 The relation table inside the topo schema holding the topology
 contains the identifier of the topoGeometry object and the identifiers of
 topo elements composing the polygon.

 To get the right and left original polygons from the topology, you
 make a join between edge, relation and pg table:
 (topo_grass is the topo schema, parcelle is the polygon table with a
 topo column containing the TopoGeometry object corresponding to the
 polygon):

 select e.edge_id, e.left_face, e.right_face,
   p1.id as left_id, p2.id as right_id
 from topo_grass.edge e
   join topo_grass.relation r1 on r1.element_id = e.left_face
   join pe.parcelle p1 on (1, (p1.topo).id) = (r1.layer_id, r1.topogeo_id)
   join topo_grass.relation r2 on r2.element_id = e.right_face
   join pe.parcelle p2 on (1, (p2.topo).id) = (r2.layer_id, r2.topogeo_id);

 Nicolas



 On 8 February 2015 at 10:29, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: 

Re: [postgis-users] Topology Attributes

2015-02-09 Thread Nicolas Ribot
Hi,

As usual with SQL, there must be several other ways to perform the same
query.

As the edge view stores 2 faces id per row (left and right), I duplicated
the joins to join both left_face and right face against the original
polygon table (p1 and p2 aliases)

Nicolas

On 8 February 2015 at 21:57, Ofer Zilberstein zilberstein.o...@gmail.com
wrote:

 Much Thanks,

 First I will try to understand the join that you did and then try to
 implement it...

 Ofer

 On Sun, Feb 8, 2015 at 12:44 PM, Nicolas Ribot nicolas.ri...@gmail.com
 wrote:

 Hi,

 When you build the topology, for instance with topology.toTopoGeom(), you
 get back a TopoGeometry object for each polygon added to the topology.
 This TopoGeometry is used to keep a link between your polygon object and
 all the topological elements composing it.
 The relation table inside the topo schema holding the topology contains
 the identifier of the topoGeometry object and the identifiers of topo
 elements composing the polygon.

 To get the right and left original polygons from the topology, you make a
 join between edge, relation and pg table:
 (topo_grass is the topo schema, parcelle is the polygon table with a topo
 column containing the TopoGeometry object corresponding to the polygon):

 select e.edge_id, e.left_face, e.right_face,
   p1.id as left_id, p2.id as right_id
 from topo_grass.edge e
   join topo_grass.relation r1 on r1.element_id = e.left_face
   join pe.parcelle p1 on (1, (p1.topo).id) = (r1.layer_id, r1.topogeo_id)
   join topo_grass.relation r2 on r2.element_id = e.right_face
   join pe.parcelle p2 on (1, (p2.topo).id) = (r2.layer_id, r2.topogeo_id);

 Nicolas



 On 8 February 2015 at 10:29, Ofer Zilberstein zilberstein.o...@gmail.com
  wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Topology Attributes

2015-02-09 Thread Ofer Zilberstein
Hi,

1. I advanced ...and I used the  topology.toTopoGeom() and now the relation
is populated.

2. I try to understand the following join

*pe.parcelle** p1 on (1, (p1.topo).id) *= (r1.layer_id, r1.topogeo_id)

the second part of the join is clear -- comes from the relation table
however the first part - is not so clear

according to you - parcelle is the polygon table with a topo column
containing the TopoGeometry object corresponding to the polygon (you have
used here pe.parcelle - is it the table name ? )

so if in my case I have table 'department' with column 'topogeom' it would
look like

department d1 on (1,(d1.topogeom).id) = (r1.layer_id, r1.topogeo_id) ?


Ofer





On Mon, Feb 9, 2015 at 3:52 PM, Ofer Zilberstein zilberstein.o...@gmail.com
 wrote:

 Hi Nicolas,

 1. I used  ST_CreateTopoGeo()  to build the topology (not the 
 topology.toTopoGeom()
 as you mentioned )

 When I look at the relation table its empty ? should I use  
 topology.toTopoGeom()
 instead, and it will populate it ?

 2. can you explain what the parentheses (special the 1, ...) part mean...

 join pe.parcelle p1 on *(1, (p1.topo).id)* = (r1.layer_id, r1.topogeo_id)

 Thanks in advanced ...

 Ofer

 On Mon, Feb 9, 2015 at 11:05 AM, Nicolas Ribot nicolas.ri...@gmail.com
 wrote:

 Hi,

 As usual with SQL, there must be several other ways to perform the same
 query.

 As the edge view stores 2 faces id per row (left and right), I duplicated
 the joins to join both left_face and right face against the original
 polygon table (p1 and p2 aliases)

 Nicolas

 On 8 February 2015 at 21:57, Ofer Zilberstein zilberstein.o...@gmail.com
  wrote:

 Much Thanks,

 First I will try to understand the join that you did and then try to
 implement it...

 Ofer

 On Sun, Feb 8, 2015 at 12:44 PM, Nicolas Ribot nicolas.ri...@gmail.com
 wrote:

 Hi,

 When you build the topology, for instance with topology.toTopoGeom(),
 you get back a TopoGeometry object for each polygon added to the topology.
 This TopoGeometry is used to keep a link between your polygon object
 and all the topological elements composing it.
 The relation table inside the topo schema holding the topology
 contains the identifier of the topoGeometry object and the identifiers of
 topo elements composing the polygon.

 To get the right and left original polygons from the topology, you make
 a join between edge, relation and pg table:
 (topo_grass is the topo schema, parcelle is the polygon table with a
 topo column containing the TopoGeometry object corresponding to the
 polygon):

 select e.edge_id, e.left_face, e.right_face,
   p1.id as left_id, p2.id as right_id
 from topo_grass.edge e
   join topo_grass.relation r1 on r1.element_id = e.left_face
   join pe.parcelle p1 on (1, (p1.topo).id) = (r1.layer_id, r1.topogeo_id)
   join topo_grass.relation r2 on r2.element_id = e.right_face
   join pe.parcelle p2 on (1, (p2.topo).id) = (r2.layer_id, r2.topogeo_id);

 Nicolas



 On 8 February 2015 at 10:29, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com




-- 

*Ofer Zilberstein*

Mobile: 972-544886873

Skype: ofer.zilberstein

Mail: zilberstein.o...@gmail.com
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Topology Attributes

2015-02-09 Thread Ofer Zilberstein
Hi Nicolas,

1. I used  ST_CreateTopoGeo()  to build the topology (not the
topology.toTopoGeom()
as you mentioned )

When I look at the relation table its empty ? should I use
topology.toTopoGeom()
instead, and it will populate it ?

2. can you explain what the parentheses (special the 1, ...) part mean...

join pe.parcelle p1 on *(1, (p1.topo).id)* = (r1.layer_id, r1.topogeo_id)

Thanks in advanced ...

Ofer

On Mon, Feb 9, 2015 at 11:05 AM, Nicolas Ribot nicolas.ri...@gmail.com
wrote:

 Hi,

 As usual with SQL, there must be several other ways to perform the same
 query.

 As the edge view stores 2 faces id per row (left and right), I duplicated
 the joins to join both left_face and right face against the original
 polygon table (p1 and p2 aliases)

 Nicolas

 On 8 February 2015 at 21:57, Ofer Zilberstein zilberstein.o...@gmail.com
 wrote:

 Much Thanks,

 First I will try to understand the join that you did and then try to
 implement it...

 Ofer

 On Sun, Feb 8, 2015 at 12:44 PM, Nicolas Ribot nicolas.ri...@gmail.com
 wrote:

 Hi,

 When you build the topology, for instance with topology.toTopoGeom(),
 you get back a TopoGeometry object for each polygon added to the topology.
 This TopoGeometry is used to keep a link between your polygon object and
 all the topological elements composing it.
 The relation table inside the topo schema holding the topology
 contains the identifier of the topoGeometry object and the identifiers of
 topo elements composing the polygon.

 To get the right and left original polygons from the topology, you make
 a join between edge, relation and pg table:
 (topo_grass is the topo schema, parcelle is the polygon table with a
 topo column containing the TopoGeometry object corresponding to the
 polygon):

 select e.edge_id, e.left_face, e.right_face,
   p1.id as left_id, p2.id as right_id
 from topo_grass.edge e
   join topo_grass.relation r1 on r1.element_id = e.left_face
   join pe.parcelle p1 on (1, (p1.topo).id) = (r1.layer_id, r1.topogeo_id)
   join topo_grass.relation r2 on r2.element_id = e.right_face
   join pe.parcelle p2 on (1, (p2.topo).id) = (r2.layer_id, r2.topogeo_id);

 Nicolas



 On 8 February 2015 at 10:29, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




-- 

*Ofer Zilberstein*

Mobile: 972-544886873

Skype: ofer.zilberstein

Mail: zilberstein.o...@gmail.com
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Topology Attributes

2015-02-08 Thread Nicolas Ribot
Hi,

When you build the topology, for instance with topology.toTopoGeom(), you
get back a TopoGeometry object for each polygon added to the topology.
This TopoGeometry is used to keep a link between your polygon object and
all the topological elements composing it.
The relation table inside the topo schema holding the topology contains
the identifier of the topoGeometry object and the identifiers of topo
elements composing the polygon.

To get the right and left original polygons from the topology, you make a
join between edge, relation and pg table:
(topo_grass is the topo schema, parcelle is the polygon table with a topo
column containing the TopoGeometry object corresponding to the polygon):

select e.edge_id, e.left_face, e.right_face,
  p1.id as left_id, p2.id as right_id
from topo_grass.edge e
  join topo_grass.relation r1 on r1.element_id = e.left_face
  join pe.parcelle p1 on (1, (p1.topo).id) = (r1.layer_id, r1.topogeo_id)
  join topo_grass.relation r2 on r2.element_id = e.right_face
  join pe.parcelle p2 on (1, (p2.topo).id) = (r2.layer_id, r2.topogeo_id);

Nicolas



On 8 February 2015 at 10:29, Ofer Zilberstein zilberstein.o...@gmail.com
wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Topology Attributes

2015-02-08 Thread Ofer Zilberstein
Thanks,

I'm trying to figure out the process

Ofer

On Sun, Feb 8, 2015 at 4:58 PM, Richard Greenwood 
richard.greenw...@gmail.com wrote:

 I don't know if this will help but here is a link to a PDF
 http://www.greenwoodmap.com/presentations/WyGEO-Lander-2014.pdf of a
 presentation I did a while ago. Starting on page 14 I am trying to
 illustrate how attributes from a simple polygon source can be joined to
 edges in PostGIS topology .

 Rich

 On Sun, Feb 8, 2015 at 2:29 AM, Ofer Zilberstein 
 zilberstein.o...@gmail.com wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




 --
 Richard W. Greenwood, PLS
 www.greenwoodmap.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




-- 

*Ofer Zilberstein*

Mobile: 972-544886873

Skype: ofer.zilberstein

Mail: zilberstein.o...@gmail.com
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Topology Attributes

2015-02-08 Thread Richard Greenwood
I don't know if this will help but here is a link to a PDF
http://www.greenwoodmap.com/presentations/WyGEO-Lander-2014.pdf of a
presentation I did a while ago. Starting on page 14 I am trying to
illustrate how attributes from a simple polygon source can be joined to
edges in PostGIS topology .

Rich

On Sun, Feb 8, 2015 at 2:29 AM, Ofer Zilberstein zilberstein.o...@gmail.com
 wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] Topology Attributes

2015-02-08 Thread Ofer Zilberstein
Much Thanks,

First I will try to understand the join that you did and then try to
implement it...

Ofer

On Sun, Feb 8, 2015 at 12:44 PM, Nicolas Ribot nicolas.ri...@gmail.com
wrote:

 Hi,

 When you build the topology, for instance with topology.toTopoGeom(), you
 get back a TopoGeometry object for each polygon added to the topology.
 This TopoGeometry is used to keep a link between your polygon object and
 all the topological elements composing it.
 The relation table inside the topo schema holding the topology contains
 the identifier of the topoGeometry object and the identifiers of topo
 elements composing the polygon.

 To get the right and left original polygons from the topology, you make a
 join between edge, relation and pg table:
 (topo_grass is the topo schema, parcelle is the polygon table with a topo
 column containing the TopoGeometry object corresponding to the polygon):

 select e.edge_id, e.left_face, e.right_face,
   p1.id as left_id, p2.id as right_id
 from topo_grass.edge e
   join topo_grass.relation r1 on r1.element_id = e.left_face
   join pe.parcelle p1 on (1, (p1.topo).id) = (r1.layer_id, r1.topogeo_id)
   join topo_grass.relation r2 on r2.element_id = e.right_face
   join pe.parcelle p2 on (1, (p2.topo).id) = (r2.layer_id, r2.topogeo_id);

 Nicolas



 On 8 February 2015 at 10:29, Ofer Zilberstein zilberstein.o...@gmail.com
 wrote:


 Hi,

 When you build topology from set of connected polygons, the original
 polygon attributes are not part of the topology model. The model creates
 MBR face for each original polygon.

 The edges hold the left  right faces.

 How or what is the right way to add to the edges the right and left
 original polygons ?

 --

 *Ofer Zilberstein*

 Mobile: 972-544886873

 Skype: ofer.zilberstein

 Mail: zilberstein.o...@gmail.com

 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



 ___
 postgis-users mailing list
 postgis-users@lists.osgeo.org
 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users




-- 

*Ofer Zilberstein*

Mobile: 972-544886873

Skype: ofer.zilberstein

Mail: zilberstein.o...@gmail.com
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users