You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "jesspav (via GitHub)" <gi...@apache.org> on 2025/09/13 00:39:43 UTC
[PR] Default proj log level to none [sedona-db]
jesspav opened a new pull request, #77:
URL: https://github.com/apache/sedona-db/pull/77
Currently, invalid inputs to proj via `ST_Transform` are resulting in large log dumps to std out.
For example, for a single row:
```
> SELECT ST_Transform(ST_GeomFromText('POINT (1000 1000)'), 'EPSG:4326', 'EPSG:3857') as geom;
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
webmerc: Invalid latitude
Execution error: Transform error: PROJ coordinate transformation failed with error: Invalid coordinate
```
Since we are already capturing and sharing the error message, this change lowers the log level to none/0, but allows users to override it.
After this change, the excess error messages no longer appear and the user can jump straight to the useful error message. For example:
```
> SELECT ST_Transform(ST_GeomFromText('POINT (1000 1000)'), 'EPSG:4326', 'EPSG:3857') as geom;
Execution error: Transform error: PROJ coordinate transformation failed with error: Invalid coordinate
```
Tracking issue: #30
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Default proj log level to none [sedona-db]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #77:
URL: https://github.com/apache/sedona-db/pull/77
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Default proj log level to none [sedona-db]
Posted by "jesspav (via GitHub)" <gi...@apache.org>.
jesspav commented on code in PR #77:
URL: https://github.com/apache/sedona-db/pull/77#discussion_r2346863045
##########
c/sedona-proj/src/transform.rs:
##########
@@ -14,6 +14,9 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
+use crate::error::SedonaProjError;
+use crate::proj::{Proj, ProjContext};
+use proj_sys::PJ_LOG_LEVEL_PJ_LOG_NONE;
Review Comment:
yeah, sorry about that. removed it.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Default proj log level to none [sedona-db]
Posted by "jesspav (via GitHub)" <gi...@apache.org>.
jesspav commented on code in PR #77:
URL: https://github.com/apache/sedona-db/pull/77#discussion_r2346863300
##########
c/sedona-proj/src/transform.rs:
##########
@@ -102,6 +122,13 @@ impl ProjCrsEngineBuilder {
ctx.set_search_paths(&string_vec)?;
}
+ if let Some(log_level) = &self.log_level {
+ ctx.set_log_level(*log_level)?;
+ } else {
+ // Default log level to none
+ ctx.set_log_level(PJ_LOG_LEVEL_PJ_LOG_NONE)?;
Review Comment:
oops... made the switch.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Default proj log level to none [sedona-db]
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on code in PR #77:
URL: https://github.com/apache/sedona-db/pull/77#discussion_r2345806283
##########
c/sedona-proj/src/transform.rs:
##########
@@ -14,6 +14,9 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
+use crate::error::SedonaProjError;
+use crate::proj::{Proj, ProjContext};
+use proj_sys::PJ_LOG_LEVEL_PJ_LOG_NONE;
Review Comment:
```suggestion
```
##########
c/sedona-proj/src/transform.rs:
##########
@@ -102,6 +122,13 @@ impl ProjCrsEngineBuilder {
ctx.set_search_paths(&string_vec)?;
}
+ if let Some(log_level) = &self.log_level {
+ ctx.set_log_level(*log_level)?;
+ } else {
+ // Default log level to none
+ ctx.set_log_level(PJ_LOG_LEVEL_PJ_LOG_NONE)?;
Review Comment:
```suggestion
ctx.set_log_level(0)?;
```
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Default proj log level to none [sedona-db]
Posted by "jesspav (via GitHub)" <gi...@apache.org>.
jesspav commented on PR #77:
URL: https://github.com/apache/sedona-db/pull/77#issuecomment-3288676491
Yeah, you are right, I was not thinking about whether the constant I referenced would be available without the proj being installed. Good thing the build here caught that.
--
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: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org