Skip to content

integration with ipython/jupyter and geopandas/shapely #1044

Description

@pvgenuchten

i wonder if we can implement some of the internals of geopandas and ipython, to have better integrations with those libraries
this came up while preparing the geopython training

for example:

shapely

implements a repr_svg() method on geometries, this is picked up by ipython, to display the svg whenever the variable is logged (in jupyter etc)

geopandas

implements a repr_html() on dataframes, so whenever the dataframe is logged a nice table structure is displayed (in jupyter etc)
i wonder if we could implement that function on owslib responses

wfs

to capture a wfs response in a geodataframe, i can use the raw gml response in gpd.read_file

gdf = geopandas.read_file(wfs11.getfeature(typename='ms:cities'))

ogc-api-features

to capture a ogcapi-features response in a geodataframe, i can benefit from the fact they are a list of geo-features, this should also work for ogcapi-records

gdf = gpd.GeoDataFrame.from_features(lakes_query['features'])

csw

to capture the response of a csw query in a dataframe, this works ok-ish

gdf = geopandas .GeoDataFrame([r.__dict__ for r in thecsw.records.values()])

Maybe we can provide a table or json view of returned records which can instantly be loaded in a dataframe?

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