Ticket #597 (closed task: fixed)

Opened 3 years ago

Last modified 15 months ago

[raster] ST_Clip

Reported by: pracine Owned by: pracine
Priority: blocker Milestone: PostGIS 2.0.0
Component: raster Version: trunk
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

Changed 3 years ago by pracine

  • status changed from new to assigned

Changed 2 years ago by pracine

  • priority changed from medium to low

Changed 2 years ago by pracine

  • milestone changed from PostGIS 2.0.0 to PostGIS Raster Future

Changed 17 months ago by robe

  • milestone changed from PostGIS Raster Future to PostGIS 2.0.0

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

Changed 17 months ago by dustymugs

  • owner changed from pracine to dustymugs
  • priority changed from low to blocker
  • status changed from assigned to new
  • summary changed from [raster] Add a ST_Clip function to [raster] ST_Clip

Changed 17 months ago by dustymugs

  • status changed from new to assigned

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.

Changed 17 months ago by dustymugs

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

Changed 16 months ago by dustymugs

  • owner changed from dustymugs to pracine
  • status changed from assigned to new

Changed 15 months ago by pracine

  • status changed from new to closed
  • resolution set to fixed

regression tests added in r9181. Closing.

Note: See TracTickets for help on using tickets.