Skip to content

GeoDataFrame future warning #85

@amillb

Description

@amillb

When accessing the geofeed with partridge 1.1.2, a FutureWarning is triggered.

FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 in_crs_string = _prepare_from_proj_string(in_crs_string)

This can be replicated with:

geofeed = ptg.load_geo_feed(filename)
geofeed.stops.head()

I believe the fix is to change line 39 in geo.py:

return gpd.GeoDataFrame(df, crs={"init": "EPSG:4326"})

to:

return gpd.GeoDataFrame(df, crs="EPSG:4326")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions