0

I have a table of AIS positions for a vessel and its true heading. I also know the distance of the GPS aerial to the bow, and the starboard side, and the overall length and width of the ship.

I want to know how to take the known point and create a second point 200m in the direction of the true heading, create a third point at +90 degrees to the true heading at the length of the distance from the aerial to the starboard side, create 4th point at 180 degrees to the true heading at the distance of total length of the vessel, etc until I have the points for each corner of the vessel and then create a line string to join the points and create an outline of the vessel pointing in the direction of its true heading.

I want to use QGIS / PostGIS to solve this.

  • 1
    You can use functions like sin, cos, ST_Rotate, ST_Azimuth and ST_Translate to do this. It is just basic trigonometry, after all. – John Powell Jan 7 at 11:59
  • Have a go using these functions. Hint: it is easiest if you start from the point (0,0), create your various points at 90,180, etc degress, which will simply be offsets along the x and y axis, create a polygon from those, then use ST_Rotate and finally ST_Translate, if you actually want it in some location, rather than just the outline. – John Powell Jan 7 at 12:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.