I have loaded my SRTM tif files as srid = 4326. And use a ST_Transform on the road geometry (As suggested).<br>Running Query: <br><br>SELECT o.osm_id,<br> ST_Intersection(ST_Transform(o.way,4326), s.rast)<br> FROM planet_osm_line o,<br>
srtm_tiled_4326 s<br> WHERE ST_Intersects(ST_Transform(o.way,4326), s.rast);<br><br>I get this error:<br><br><i>NOTICE: PostGIS was unable to transform the point because either no grid shift files were found, or the point does <br>
not lie within the range for which the grid shift is defined. Refer to the ST_Transform() section of the PostGIS manual <br>for details on how to configure PostGIS to alter this behaviour.<br><br>ERROR: transform: couldn't project point (977705 5.98119e+06 0): failed to load NAD27-83 correction file (-38)<br>
********** Error **********<br>ERROR: transform: couldn't project point (977705 5.98119e+06 0): failed to load NAD27-83 correction file (-38)<br>SQL state: XX000<br><br></i>I looked up the postgis manual on ST_Transform and it suggests doing ---> <br>
<pre class="programlisting">UPDATE spatial_ref_sys SET proj4text = '+proj=longlat +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat,null +no_defs' WHERE srid = 4326;</pre>Is this the correct way to add a grid? Or is there some better way? Some other threads on this mailing list suggest copying some files over <br>
and placing them in another folder.. not sure what is the better way. Can someone please suggest?<br><br>I am on --><br>-------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<b> POSTGIS="2.0.0alpha7SVN" GEOS="3.3.0-CAPI-1.7.0" PROJ="Rel. 4.7.1, 23 September 2009" GDAL="GDAL 1.7.3, released 2010/11/10" LIBXML="2.7.8" USE_STATS<br></b>(1 row)<br>
<br>Cheers,<br>Ed<br><br><br><br><br><div class="gmail_quote">On Mon, Feb 27, 2012 at 4:05 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"><div class="im">> ok, just to get this right.. :) , you are suggesting I keep my OSM as is (id: 900913).<br>
> Load in the tif rasters as srid (4326) and then "reproject" the OSM road geometry<br>
> to srid = 4326 right? So it matches the srid of my raster! I ask because you said<br>
> to reproject to 900913 in your mail.<br>
<br>
</div>Correct. We're on the right way.<br>
<br>
You can create a new raster table (after loading them properly with 4326) with your rasters reprojected to 900913 but as I said you might hit our bug:<br>
<br>
<a href="http://trac.osgeo.org/postgis/ticket/1618" target="_blank">http://trac.osgeo.org/postgis/ticket/1618</a><br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br>