Ingo,<br><br>By default a Feature ID column is entered into the database regardless of the fields. No duplicates or null values.<br>Perhaps you might want to modify this column.<br><br><div class="gmail_quote">On Fri, Aug 19, 2011 at 6:35 PM, Ingo Weinzierl <span dir="ltr"><<a href="mailto:ingo.weinzierl@intevation.de">ingo.weinzierl@intevation.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks for the quick reply, but the "-select" option only solves one<br>
of the two parts of my problem. I still need to append a further<br>
column that does not exist in the shapefile and which should be<br>
defined manually.<br>
I already played a while with VRT files. I tried to define a <Field><br>
node for each column I want to insert into my database - without any<br>
success...<br>
<br>
Regards, Ingo<br>
<div><div></div><div class="h5"><br>
On Thu, Aug 18, 2011 at 05:00:58PM +0530, Chaitanya kumar CH wrote:<br>
> Ingo,<br>
><br>
> Use the -select option with an empty string in ogr2ogr [1].<br>
> ogr2ogr -select "" dest.shp src.shp<br>
><br>
> [1]: <a href="http://www.gdal.org/ogr2ogr.html" target="_blank">http://www.gdal.org/ogr2ogr.html</a><br>
><br>
> On Thu, Aug 18, 2011 at 3:53 PM, Ingo Weinzierl <<br>
> <a href="mailto:ingo.weinzierl@intevation.de">ingo.weinzierl@intevation.de</a>> wrote:<br>
><br>
> > Hello GDAL community,<br>
> ><br>
> > I have already used GDAL to get information about shapefiles or to<br>
> > insert a shapefile into a database. So, many thanks to all of you!<br>
> ><br>
> > Now, I've just tried to dump a shapefile into an existing table of a<br>
> > spatial database (PostGIS / Oracle) using ogr2ogr. Therefore, I need<br>
> > some help:<br>
> ><br>
> > The only thing of the shapefile I need is the geometry column, but<br>
> > the database schema requires a further Integer column (NOT NULL<br>
> > constraint). In my use-case, I would like to define this Integer<br>
> > value manually while calling ogr2ogr. Therefore, I've already<br>
> > searched for some VRT examples, with no success.<br>
> ><br>
> > In simple words: I want to insert the geometry column (shapefile)<br>
> > and an Integer value (manually defined) into a pre-defined spatial<br>
> > database (PostGIS / Oracle).<br>
> ><br>
> > I would be glad if someone could give me some hints how to realize<br>
> > such a ogr2ogr call.<br>
> ><br>
> > Regards, Ingo<br>
> > --<br>
> > Ingo Weinzierl | <a href="tel:%2B%2B49-541-335083-0" value="+495413350830">++49-541-335083-0</a> | OpenPGP key: 0x2D2E2573<br>
> > Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B<br>
> > 18998<br>
> > Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner<br>
> > _______________________________________________<br>
> > gdal-dev mailing list<br>
> > <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
> > <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
> ><br>
><br>
><br>
><br>
> --<br>
> Best regards,<br>
> Chaitanya kumar CH.<br>
><br>
> <a href="tel:%2B91-9494447584" value="+919494447584">+91-9494447584</a><br>
> 17.2416N 80.1426E<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Ingo Weinzierl | <a href="tel:%2B%2B49-541-335083-0" value="+495413350830">++49-541-335083-0</a> | OpenPGP key: 0x2D2E2573<br>
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998<br>
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>