3

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?

3

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;
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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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