Relative Content

Tag Archive for javapostgresqlentity

Storing Latitude and Longitude as Point in PostgreSQL Database and Handling in Java

I’m working on a project where I need to store latitude and longitude in coordinates field in a PostgreSQL database. I’ve decided to use the Point data type in PostgreSQL to represent these coordinates efficiently. However, I’m unsure about the best approach to handle this in Java and how to delcare in entity class.
for ex: double lat =17.4343,
double lon =76.4343