1

PostGIS has ST_Simplify functionality which gets one multiline as input and returns one output multiline where the general shape of lines are retained while eliminating unnecessary detail.

Instead of one multiline, I have a table with a LineString geometry column (street segment) and an integer column (traffic velocity of that street). I can create a single multiline out of that LineString column and simplify it, but I need to know traffic velocity of simplified geometries too. Is there any tool to aggregate data of integer column into simplified lines?

  • 3
    Welcome to GIS SE. As a new user, please take the Tour. Unfortunately, the meaning of you question is unclear. You state one capability, then ask about two completely different ones which are unrelated (mapping and aggregation). Please Edit your question to choose one capability, expand your question to include your research on the topic, include your SQL, and specify a focused question on the specific problem you are having. – Vince Feb 7 '18 at 14:26
  • @Vince Thanks for your help. I edited my question. I will add sample SQL if it was still unclear. – mhsekhavat Feb 7 '18 at 15:07
  • Read this. – pLumo Feb 7 '18 at 15:41
1

If I understood your question right you should get started with a simple sql query

select velocity, st_simplify(geom, 0.1) as geom from lines;

Are you sure you want to aggregate lines to one single giant multiline?
If you really need that then you could GROUP BY your velocity column.

select
  velocity,
  st_simplify(st_collect(geom), 0.1)
from lines
group by velocity; 
  • @mhsekhavat, did this answer help you? – LauriK Feb 14 '18 at 20:57

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.