Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Hypothesis:

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.

Need

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

2 Answers 2

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

SELECT 
      id 
      ,(ST_Dump(the_geom)).path as pipe_path  
      ,(ST_Dump(the_geom)).geom as the_geom 
FROM 
      pipelines 

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

share|improve this answer

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

Your Answer

 
discard

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.