Thanks Pierre,<div><font class="Apple-style-span" face="Helvetica" size="3"><br></font></div><div><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-family:Times"><b id="internal-source-marker_0.39198085316456854"><span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">SELECT o.osm_id,</span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> <span class="Apple-tab-span" style="white-space:pre"> </span>ST_AsText((ST_Intersection(ST_Transform(o.way,4326), s.rast)).geom),</span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> <span class="Apple-tab-span" style="white-space:pre"> </span>(ST_Intersection(ST_Transform(o.way,4326), s.rast)).val <span class="Apple-tab-span" style="white-space:pre"> </span> </span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> FROM planet_osm_line o,</span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> <span class="Apple-tab-span" style="white-space:pre"> </span>srtm_tiled_4326 s</span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> WHERE ST_Intersects(ST_Transform(o.way,4326), s.rast)</span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> and o.highway = 'primary';</span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"></span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">osm_id; intersecting linestring, elevation (mts)</span><br>
<span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">16815326;"LINESTRING(8.58333333333333 56.2074149493615,8.58261220053766 56.2066666666667)";</span><span style="font-size:11px;font-family:'Courier New';color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">45</span></b></span></font></div>
<div><font class="Apple-style-span" face="'Courier New'"><span class="Apple-style-span" style="font-size:11px;white-space:pre-wrap"><b>..</b></span></font></div><div><font class="Apple-style-span" face="'Courier New'"><span class="Apple-style-span" style="font-size:11px;white-space:pre-wrap"><b>..</b></span></font></div>
<div>I get to see the elevation now for my geometry and raster. I now want to introduce some artificial points that </div><div>are equidistant (say 10 mts apart) on each road segment.. and then compute their intersection with the raster.</div>
<div>Is it better to first divide the lines into such points and then compute their intersections with the raster? Or </div><div>break the linestring that I get back after intersection? I have an idea of how I might be able to do this, but </div>
<div>just wanted to confirm what will perform better.</div><div><br></div><div>Cheers,</div><div>Ed</div><div><font class="Apple-style-span" face="'Courier New'"><span class="Apple-style-span" style="font-size:11px;white-space:pre-wrap"><b><br>
</b></span></font></div><div><font class="Apple-style-span" face="'Courier New'"><span class="Apple-style-span" style="font-size:11px;white-space:pre-wrap"><b><br></b></span></font><br><div class="gmail_quote">On Tue, Feb 28, 2012 at 4:28 PM, Pierre Racine <span dir="ltr"><<a href="mailto:Pierre.Racine@sbf.ulaval.ca">Pierre.Racine@sbf.ulaval.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> What I wish to now do is to use those spot heights to create an elevation raster<br>
> layer via which all NoDataValued pixels have an elevation set that is interpreted<br>
> from the spot heights around it.<br>
><br>
> Has anyone any suggestions as to how this can be done by PostGIS's ST_Raster?<br>
> (ST_MapAlgebra perhaps etc?)<br>
<br>
We don't have any interpolation algorithm yet. But we have ST_MapAlgebraFctNgb() which compute pixels value as focal functions (or moving windows). I not sure to which degree you can implement interpolation with moving windows but if your points are close to each other enough you could compute the mean of the point surrounding each point. Have a look at:<br>
<br>
<a href="http://postgis.refractions.net/documentation/manual-svn/RT_ST_MapAlgebraFctNgb.html" target="_blank">http://postgis.refractions.net/documentation/manual-svn/RT_ST_MapAlgebraFctNgb.html</a><br>
<br>
Pierre<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br></div>