Database Reference
In-Depth Information
Exporting river shapefile for AD
country...
Exporting river shapefile for AE
country...
...Exporting river shapefile for ZM
country...
Exporting river shapefile for ZW
country...
5. Checktheoutputwith
ogrinfo
oraDesktopGIS.Thefollowingscreenshot
shows how the output looks in QGIS; we have added the original PostGIS
chp03.rivers
layer and a couple of the generated shapefiles:
How it works...
You can use the
ST_Intersection
function to clip one dataset from another. In
this recipe, you first created a view, where you performed a spatial join between
a polygonal layer (countries) and a linear layer (rivers) using the
ST_Intersects
function. In the context of the spatial join, you have used the
ST_Intersection
function to generate a clip of the rivers in every country.