[postgis-tickets] [PostGIS] #2312: [raster] st_circle

PostGIS trac at osgeo.org
Fri May 10 07:12:00 PDT 2013


#2312: [raster] st_circle
-------------------------+--------------------------------------------------
 Reporter:  nclay        |       Owner:  dustymugs     
     Type:  enhancement  |      Status:  new           
 Priority:  medium       |   Milestone:  PostGIS Future
Component:  raster       |     Version:  trunk         
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by dustymugs):

 If the geometry is passed along with a raster of the same SRID, the
 spatial grid of the raster can be used to convert the geometry to a mask.
 Without that, there is no way to know how to create a correct mask.

 So...

 {{{
 WITH foo AS (
         SELECT ST_Mask(ST_AsRaster(geomtomask, refraster)) AS mask
         FROM myrasttable
         LIMIT 1
 )
 SELECT
         ...
 FROM foo
 }}}

 You could call ST_AsRaster() on the geometry without any reference raster
 but you'd have to align the output raster of ST_AsRaster() with
 ST_Resample() before you could actually use it.  But assuming that a mask
 is being generated to use against an existing set of rasters, this
 shouldn't be an issue.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2312#comment:9>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list