0

I am trying to overlay a shapefile representing the range of Coast Redwoods onto some other data I'm processing in geoviews. I can successfully plot the data using cartopy and matplotlib. GeoPandas reads the shapefile, but passing the GeoDataFrame or individual shapely polygons to gv.Shape (as in the geoviews user guide under "Shape") consistently results in

AttributeError: 'list' object has no attribute 'xy'

I am not sure whether the problem is in Shapely or in Geoviews. I suspect geoviews because geopandas is able to reproject and plot the polygons.

I've put up a notebook demonstrating the problem and providing the shapefile.

Any help or ideas much appreciated.

1 Answers1

1

I was having the same issue, then i went ahead and converted my GeoDataFrame to EPSG:4326 as follows:

projected_df = original_df.to_crs('EPSG:4326')

Originally I was in EPSG:4269 (Albers Equal Area) and thought adding that to an Albers Equal Area projection would work but I think you need to start your data with EPSG:4326 and then work with projections with Geoviews.

Let me know if that does the trick.

user1321988
  • 513
  • 2
  • 6