I want to do projection from UTM/oblique mercator CRS to WGS84. And I know the solution to use a proj.4 string in commandline like+proj=omerc +lat_0=51.4 +lonc=7 +alpha=-10 +k=1 +x_0=0 +y_0=0 +gamma=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
However, I wonder if there is a way to do such transformation using plain code. I have configured the gdal jar for my eclipse and want to use the java bindings to do such transformation. From the OGR projection tutorial,I know how to define a Geographic Coordinate System and projected Coordinate Sytem with OGRSpatialReference class. I know how to define a transformation using OGRCoordinateTransformation class. But the only thing missing there is the possibility to customize my source UTM. I don't know how to set the lon,lat of my orgin point. I also don't know how to set the oblique angle. There seems to be no such pre-built method in the classes.
Anyone can give me some hints?
Best Answer
You can use proj.4 java bindings like GeoAPI and Proj4j. If you are familar with threads, process programming and piped streaming you can use a direct OS call whith your common proj.4 params.
Proj4j looks like this and have a look in Martin Davis unit test repository :