Paul,<br><br><br>
I think that the problem is with the SQL command built by the PostgreSQL driver.<br>In the INSERT command a numeric field with the value NaN should be mentioned in quotes.<br><br><div class="gmail_quote">Please file a ticket at <a href="http://trac.osgeo.org/gdal/newticket">http://trac.osgeo.org/gdal/newticket</a><br>
Mention the output for the command<br><span style="font-size: 10pt;">
<div>ogrinfo -al -so gltp:/vrf/home/naval/gemaps/mapdata/Approach/a1316120/dnc13/a1316120 soundp@hyd(*)_point&#39;<br>to describe the field types (especially &#39;hdh&#39;) of the source features.<br></div>
</span><br>On Wed, Jun 30, 2010 at 10:36 AM, Malm Paul <span dir="ltr">&lt;<a href="mailto:paul.malm@saabgroup.com">paul.malm@saabgroup.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">







<div>
<font face="Courier New" size="2"><span style="font-size: 10pt;">
<div>Hi,</div>
<div>I have:</div>
<div>- downloaded GDAL v 1.7.2</div>
<div>- installed postgresql-devel (8.3.8)</div>
<div> </div>
<div>- downloaded and compiled/installed proj-4.7.0</div>
<div> </div>
<div>- downloaded ogdi-3.1.5 and later on ogdi-3.2.0-beta</div>
<div>- configured ogdi to use proj-4.7.0</div>
<div>- compiled and installed ogdi</div>
<div> </div>
<div>- configured GDAL: --with-ogdi=/usr/local --with-pg=/usr/bin/pg_config</div>
<div>- compiled/installed GDAL</div>
<div> </div>
<div>- ogr2ogr --formats, repordt bouth postgis and ogdi driver</div>
<div> </div>
<div>running ogr2ogr:</div>
<div>ogr2ogr -f PostgreSQL PG:&quot;dbname=a1316120 host=127.0.0.1 port=5432 user=postgres password=postgrespwd&quot;</div>
<div>gltp:/vrf/home/naval/gemaps/mapdata/Approach/a1316120/dnc13/a1316120 -t_srs &quot;EPSG:4326&quot; -lco OVERWRITE=YES -segmentize 0.5 -nln soundp soundp@hyd(*)_point&#39;</div>
<div> </div>
<div>but when I try to import a DNC (VPF) chart I get the following error message:</div>
<div>ERROR 1: INSERT command for new feature failed.</div>
<div>ERROR:  column &quot;nan&quot; does not exist</div>
<div>LINE 1: ...5263)&#39;::TEXT) , 1, &#39;BE020&#39;, 1, 26, 1,             nan,      ...</div>
<div>                                                            ^</div>
<div>Command: INSERT INTO &quot;soundp&quot; (&quot;wkb_geometry&quot; , &quot;id&quot;, &quot;f_code&quot;, &quot;acc&quot;, </div>
<div>&quot;dat&quot;, &quot;exs&quot;, &quot;hdh&quot;, &quot;hdp&quot;, &quot;snd&quot;, &quot;svc&quot;, &quot;val&quot;, &quot;tile_id&quot;, &quot;end_id&quot;) </div>
<div>VALUES (GeomFromEWKT(&#39;SRID=4326;POINT (-119.614990234375114 </div>
<div>34.420528411865263)&#39;::TEXT) , 1, &#39;BE020&#39;, 1, 26, 1,             nan,        </div>
<div>3.600000, 10, 5, 0, 1, 1) </div>
<div>ERROR 1: Terminating translation prematurely </div>
<div>after failed translation of layer soundp@hyd(*)_point (use </div>
<div>-skipfailures to skip errors)</div>
<div> </div>
<div>It is the same with ogdi-3.1.5 and ogdi-3.2.0-beta.</div>
<div>why is hdh = nan (the corresponding hdp is correct), it works when importing with ogr2ogr from FWTOOLS.</div>
<div> </div>
<div>What am I doing wrong, it worked before when I used an prebuild FWTOOLS?</div>
<div> </div>
<div>I need GDAL 1.7.2 because the version in FWTOOLS has another bug (S-57 ignores names starting with ÅÄÖ).</div>
<div>Is there some one that could tell me what i&#39;m doing wrong, please?</div>
<div> </div>
<div>I&#39;m using postgresql 8.3.8 on linux redhat 5.x.</div>
<div>Kind regards,</div>
<div>Paul</div>
<div> </div>
<div><font face="Arial"> </font></div>
</span></font>
</div>

<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></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>