geopandas.
read_postgis
Returns a GeoDataFrame corresponding to the result of the query string, which must contain a geometry column in WKB representation.
SQL query to execute in selecting entries from database, or name of the table to read from the database.
Active connection to the database to query.
column name to convert to shapely geometries
CRS to use for the returned GeoDataFrame; if not set, tries to determine CRS from the SRID associated with the first geometry in the database, and assigns that to all geometries.
If specified, return an iterator where chunksize is the number of rows to include in each chunk.
Examples
PostGIS >>> sql = “SELECT geom, kind FROM polygons” SpatiaLite >>> sql = “SELECT ST_AsBinary(geom) AS geom, kind FROM polygons” >>> df = geopandas.read_postgis(sql, con)