[postgis-users] about ogr2ogr
Frank Warmerdam
warmerdam at pobox.com
Thu Apr 12 19:42:49 PDT 2012
2012/4/12 superman0920 <superman0920 at gmail.com>:
> Hi
> I input data from MIF files by ogr2ogr.
> I find the string column use char type. For example, the column defined NAME
> char(100) and the value is TEST.
> I selected that column, the value is TEST and 96 spaces.
> How can I assign the type of column when I import
Superman,
>From http://www.gdal.org/ogr/drv_pg.html we see that
the layer creation option PRECISION can be set to NO
to disable preserving precision and instead use VARCHAR.
eg.
ogr2ogr -lco PRECISION=NO ...
> and how can I assign the name of the geometry column?
The same page mentions you can use the GEOMETRY_NAME layer
creation option to control the name of the geometry column in the
created table.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Software Developer
More information about the postgis-users
mailing list