-
Notifications
You must be signed in to change notification settings - Fork 77
External GridDefinition read fix #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@robertoricotti could you double check if this fix works for you? |
@@ -376,7 +376,7 @@ private static DataInputStream resolveGridDefinition(String gridName) throws IOE | |||
// search path for grid definition files, but for now we only check the | |||
// working directory and the classpath (in that order.) | |||
File file = new File(gridName); | |||
if (file.exists()) return new DataInputStream(new FileInputStream(file)); | |||
if (file.exists()) return new DataInputStream(new BufferedInputStream(new FileInputStream(file))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the culrprit, apparently only definitions stored in the resources folder were properly loading.
1a9df6f
to
2991352
Compare
i only have implemented proj4j via gradle, how can i modify it to get this fixed? |
@robertoricotti bascially two ways to test it:
|
I'll cut the release shortly once it's merged in anyways, seem like a mandatory fix anyways. |
yes, great.
because i'm traveling now i'm not able to clone the project and make the jar. Look forward to the new release
…________________________________
Da: Grigory ***@***.***>
Inviato: lunedì 16 giugno 2025 02:34
A: locationtech/proj4j ***@***.***>
Cc: robertoricotti ***@***.***>; Mention ***@***.***>
Oggetto: Re: [locationtech/proj4j] External GridDefinition read fix (PR #121)
[https://avatars.githubusercontent.com/u/4929546?s=20&v=4]pomadchin left a comment (locationtech/proj4j#121)<#121 (comment)>
I'll cut the release shortly once it's merged in anyways, seem like a mandatory fix anyways.
—
Reply to this email directly, view it on GitHub<#121 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVE4PKJPBG3HNKFVL5PGGIL3DYGHZAVCNFSM6AAAAAB7L27UDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNZUHAYDGMBVGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
GreekToGreek.transform(new ProjCoordinate(22.3454616, 37.0564322, Z), ReadProjectService.result);
Easting = ReadProjectService.result.x;
Northing = ReadProjectService.result.y;
Quota = quota[0];
Log.d("GreciaLoggy",Northing+" "+Easting+" "+Quota);
PRODUCE THIS: 21:19:20.788 GreciaLoggy 4102701.240763625 353039.0776926844
but the expected is : N=4102125.107 E=352739.561
GreekToGreek.transform(new ProjCoordinate(23.739465975, 38.051143275, Z), ReadProjectService.result);
Easting = ReadProjectService.result.x;
Northing = ReadProjectService.result.y;
Quota = quota[0];
Log.d("GreciaLoggy",Northing+" "+Easting+" "+Quota);
PRODUCE THIS: 21:01:58.570 GreciaLoggy 4211809.404310006 477291.35412335454
but the expected is : N=4211234.624 E=476992.391
i got the gsb file to use for Greece from https://helpdesk.microsurvey.com/article/427-world-grid-shift-files
…________________________________
Da: Grigory ***@***.***>
Inviato: lunedì 16 giugno 2025 02:37
A: locationtech/proj4j ***@***.***>
Cc: robertoricotti ***@***.***>; Mention ***@***.***>
Oggetto: Re: [locationtech/proj4j] External GridDefinition read fix (PR #121)
Merged #121<#121> into master.
—
Reply to this email directly, view it on GitHub<#121 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVE4PKKQ2Y5YNZ5X73UHPBD3DYGU3AVCNFSM6AAAAAB7L27UDWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJYGE3DAMBQGY2DSMI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This PR fixes the read of the nadgrids passed into the proj4 string definition as an external / full path. Bug reported over here: #89 (comment)
I also slightly readjusted the exception definition to pass down the original cause.
The real issue was obfuscated via the exception thrown: