Commit 8f304b1c authored by ARCHER's avatar ARCHER 💬

set srid in geom to force 0 instead of -1

parent 19d68d76
......@@ -17,6 +17,7 @@ import logging
logging.basicConfig()
logger = logging.getLogger(os.path.basename(__file__))
logger.setLevel(logging.DEBUG)
logging.getLogger('sqlalchemy.dialects.postgresql').setLevel(logging.INFO)
shapely_handled_types=[
shpg.Polygon,
......@@ -54,7 +55,7 @@ def get_srid(crs):
"""
if crs is None:
return 0
srid = -1
srid = 0
if isinstance(crs, dict):
if 'init' in crs:
s = crs['init'].split('epsg:')
......@@ -261,7 +262,7 @@ def to_postgis(gdf,*args,**kwargs):
raise TypeError("mixed types not implemented : %s" % ",".join(geom_types))
geom_type=geom_types[0].upper()
logger.debug("%s type : %s" % (geom_col , geom_type))
kwargs['dtype'][geom_col] = Geo(geom_type) #, srid=srid)
kwargs['dtype'][geom_col] = Geo(geom_type,srid=srid) #, srid=srid)
with con.begin():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment