Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Delete latitude and longitude attributes from geodataframe #19

Open
ccamara opened this issue Mar 8, 2020 · 0 comments
Open

Delete latitude and longitude attributes from geodataframe #19

ccamara opened this issue Mar 8, 2020 · 0 comments

Comments

@ccamara
Copy link
Member

ccamara commented Mar 8, 2020

Currently, when converting dataframe into a geodataframe, lat and lon columns are preserved:

# Convert dataframe into a GeoDataframe.
gdf_trees = gpd.GeoDataFrame(
    df_trees,
    geometry=gpd.points_from_xy(df_trees.lon, df_trees.lat))

However, if I want to drop lat and lon columns, geo dataframe turns into a regular dataframe, hence losing all the geometry's information

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant