Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
add dimension option to ogr2pg
Browse files Browse the repository at this point in the history
  • Loading branch information
smnorris committed Mar 7, 2017
1 parent 67f0979 commit 9f1960e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgdb/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def create_table(self, table, columns):
return Table(self, schema, table, columns)

def ogr2pg(self, in_file, in_layer=None, out_layer=None,
schema='public', t_srs='EPSG:3005', sql=None):
schema='public', t_srs='EPSG:3005', sql=None, dim=2):
"""
Load a layer to provided pgdb database connection using OGR2OGR
Expand All @@ -261,7 +261,7 @@ def ogr2pg(self, in_file, in_layer=None, out_layer=None,
'-overwrite',
'-lco SCHEMA={schema}'.format(schema=schema),
'-lco GEOMETRY_NAME=geom',
'-dim 2',
'-dim {d}'.format(d=dim),
'-nln '+out_layer,
'-nlt PROMOTE_TO_MULTI',
in_file,
Expand Down

0 comments on commit 9f1960e

Please sign in to comment.