i tried this also but not of use. <br>here is some of the commands which i tried and corresponding output which i got.<br><br>ogr2ogr -nlt POINT -f PostgreSQL PG:dbname=mydb /home/prince/mainfo_dgn/44g1.dgn<br>ERROR 1: INSERT command for new feature failed.
<br>ERROR: new row for relation "elements" violates check constraint "enforce_geotype_wkb_geometry"<br><br>Command: INSERT INTO "elements" (wkb_geometry , "type", "level", "graphicgroup", "colorindex", "weight", "style") VALUES (GeomFromEWKT('SRID=-1;LINESTRING (-
0.055 -0.025,0.055 -0.025)'::TEXT) , 3, 27, 0, 3, 2, 0)<br>ERROR 1: Terminating translation prematurely after failed<br>translation of layer elements<br>----------------------------------------------------------------------------------------
<br>ogr2ogr -nlt MULTIPOLYGON -f PostgreSQL PG:dbname=mydb /home/prince/mainfo_dgn/44g1.dgn<br>ERROR 1: INSERT command for new feature failed.<br>ERROR: new row for relation "elements" violates check constraint "enforce_geotype_wkb_geometry"
<br><br>Command: INSERT INTO "elements" (wkb_geometry , "type", "level", "graphicgroup", "colorindex", "weight", "style") VALUES (GeomFromEWKT('SRID=-1;LINESTRING (-
0.055 -0.025,0.055 -0.025)'::TEXT) , 3, 27, 0, 3, 2, 0)<br>ERROR 1: Terminating translation prematurely after failed<br>translation of layer elements<br><br>----------------------------------------------------------------------------------------
<br>ogr2ogr -nlt POLYGON -f PostgreSQL PG:dbname=mydb /home/prince/mainfo_dgn/44g1.dgn<br>ERROR 1: INSERT command for new feature failed.<br>ERROR: new row for relation "elements" violates check constraint "enforce_geotype_wkb_geometry"
<br><br>Command: INSERT INTO "elements" (wkb_geometry , "type", "level", "graphicgroup", "colorindex", "weight", "style") VALUES (GeomFromEWKT('SRID=-1;LINESTRING (-
0.055 -0.025,0.055 -0.025)'::TEXT) , 3, 27, 0, 3, 2, 0)<br>ERROR 1: Terminating translation prematurely after failed<br>translation of layer elements<br><br>----------------------------------------------------------------------------------------
<br>ogr2ogr -f "ESRI Shapefile" /home/prince/44g1.shp /home/prince/mainfo_dgn/44g1.dgn<br>ERROR 1: Attempt to write non-linestring (POINT) geometry to ARC type shapefile.<br>ERROR 1: Terminating translation prematurely after failed
<br>translation of layer elements<br><br><br>----------------------------------------------------------------------------------------<br>ogr2ogr -f "ESRI Shapefile" /home/prince /home/prince/mainfo_dgn/44g1.dgn -nlt LINESTRING
<br>ERROR 1: Attempt to write non-linestring (POINT) geometry to ARC type shapefile.<br>ERROR 1: Terminating translation prematurely after failed<br>translation of layer elements<br><br>thanks for help<br>quick nitin<br><br>
<br><div><span class="gmail_quote">On 6/22/06, <b class="gmail_sendername">Gary Sherman</b> <<a href="mailto:sherman@mrcc.com">sherman@mrcc.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
nitin quick wrote:<br>> hello everybody,<br>><br>> I am currently using qgis0.7.9, Postgis1.1.2, GDAL1.3.1.<br>> i have a small problem. I have a dgn file which i wanted to add to postgis.<br>> i used the command
<br>> ogr2ogr -f "PostgreSQL" PG:dbname=mydb a.dgn to add it to database. No<br>> error were reported.<br>> When i tried to view this as ADD a POSTGIS LAYER from menu , a<br>> messagebox appears saying " Unknown Geometry Type. Column WKB_geometryin
<br>> "public"."elements" has a geometry type of GEOMETRY which qgis doesn't<br>> support currently. Invalid Layer can't be loaded.<br>> i will really appreaciate if someone could guide me out of this issue.
<br>><br>><br>Try forcing the geometry to the appropriate type using the -nlt switch.<br>QGIS doesn't support the generic GEOMETRY feature type.<br><br>--<br>-gary<br><br>-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-<br>Gary Sherman
<br>Micro Resources: <a href="http://mrcc.com">http://mrcc.com</a><br> *Geospatial Hosting<br> *Web Site Hosting<br>"We work virtually everywhere"<br>-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-<br></blockquote></div><br>