Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

geopandas query postgis

import geopanda as gpd
from sqlalchemy import create_engine  
>>> db_connection_url = "postgresql://myusername:mypassword@myhost:5432/mydb"
>>> con = create_engine(db_connection_url)  
>>> sql = "SELECT geom, highwayName FROM roads WHERE Id = 526"
>>> df = gpd.read_postgis(sql, con)
 
PREVIOUS NEXT
Tagged: #geopandas #query #postgis
ADD COMMENT
Topic
Name
2+4 =