Database Reference
In-Depth Information
For the final step, we'll need the capacity to perform volumetric intersection (the
3Dequivalentofintersection).Forthis,we'lluse
volumetricIntersection.sql
,
whichallowsustojustreturnthevolumetricportionoftheintersectionasa
Triangu-
lar Irregular Network
(
TIN
).
Tip
ATINisa3Dsurfacemodelforrepresentingsurfacesandvolumesasamesh
of triangles.
We will install the functions as follows:
psql -U me -d postgis_cookbook -f ST_RotateX.sql
psql -U me -d postgis_cookbook -f ST_RotateY.sql
psql -U me -d postgis_cookbook -f
ST_RotateXYZ.sql
psql -U me -d postgis_cookbook -f
pyramidMaker.sql
psql -U me -d postgis_cookbook -f
volumetricIntersection.sql
How to do it...
In order to calculate the viewing footprint, we will calculate a rectangular pyramid
descendingfromtheviewpointtotheground.Thispyramidwillneedtopointtothe
leftandrightofnadiraccordingtotheUAS'roll;forwardorbackwardfromthecraft
according to its pitch, and be oriented relative to the direction of movement of the
craft according to its bearing.
The
pyramidMaker
functionwillconstructourpyramidforusand
ST_RotateXYZ
will rotate the pyramid in the direction we need to compensate for roll, pitch, and
bearing.
Thefollowingimageisanexamplemapofsuchacalculatedfootprintforasingleim-
age.Notetheslightrolltotheleftforthisexample,resultinginanasymmetric-looking
pyramid, when viewed from above.