Rag...JN 🌌 🦡 👽 💰
Rag...JN 🌌 🦡 👽 💰
Explore posts from servers
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
ah ok
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
what that means really?
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
ah ok.
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
Thank you so much.
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
I mean I just followed the standards
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
it's still my fault right?
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
🙊
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
No description
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
bet
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
how none of them doesn't come close to 8?
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
yep
@Query(value = "SELECT ST_DistanceSpheroid(:point1,:point2) ", nativeQuery = true)
Double hotelDistanceBetweenUser(@Param("point1") Point point1, @Param("point2") Point point2);
@Query(value = "SELECT ST_DistanceSpheroid(:point1,:point2) ", nativeQuery = true)
Double hotelDistanceBetweenUser(@Param("point1") Point point1, @Param("point2") Point point2);
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
No description
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
No description
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
ok let me try
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
Synopsis
float ST_DistanceSpheroid(geometry geomlonlatA, geometry geomlonlatB, spheroid measurement_spheroid=WGS84);

Description
Returns minimum distance in meters between two lon/lat geometries given a particular spheroid. See the explanation of spheroids given for ST_LengthSpheroid.
Synopsis
float ST_DistanceSpheroid(geometry geomlonlatA, geometry geomlonlatB, spheroid measurement_spheroid=WGS84);

Description
Returns minimum distance in meters between two lon/lat geometries given a particular spheroid. See the explanation of spheroids given for ST_LengthSpheroid.
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
No description
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
No description
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
7820.7057?
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
private GeometryFactory factory = new GeometryFactory(new PrecisionModel(), 4326);
double hotelLat = hotel.getGeoLocation().getY();
double hotelLong = hotel.getGeoLocation().getX();

Point userLocation = factory.createPoint(new Coordinate(latitude, longitude));
Point hotelLocation = factory.createPoint(new Coordinate(hotelLat, hotelLong));
Double distanceFromRepo = hotelRepository.hotelDistanceBetweenUser(userLocation,hotelLocation);
private GeometryFactory factory = new GeometryFactory(new PrecisionModel(), 4326);
double hotelLat = hotel.getGeoLocation().getY();
double hotelLong = hotel.getGeoLocation().getX();

Point userLocation = factory.createPoint(new Coordinate(latitude, longitude));
Point hotelLocation = factory.createPoint(new Coordinate(hotelLat, hotelLong));
Double distanceFromRepo = hotelRepository.hotelDistanceBetweenUser(userLocation,hotelLocation);
84 replies
JCHJava Community | Help. Code. Learn.
Created by Rag...JN 🌌 🦡 👽 💰 on 10/14/2024 in #java-help
PostGIS distance calculation gives in-accurate results
You can see the lat and longs aren't switched UserLocation, and hotelLocation are the Points.
84 replies