<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I’ve figured this out,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div><blockquote type="cite" class="clean_bq" style="color: rgb(0, 0, 0); font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">CREATE MATERIALIZED VIEW mapping_os_opendata_raster.streetview_tileindex AS SELECT rid as location, ST_ConvexHull(rast) as shape from mapping_os_opendata_raster.streetview </div></blockquote></div><p><br></p><p>“location" needs to be a path to the database/table/raster currently it is just returning an ID, but I cannot find any documentation as to how to construct this for postgres</p><div>So nearly there?</div></div> <br><p style="color:#000;">On 20 August 2014 at 11:34:03, Dave Barter (<a href="mailto:dave.barter@gmail.com">dave.barter@gmail.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div><div>





<title></title>



<div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">
Final question. How should my map file look in order to get the
raster tile from the database not the file system?</div>
<div><br></div>
<div>LAYER</div>
<div>            # CREATE
MATERIALIZED VIEW mapping_os_opendata_raster.streetview_tileindex
AS SELECT rid as location, ST_ConvexHull(rast) as shape from
mapping_os_opendata_raster.streetview </div>
<div>            NAME
streetview_tileindex</div>
<div>            TYPE polygon</div>
<div>            PROJECTION</div>
<div>               
"init=epsg:27700"</div>
<div>            END</div>
<div>            CONNECTIONTYPE
postgis</div>
<div>            CONNECTION
“********"</div>
<div>            DATA "shape from
(SELECT shape,location FROM
mapping_os_opendata_raster.streetview_tileindex) AS FOO USING
UNIQUE location using srid=27700"</div>
<div><br></div>
<div>        END</div>
<div><br></div>
<div>        LAYER</div>
<div>            #RASTER TILE LAYERS
MUST RUN FROM A TILEINDEX</div>
<div>            NAME
streetview</div>
<div>            TYPE RASTER</div>
<div>            STATUS ON</div>
<div>            TILEINDEX
"streetview_tileindex"</div>
<div>            TILEITEM
"location"</div>
<div>            OFFSITE 0 0
0 </div>
<div>            PROJECTION</div>
<div>               
"init=epsg:27700"</div>
<div>            END</div>
<div>            DEBUG 5</div>
<div>            EXTENT 0 0 3000000
1000000</div>
<div><br></div>
<div>        END</div>
<div><br></div>
<div>This is not working as the layer street view returns an
error:- </div>
<div><br></div>
<div>msDrawMap(): Image handling error. Failed to draw layer named
'streetview'. msDrawRasterLayerLow(): Unable to access file.
Corrupt, empty or missing file '654016' for layer 'street
view’.</div>
<div><br></div>
<div>I set SHAPEFILE “” at the top of the file, but am unclear as
to how the streetview layer will retrieve the tile ?</div>
<div><br></div>
<div><br></div>
<div><br></div>
<div id="bloop_sign_1408530673579525120" class="bloop_sign">
<div style="font-family:helvetica,arial;font-size:13px">
<span style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">
-- </span><br style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">

<span style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">
Dave Barter</span><br style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">

<br style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">

<span style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">
Web: </span><a href="http://www.phased.co.uk/" target="_blank" style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">http://www.phased.co.uk</a><br style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">

<a href="mailto:Email%3Adave@phased.co.uk" target="_blank" style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">
Email:dave@phased.co.uk</a><br style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">

<span style="line-height: normal; orphans: 2; text-align: -webkit-auto; widows: 2; font-family: arial; font-size: small;">
Twitter:@Citizenfishy</span></div>
</div>


</div></div></span></blockquote></body></html>