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.

Database is postgres 9.2, POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8"

i have geometries in consecutive order. Here is query:

SELECT (ST_Union(geom)) FROM roads WHERE osm_id IN (140122771,140122775,9620011,9620010,174011196,9620025,174011193,174011195,9620024,140119144,4377642,183432458,193166932,140119146,183432465,140119145,183811230,25585759,25585692,183811266,25585671)

osm_id is in order that i need them. after i run second query:

SELECT (
    ST_Line_Interpolate_Point(
        ST_LineMerge(
            ST_Line_Substring(
                (SELECT (ST_UNION(geom)) FROM roads WHERE osm_id IN (140122771,140122775,9620011,9620010,174011196,9620025,174011193,174011195,9620024,140119144,4377642,183432458,193166932,140119146,183432465,140119145,183811230,25585759,25585692,183811266,25585671)  ),
                 0.1, 0.101
            )
         ),0.1
    )
) as punkts 

it produces point on line. ( i rand 9 queries from 0.1 to 0.9. 0.1 is first, 0.2 is second and so on), but points not in consecutive order.
points on line , must be from bottom to top

You can see, that 4 point is at end of line .. Is there way, that i can union geometries in consecutive order? or maybe geometries can concatenate ?

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.