jesspav commented on code in PR #31:
URL: https://github.com/apache/sedona-db/pull/31#discussion_r2325765302
##########
rust/sedona-schema/src/crs.rs:
##########
@@ -272,13 +278,28 @@ impl CoordinateReferenceSystem for ProjJSON {
false
}
}
+
+ fn srid(&self) -> Option<u32> {
+ let authority_code_opt = self.to_authority_code().unwrap();
+ if let Some(authority_code) = authority_code_opt {
+ if LngLat::is_authority_code_lnglat(&authority_code) {
+ return Some(4326);
+ }
+ if let Some((_, code)) =
AuthorityCode::split_auth_code(&authority_code) {
+ return code.parse::<u32>().ok();
+ }
+ }
+
+ None
Review Comment:
that does align the fn signature with authority_code better as well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]