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">&lt;<a href="mailto:ingo.weinzierl@intevation.de">ingo.weinzierl@intevation.de</a>&gt;</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 &quot;-select&quot; 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 &lt;Field&gt;<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>
&gt; Ingo,<br>
&gt;<br>
&gt; Use the -select option with an empty string in ogr2ogr [1].<br>
&gt; ogr2ogr -select &quot;&quot; dest.shp src.shp<br>
&gt;<br>
&gt; [1]: <a href="http://www.gdal.org/ogr2ogr.html" target="_blank">http://www.gdal.org/ogr2ogr.html</a><br>
&gt;<br>
&gt; On Thu, Aug 18, 2011 at 3:53 PM, Ingo Weinzierl &lt;<br>
&gt; <a href="mailto:ingo.weinzierl@intevation.de">ingo.weinzierl@intevation.de</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hello GDAL community,<br>
&gt; &gt;<br>
&gt; &gt; I have already used GDAL to get information about shapefiles or to<br>
&gt; &gt; insert a shapefile into a database. So, many thanks to all of you!<br>
&gt; &gt;<br>
&gt; &gt; Now, I&#39;ve just tried to dump a shapefile into an existing table of a<br>
&gt; &gt; spatial database (PostGIS / Oracle) using ogr2ogr. Therefore, I need<br>
&gt; &gt; some help:<br>
&gt; &gt;<br>
&gt; &gt; The only thing of the shapefile I need is the geometry column, but<br>
&gt; &gt; the database schema requires a further Integer column (NOT NULL<br>
&gt; &gt; constraint). In my use-case, I would like to define this Integer<br>
&gt; &gt; value manually while calling ogr2ogr. Therefore, I&#39;ve already<br>
&gt; &gt; searched for some VRT examples, with no success.<br>
&gt; &gt;<br>
&gt; &gt; In simple words: I want to insert the geometry column (shapefile)<br>
&gt; &gt; and an Integer value (manually defined) into a pre-defined spatial<br>
&gt; &gt; database (PostGIS / Oracle).<br>
&gt; &gt;<br>
&gt; &gt; I would be glad if someone could give me some hints how to realize<br>
&gt; &gt; such a ogr2ogr call.<br>
&gt; &gt;<br>
&gt; &gt; Regards, Ingo<br>
&gt; &gt; --<br>
&gt; &gt; Ingo Weinzierl | <a href="tel:%2B%2B49-541-335083-0" value="+495413350830">++49-541-335083-0</a> | OpenPGP key: 0x2D2E2573<br>
&gt; &gt; Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B<br>
&gt; &gt; 18998<br>
&gt; &gt; Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; gdal-dev mailing list<br>
&gt; &gt; <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
&gt; &gt; <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Best regards,<br>
&gt; Chaitanya kumar CH.<br>
&gt;<br>
&gt; <a href="tel:%2B91-9494447584" value="+919494447584">+91-9494447584</a><br>
&gt; 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>