Lines spatially separated on the same geometry

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Lines spatially separated on the same geometry

Luis Fernando Duque Quintero

Hello guys, I need to check if two lines are spatially separated but in the same geometry, for example when I open qgis and select one line two lines are selected not one (this lines are separated and even not touch each other), I try using st_numgeometries(my_line_geometry) on the db manager but always return 1, any suggest? Thanks before hands my friends.


_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Lines spatially separated on the same geometry

Luis Fernando Duque Quintero


Hello guys, I need to check if two lines are spatially separated but in the same geometry, for example when I open qgis and select one line two lines are selected not one (this lines are separated and even not touch each other), I try using st_numgeometries(my_line_geometry) on the db manager but always return 1, any suggest? Thanks before hands my friends.


_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Lines spatially separated on the same geometry

Sara Yurman
Hi Luis,

Maybe try using OpenJump.  It has a tool that is written specifically to do this.

Cheers,

Sara

On Sat, Apr 29, 2017 at 8:12 AM Luis Fernando Duque Quintero <[hidden email]> wrote:

























Hello guys, I need to check if two lines are spatially separated but in the same geometry, for example when I open qgis and select one line two lines are selected not one (this lines are separated and even not touch each other), I try using st_numgeometries(my_line_geometry)

on the db manager but always return 1, any suggest? Thanks before hands my friends.

















_______________________________________________

postgis-users mailing list

[hidden email]

https://lists.osgeo.org/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Lines spatially separated on the same geometry

Hugues François
In reply to this post by Luis Fernando Duque Quintero
Hello,

I'm not sure to understand what is your problem exactly. Maybe st_geometrytype could help. It will return multiline type if it is the case. 

If all types have been coerced to multi using st_multi, you may want to dump the geom first (st_dump()).geom and then union elements regarding their id. 

Regards,
Hug

Le 29 avr. 2017 2:12 PM, Luis Fernando Duque Quintero <[hidden email]> a écrit :


Hello guys, I need to check if two lines are spatially separated but in the same geometry, for example when I open qgis and select one line two lines are selected not one (this lines are separated and even not touch each other), I try using st_numgeometries(my_line_geometry) on the db manager but always return 1, any suggest? Thanks before hands my friends.



_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Lines spatially separated on the same geometry

Hugues François
In reply to this post by Luis Fernando Duque Quintero
Hello,

I think if you try what I suggested last time, the combined use of the functions should return st_multiline for the object you want to identify. 

SELECT gid, ST_GEOMETRYTYPE(ST_UNION((ST_DUMP(geom)).geom))
FROM your_table
GROUP BY gid

Regards,
Hug


Le 29 avr. 2017 2:12 PM, Luis Fernando Duque Quintero <[hidden email]> a écrit :


Hello guys, I need to check if two lines are spatially separated but in the same geometry, for example when I open qgis and select one line two lines are selected not one (this lines are separated and even not touch each other), I try using st_numgeometries(my_line_geometry) on the db manager but always return 1, any suggest? Thanks before hands my friends.



_______________________________________________
postgis-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-users