Skip to content

Commit

Permalink
Update load_SHP.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtekson committed Sep 16, 2020
1 parent ee56fdf commit 9863c19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RiskChanges/DataManage/load_SHP.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# In[69]:


def loadshp(shpInput,connstr,lyrName,schema):
def loadshp(shpInput,connstr,lyrName,schema='public'):
#Load data in geodataframe
geodataframe = geopandas.read_file(shpInput)

Expand All @@ -60,7 +60,7 @@ def loadshp(shpInput,connstr,lyrName,schema):

# Use 'dtype' to specify column's type
# For the geom column, we will use GeoAlchemy's type 'Geometry'
geodataframe.to_sql(lyrName, engine, schema='tekson',if_exists='append', index=False,
geodataframe.to_sql(lyrName, engine, schema,if_exists='append', index=False,
dtype={'geom': Geometry(geom_type, srid= epsg)})


Expand Down

0 comments on commit 9863c19

Please sign in to comment.