Please help me on how to build a point and save spatial information: point (x, y, z) or point (x, y)

In the vehicle management information system, we want to save the real-time location information point (x, y, z) or point (x, y) of the vehicle through the point in the pi. How should I operate it