Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- osm=> SELECT osm_id,(SUM_AGG(elev))[1] FROM ( SELECT * FROM ( SELECT elev,planet.osm_id,ST_Length(planet.way)*ST_Line_Locate_Point(planet.way,(ST_Dump(ST_Intersection(planet.way,the_geom))).geom) As dist FROM contour, ( SELECT * FROM planet_osm_line WHERE marked_trail_red='yes' LIMIT 1 ) AS planet WHERE ST_Intersects(the_geom,planet.way) ) As f ORDER BY dist ) AS f GROUP BY f.osm_id; NOTICE: New 0 660
- NOTICE: New 10 670
- NOTICE: New 10 670
- NOTICE: New 10 670
- NOTICE: New 10 670
- NOTICE: New 10 660
- NOTICE: New 10 650
- NOTICE: New 10 650
- NOTICE: New 10 650
- NOTICE: New 10 650
- NOTICE: New 20 660
- osm_id | sum_agg
- -----------+---------
- 124882874 | 20
- (1 row)
- osm=>
Add Comment
Please, Sign In to add comment