@@ -312,11 +312,11 @@ def y_to_lat_spherical(y: float) -> float:
312312def geometry_points_to_lat_and_lon (
313313 move_data : DataFrame ,
314314 geometry_label : Optional [Text ] = GEOMETRY ,
315- drop_geometry : Optional [bool ] = True ,
315+ drop_geometry : Optional [bool ] = False ,
316316 inplace : Optional [bool ] = False
317317) -> DataFrame :
318318 """
319- Converts the geometry column to latitude and longitude columns(named 'lat' and 'lon') .
319+ Creates lat and lon columns from Points in geometry column .
320320
321321 Removes geometries that are not of the Point type.
322322
@@ -327,7 +327,7 @@ def geometry_points_to_lat_and_lon(
327327 geometry: str, optional
328328 Represents column name of the geometry column, by default GEOMETRY
329329 drop_geometry: bool, optional
330- Option to drop the geometry column, by default True
330+ Option to drop the geometry column, by default False
331331 inplace: bool, optional
332332 Whether the operation will be done in the original dataframe, by default False
333333
@@ -340,11 +340,15 @@ def geometry_points_to_lat_and_lon(
340340 -------
341341 >>> from pymove.utils.conversions import geometry_points_to_lat_and_lon
342342 >>> geom_points_df
343- id geometry
344- 0 1 POINT (116.36184 39.77529)
345- 1 2 POINT (116.36298 39.77564)
346- 2 3 POINT (116.33767 39.83148)
347- #missing...
343+ id geometry
344+ 0 1 POINT (116.36184 39.77529)
345+ 1 2 POINT (116.36298 39.77564)
346+ 2 3 POINT (116.33767 39.83148)
347+ >>> geometry_points_to_lat_and_lon(geom_points_df)
348+ id geometry lon lat
349+ 0 1 POINT (116.36184 39.77529) 116.36184 39.77529
350+ 1 2 POINT (116.36298 39.77564) 116.36298 39.77564
351+ 2 3 POINT (116.33767 39.83148) 116.33767 39.83148
348352 """
349353 if not inplace :
350354 move_data = move_data .copy ()
0 commit comments