[gdal-dev] Dump Shapefile into DB using ogr2ogr
Chaitanya kumar CH
chaitanya.ch at gmail.com
Thu Aug 18 07:30:58 EDT 2011
Use the -select option with an empty string in ogr2ogr .
ogr2ogr -select "" dest.shp src.shp
On Thu, Aug 18, 2011 at 3:53 PM, Ingo Weinzierl <
ingo.weinzierl at intevation.de> wrote:
> Hello GDAL community,
> I have already used GDAL to get information about shapefiles or to
> insert a shapefile into a database. So, many thanks to all of you!
> Now, I've just tried to dump a shapefile into an existing table of a
> spatial database (PostGIS / Oracle) using ogr2ogr. Therefore, I need
> some help:
> The only thing of the shapefile I need is the geometry column, but
> the database schema requires a further Integer column (NOT NULL
> constraint). In my use-case, I would like to define this Integer
> value manually while calling ogr2ogr. Therefore, I've already
> searched for some VRT examples, with no success.
> In simple words: I want to insert the geometry column (shapefile)
> and an Integer value (manually defined) into a pre-defined spatial
> database (PostGIS / Oracle).
> I would be glad if someone could give me some hints how to realize
> such a ogr2ogr call.
> Regards, Ingo
> Ingo Weinzierl | ++49-541-335083-0 | OpenPGP key: 0x2D2E2573
> Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B
> Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev