locationtech / proj4j

Java port of the Proj.4 library for coordinate reprojection
Other
181 stars 71 forks source link

altitude not working when Projecting #108

Open NeedNot opened 4 months ago

NeedNot commented 4 months ago

no matter what altitude I give it it returns as if it was 0

   fun geodeticToCartesian(lat: Double, lon: Double, alt: Double): Point3d {

        val srcCoord = ProjCoordinate(lon, lat, alt)
        val targetCoord = ProjCoordinate()
        WGS84_TO_ECEF.transform(srcCoord, targetCoord)

        return Point3d(targetCoord.x, targetCoord.y, targetCoord.z)
    }
pomadchin commented 4 months ago

Hi @NeedNot I think proj4j does not really support 3d coordinates sadly, a nice feature to have though.