[Qgis-developer] unknown geometry type of GEOMETRY in postgis
layer
nitin quick
quick.nitin at gmail.com
Fri Jun 23 00:29:00 EDT 2006
i tried this also but not of use.
here is some of the commands which i tried and corresponding output which i
got.
ogr2ogr -nlt POINT -f PostgreSQL PG:dbname=mydb
/home/prince/mainfo_dgn/44g1.dgn
ERROR 1: INSERT command for new feature failed.
ERROR: new row for relation "elements" violates check constraint
"enforce_geotype_wkb_geometry"
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)
ERROR 1: Terminating translation prematurely after failed
translation of layer elements
----------------------------------------------------------------------------------------
ogr2ogr -nlt MULTIPOLYGON -f PostgreSQL PG:dbname=mydb
/home/prince/mainfo_dgn/44g1.dgn
ERROR 1: INSERT command for new feature failed.
ERROR: new row for relation "elements" violates check constraint
"enforce_geotype_wkb_geometry"
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)
ERROR 1: Terminating translation prematurely after failed
translation of layer elements
----------------------------------------------------------------------------------------
ogr2ogr -nlt POLYGON -f PostgreSQL PG:dbname=mydb
/home/prince/mainfo_dgn/44g1.dgn
ERROR 1: INSERT command for new feature failed.
ERROR: new row for relation "elements" violates check constraint
"enforce_geotype_wkb_geometry"
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)
ERROR 1: Terminating translation prematurely after failed
translation of layer elements
----------------------------------------------------------------------------------------
ogr2ogr -f "ESRI Shapefile" /home/prince/44g1.shp
/home/prince/mainfo_dgn/44g1.dgn
ERROR 1: Attempt to write non-linestring (POINT) geometry to ARC type
shapefile.
ERROR 1: Terminating translation prematurely after failed
translation of layer elements
----------------------------------------------------------------------------------------
ogr2ogr -f "ESRI Shapefile" /home/prince /home/prince/mainfo_dgn/44g1.dgn
-nlt LINESTRING
ERROR 1: Attempt to write non-linestring (POINT) geometry to ARC type
shapefile.
ERROR 1: Terminating translation prematurely after failed
translation of layer elements
thanks for help
quick nitin
On 6/22/06, Gary Sherman <sherman at mrcc.com> wrote:
>
> nitin quick wrote:
> > hello everybody,
> >
> > I am currently using qgis0.7.9, Postgis1.1.2, GDAL1.3.1.
> > i have a small problem. I have a dgn file which i wanted to add to
> postgis.
> > i used the command
> > ogr2ogr -f "PostgreSQL" PG:dbname=mydb a.dgn to add it to database. No
> > error were reported.
> > When i tried to view this as ADD a POSTGIS LAYER from menu , a
> > messagebox appears saying " Unknown Geometry Type. Column WKB_geometryin
> > "public"."elements" has a geometry type of GEOMETRY which qgis doesn't
> > support currently. Invalid Layer can't be loaded.
> > i will really appreaciate if someone could guide me out of this issue.
> >
> >
> Try forcing the geometry to the appropriate type using the -nlt switch.
> QGIS doesn't support the generic GEOMETRY feature type.
>
> --
> -gary
>
> -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
> Gary Sherman
> Micro Resources: http://mrcc.com
> *Geospatial Hosting
> *Web Site Hosting
> "We work virtually everywhere"
> -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20060623/8ebfd594/attachment.html
More information about the Qgis-developer
mailing list