1

I am working with Postgresql/postgis and geopandas. I have tables with more than one geometry.

How can I move this kind of tables to geopandas recognizing all the geometries columns? I am using .GeoDataFrame.from_postgis but I can only specify one column with geometry.

  • Have you tried to detach both geometries columns in different geodataframes and then make a spatial join? This way maybe you can get a multipolygon geodataframe. – Rodrigo Vargas Jul 24 at 21:25
  • Geopandas can have only one active geometry per row. However, you can have more, they'll just be GeoSeries stored as an attribute. If you want to use all columns as active geometries, you will have to split your table to keep one geometry per row and than join them together. Spatial join doesn't make a lot of sense to me in this case. – martinfleis Jul 25 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.