Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT A.id,
- ST_Union(
- COALESCE(
- ST_Difference(
- A.the_geom,
- B.the_geom
- ),
- A.the_geom
- )
- ) As the_geom
- FROM A
- LEFT JOIN b ON ST_Intersects(A.the_geom, B.the_geom)
- GROUP BY A.id;
- SELECT A.id,
- ST_Union(
- COALESCE(
- ST_Difference(
- A.the_geom,
- ST_Union(B.the_geom)
- ),
- A.the_geom
- )
- ) As the_geom
- FROM A
- LEFT JOIN B ON ST_Intersects(A.the_geom, B.the_geom)
- GROUP BY A.id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement