[Qgis-developer] unknown geometry type of GEOMETRY in postgis layer

nitin quick quick.nitin at gmail.com
Fri Jun 23 04:11:47 EDT 2006


yes, i tried that also but it didn't worked until and  without adding option
-skipfailures.
Now command
ogr2ogr -nlt POINT -skipfailures  -f PostgreSQL PG:dbname=mydb
/home/prince/mainfo_dgn/44g1
works.
but this way i can produce shape file and correspondent entry in Postgis for
element of type POINT only. For geometry type LINESTRING , POLYGOM,
MULTILINE, MULTIPOLYGON etc i have run this command separately which
resulted in several shape files and several table creation in databse for
same map.
Is this way i have to live with it. I also don't know whether dgn file i am
holding is of version 7 or 8. Also while using this qgis ( i havenot noiced
exact steps) a warning ,multiple times, occurs which results in seg fault
sometimes.
" Warning: This code (file qgsVectorLayer.cpp, line 1260) should never be
reached, problem may occur."

thanks
quick nitin

>

On 6/23/06, Gary Sherman <sherman at mrcc.com> wrote:
>
> nitin quick wrote:
> > 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
> Notice that your INSERT statement is attempting to create a feature of
> type LINESTRING.
>
> Did you try using -nlt LINESTRING?
>
>
> --
> -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/9120b0a4/attachment.html


More information about the Qgis-developer mailing list