Skip to content

Commit

Permalink
Merge pull request #1 from iamtekson/patch-2
Browse files Browse the repository at this point in the history
Update load_SHP.py
  • Loading branch information
ashokdahal committed Sep 16, 2020
2 parents ee56fdf + 9863c19 commit 08e3e22
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 08e3e22

Please sign in to comment.