I’ve figured this out,
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
“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
So nearly there?
On 20 August 2014 at 11:34:03, Dave Barter (dave.bar...@gmail.com) wrote:
Final question. How should my map file look in order to get the raster tile
from the database not the file system?
LAYER
# 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
NAME streetview_tileindex
TYPE polygon
PROJECTION
"init=epsg:27700"
END
CONNECTIONTYPE postgis
CONNECTION “********"
DATA "shape from (SELECT shape,location FROM
mapping_os_opendata_raster.streetview_tileindex) AS FOO USING UNIQUE location
using srid=27700"
END
LAYER
#RASTER TILE LAYERS MUST RUN FROM A TILEINDEX
NAME streetview
TYPE RASTER
STATUS ON
TILEINDEX "streetview_tileindex"
TILEITEM "location"
OFFSITE 0 0 0
PROJECTION
"init=epsg:27700"
END
DEBUG 5
EXTENT 0 0 3000000 1000000
END
This is not working as the layer street view returns an error:-
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’.
I set SHAPEFILE “” at the top of the file, but am unclear as to how the
streetview layer will retrieve the tile ?
--
Dave Barter
Web: http://www.phased.co.uk
Email:d...@phased.co.uk
Twitter:@Citizenfishy
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users