Skip to content

Conversation

kadolor
Copy link
Contributor

@kadolor kadolor commented Sep 3, 2025

No description provided.

@kadolor kadolor self-assigned this Sep 3, 2025
Copy link

gitnotebooks bot commented Sep 3, 2025

Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/wherobots/wherobots-examples/pull/83

@kadolor kadolor marked this pull request as ready for review September 11, 2025 02:36
@kadolor
Copy link
Contributor Author

kadolor commented Sep 11, 2025

This is ready for review.
I'm hoping someone can give this a look to make sure my spatial analysis is correct and my logic is sound there as well.

@kadolor kadolor requested a review from RoboDonut September 11, 2025 02:37
Comment on lines +130 to +131
"from pyspark.sql.functions import expr, col, when, lit\n",
"from pyspark.sql.functions import lit"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lit is duplicated

"\n",
"# Define the point of interest (Tokyo) as a WKT string.\n",
"\n",
"tokyo_geom_wkt = \"POINT (139.6917 35.6895)\"\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we use wkls here? Should we use a geometry instead of a point?

"# Wherobots efficiently calculates the spherical distance in meters for every row.\n",
"df_with_distance = df_w_geom.withColumn(\n",
" \"distance_to_tokyo_meters\",\n",
" expr(f\"ST_DistanceSphere(point, ST_SetSRID(ST_GeomFromWKT('{tokyo_geom_wkt}'), 4326))\")\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setting the SRID probably doesnt accomplish anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants