Skip to content

Commit

Permalink
fix return
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaMN committed Sep 27, 2024
1 parent 7ab1c4e commit 4de651f
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ public MutableCartesianPoint geographicToCartesian(GeoPoint geographic, MutableC
CoordinateTransform transform = ctFactory.createTransform(cartesianCRS, wgs84CRS);

transform.transform(sourceCoord, targetCoord);
MutableCartesianPoint output = new MutableCartesianPoint(targetCoord.x, targetCoord.y, 0.0);
result.set(targetCoord.x, targetCoord.y, 0.0);

return (output);
return result;
}

@Override
Expand All @@ -122,9 +122,9 @@ public MutableGeoPoint cartesianToGeographic(CartesianPoint cartesian, MutableGe

transform.transform(sourceCoord, targetCoord);
//Transform returned as lat,lon = (targetCoord.y, targetCoord.x)
MutableGeoPoint output = new MutableGeoPoint(targetCoord.y, targetCoord.x);
result.set(targetCoord.y, targetCoord.x, 0.0);

return output;
return result;
}

@Override
Expand All @@ -146,9 +146,9 @@ public MutableUtmPoint geographicToUtm(GeoPoint geoPoint, MutableUtmPoint result
CoordinateTransform transform = ctFactory.createTransform(cartesianCRS, utmCRS);

transform.transform(sourceCoord, targetCoord);
MutableUtmPoint output = new MutableUtmPoint(targetCoord.x, targetCoord.y, 0.0, getUTMZone(geoPoint));
result.set(targetCoord.x, targetCoord.y, 0.0, getUTMZone(geoPoint));

return (output);
return result;
}

@Override
Expand All @@ -161,7 +161,9 @@ public MutableGeoPoint utmToGeographic(UtmPoint utmPoint, MutableGeoPoint result

transform.transform(sourceCoord, targetCoord);
//Transform returned as lon,lat = (targetCoord.x, targetCoord.y)
return new MutableGeoPoint(targetCoord.x, targetCoord.y);
result.set(targetCoord.x, targetCoord.y, 0.0);

return result;
}

public UtmZone getUTMZone(GeoPoint geoPoint){
Expand Down

0 comments on commit 4de651f

Please sign in to comment.