Closed scaddenp closed 4 years ago
proj4js code does work however.
Hi @scaddenp thanks for reporting about this bug! We'll look into it a bit later. Don't hesistate to create a PR with backporting proj4js / proj (c library) fixes to that projection! Proj4j definitely requires some love and is really far from being ideal.
Absolutely looking for what is wrong. And also looking at the test system.
Not doing well at this. no obvious issue in line by line compare with the C code. The problem looks to be from zpoly1d getting bad value for dst.x. proj4js implementation is very different so not easy to compare at all. Spent much of today trying to get proj4 C running on old VS 2010 without much luck. The old version of source that compiles ok need proj_def.dat files no longer seem to be available and not part of source distribution. Any pointers welcome.
ok progress. I have proj4 c code running in the debugger in parallel. Found at least one error, looking to see if I can add a proper test before continuing. Next step, learn how to use github.
I have created pull request but I see it is rejected because I have not signed off commits. (I have signed ECA). I cannot find a way to do this with github. I do not have git installed on my machine and I have no intention of doing so just to help fix a bug. Can this be done within Github.
CRSFactory crsf = new CRSFactory(); CoordinateTransformFactory ctf = new CoordinateTransformFactory(); CoordinateReferenceSystem epsg4326 = crsf.createFromName("EPSG:4326"); CoordinateReferenceSystem crs = crsf.createFromName("EPSG:27200)); //NZ Map grid CoordinateTransform toEPSG4326 = ctf.createTransform(crs,epsg4326);
ProjCoordinate inputPt = new ProjCoordinate(2939247.5, 6752871.3); // should return lon 177.65067, lat -34.3252 ProjCoordinate outputPt = new ProjCoordinate(); toEPSG4326.transform(inputPt, outputPt);