Split / Divide linestring into parts / segments ?

View: New views
2 Messages — Rating Filter:   Alert me  

Split / Divide linestring into parts / segments ?

by Massan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I am having this kind of problem that I have one linestring("door") and then I am searching how many linestrings has intersect the linestring("door").
I am getting the intersections thats not a problem. What I need is to split / divide this "door" linestring to segments or parts or what ever...
So my goal is to devide "door" into 30 different parts (like if door is 30meters then I need thirty 1meter pieces). Then I can calculate how many linestrings are intersecting door
and in what part of door.

                                linestring "door"

<----1------><-----2-----><------3------><-------5-----><-----6-------> and so on ...

Hope you guys undestood my need and somebody can help me little bit !

Thanks mates

Br.
Grant

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

Re: Split / Divide linestring into parts / segments ?

by Paragon Corporation-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Grant,
We have an example something like this in the docs. Look at the example that cuts a linestring into 100 unit length segments.  In your case if your SRID is in meters you should be able to change the 100 to 30.
 
 
Not quite sure its what you are looking for but sounds like it .
Hope that helps,
Regina


From: postgis-users-bounces@... [mailto:postgis-users-bounces@...] On Behalf Of Grant Masan
Sent: Tuesday, October 13, 2009 1:39 PM
To: postgis-users@...
Subject: [postgis-users] Split / Divide linestring into parts / segments ?

Hi all,

I am having this kind of problem that I have one linestring("door") and then I am searching how many linestrings has intersect the linestring("door").
I am getting the intersections thats not a problem. What I need is to split / divide this "door" linestring to segments or parts or what ever...
So my goal is to devide "door" into 30 different parts (like if door is 30meters then I need thirty 1meter pieces). Then I can calculate how many linestrings are intersecting door
and in what part of door.

                                linestring "door"

<----1------><-----2-----><------3------><-------5-----><-----6-------> and so on ...

Hope you guys undestood my need and somebody can help me little bit !

Thanks mates

Br.
Grant

_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users