Guest User

Untitled

a guest
Mar 4th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. GeoDataFrame.from_postgis(sql, con, geom_col='geom', crs=None, index_col=None,
  2. coerce_float=True, params=None)
  3.  
  4. import geopandas as gpd
  5.  
  6. import psycopg2 /*(if it is postgres/postgis)
  7.  
  8. con = psycopg2.connect(database="your database", user="user",password="password",host="your host")
  9.  
  10. sql= "select geom, x,y,z from your_table"
  11.  
  12. df=gpd.GeoDataFrame.from_postgis(sql,con,geom_col='geom' )
Add Comment
Please, Sign In to add comment