[postgis-users] Select by MultiLine

ANDREW WOOLEY AWOOLEY at mountainland.org
Tue Aug 12 14:27:56 PDT 2003


Folks,

I have a table with elevations and a table with trails.  I would like
to build elevation profiles for each segment of the line.  I have the
select working and it returns many records, but it doesn't seem to do
what I thought it would.  Here is the query.

select grid_code as elevation from elev30 where (the_geom && (select 
transform(the_geom, 26712) from bsttrail where gid=681));

This is selecting grid_code which is the elevation value from the table
and then selects the proper trail segment id from the table. I expected
that the select would take the first point of the linestring and select
the corresponding grid_code then move on to the next one.  However, it
doesn't seem to be doing that.  Is my thinking off on how the results
will be returned?

Thanks for your time.

Andrew

P.S.  On a related topic, if I upgrade to the latest version, can I use
this query:

select grid_code as elevation from elev30 where (the_geom && (select 
transform(geomunion(the_geom), 26712) from bsttrail where gid=681 and
gid=682));


Andrew Wooley
GIS Coordinator
Mountainland Association of Governments
586 E 800 N
Orem, UT 84097
ph: 801.229.3844
email: awooley at mountainland.org
web: http://maps.mountainland.org



More information about the postgis-users mailing list