Opened 14 years ago

Closed 12 years ago

#597 closed task (fixed)

[raster] ST_Clip

Reported by: pracine Owned by: pracine
Priority: blocker Milestone: PostGIS 2.0.0
Component: raster Version: master
Keywords: Cc:

Description

As a wrapper around ST_MapAlgebra optimized by ST_SetValues(raster, band, x ,y, width, height, raster2, band2).

We can then optimize ST_Intersection by cliping the intersecting area before polygonizing.

Change History (9)

comment:1 by pracine, 14 years ago

Status: newassigned

comment:2 by pracine, 13 years ago

Priority: mediumlow

comment:3 by pracine, 13 years ago

Milestone: PostGIS 2.0.0PostGIS Raster Future

comment:4 by robe, 12 years ago

Milestone: PostGIS Raster FuturePostGIS 2.0.0

Pierre already has this committed in trunk. I haven't had a chance to look at it but on my todo.

comment:5 by Bborie Park, 12 years ago

Owner: changed from pracine to Bborie Park
Priority: lowblocker
Status: assignednew
Summary: [raster] Add a ST_Clip function[raster] ST_Clip

comment:6 by Bborie Park, 12 years ago

Status: newassigned

From the looks of it, Pierre's ST_Clip has the following signatures.

1. ST_Clip(
	rast raster, band int,
	geom geometry,
	nodata float8 DEFAULT null,
	trimraster boolean DEFAULT false
)
2. ST_Clip(
	rast raster,
	geom geometry,
	nodata float8 DEFAULT null,
	trimraster boolean DEFAULT false
)
3. ST_Clip(
	rast raster, band int,
	geom geometry,
	trimraster boolean
)
4. ST_Clip(
	rast raster,
	geom geometry,
	trimraster boolean
)

I'm wondering if the "nodata" parameter could be dropped as I would consider ST_Clip a pure extent constraining function with no data manipulation. Also, I'd like to see trimraster default to TRUE as the primary purpose of ST_Clip is to cut up the raster to only the area(s) of interest. Will need to ask postgis-devel as there are one or two users of ST_Clip.

comment:7 by Bborie Park, 12 years ago

After doing some digging, I'm leaving Pierre's set of ST_Clip functions as is. Just need to add regression tests.

comment:8 by Bborie Park, 12 years ago

Owner: changed from Bborie Park to pracine
Status: assignednew

comment:9 by pracine, 12 years ago

Resolution: fixed
Status: newclosed

regression tests added in r9181. Closing.

Note: See TracTickets for help on using tickets.