[postgis-users] Split One Layer of Polygons With Another Layer of Polygons?

Bill Thoen bthoen at gisnet.com
Tue Sep 5 14:31:01 PDT 2006


Using PopstgreSQL/PostGIS, what are the steps I need to use to split one 
layer of polygons with another layer and also maintain data attrributes 
among the polygons that are split? For example, I've got corn and 
soybean field polygons that need to be split at the borders of 
overlaying CLU (Common Land Unit) polygons, and if a corn field crosses 
under a CLU boundary, I want to split the field at the CLU boundary and 
copy the orignal field id, crop code and other attributes into the two 
(or more) resulting farm field polygons (and probably assign a new 
unique polygon id to them all too.)

I'm thinking that the approach would be to create a cursor selection of 
CLUs and for each of these find the set of farm fields that overlap it. 
Then for each of those farm fields, split them against the CLU polygon 
(using Intersection()?) and insert each new polygon with associated data 
into a new table, and deleting the orignal farm polygon. Then at the end 
merge all the split polygons back into the orignal table and assign 
unique ids of all of them.

Is this the right approach? It seems like a bit of a job, but it also 
seems like a common enough operation that I'm wondering if there is a 
simpler way already available in PostGIS or has somebody written a 
function to do this sort of thing?

TIA,
- Bill Thoen





More information about the postgis-users mailing list