Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Having 2 linestring tables:

pipelines (id integer, street varchar(50), shape geometry) 
streets (id integer, name varchar(50), shape geometry)

Each pipeline passes/intersects several streets.


I need to:

  1. Fill the street field in the pipelines automatically and
  2. I need to know to which street does the pipeline "belong the most".

I thought about densifiying the vertices of the each pipeline at a maximum 5 meter distance from each other, and do the analysis on them and then statistically find out the answer.

How In Postgis can I create a table that presents the geometry for each point of the pipelines along with their corresponding id?

share|improve this question

Your answer did help, although it didn't do what I wanted.

I found out how to do it:

select id, (st_dumpPoints(st_segmentize(shape, 5))).geom as geom 
from pipelines;
share|improve this answer

Here should be SELECT for it, just convert to SELECT INTO if it works

      ,(ST_Dump(the_geom)).path as pipe_path  
      ,(ST_Dump(the_geom)).geom as the_geom 

(I don't have Postgis installation with linestring to test this)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.