[GRASS5] v.external, OGR/OCI and v.in.ogr

Stephan Holl holl at gdf-hannover.de
Fri Dec 2 04:13:51 EST 2005


Hello Radim, 

thanks for the quick response.


On Fri, 2 Dec 2005 09:38:54 +0100 Radim Blazek <radim.blazek at gmail.com>
wrote:

> The problem is obviously missing FID. Try 2 things
> 1) remove topo file and try to run d.vect

Yes, after removing the topo-file d.vect shows up the vector-lines, but
v.info complains about the missing topo-file.
ERROR: Cannot open old vector roads_OCI at user1 on level 2

Is this a bug or a feature?

> 2) try to add FID column (unique id) to the table

Isnt that the job of v.external when "importing/linking"? AFAIK a unique
colums is in the table:
v.db.select roads_OCI|head
ERROR 1: ORA-00904: "FID": invalid identifier
 in select FID from ROADS_SPEARFISH60_2 where FID > 0
ERROR 1: ORA-00904: "OGC_FID": invalid identifier
 in select ogc_fid from ROADS_SPEARFISH60_2 where ogc_fid > 0
Using ogr_fid column in OGR DB
OGR_FID|cat|label|column3
1|5|unimproved road|0
1|5|unimproved road|0
1|5|unimproved road|0
1|5|unimproved road|0
1|5|unimproved road|0
1|5|unimproved road|0
1|4|light-duty road, improved surface|0
1|5|unimproved road|0
1|5|unimproved road|0
GRASS 6.1.cvs (spearfish60):~/spearfish60/user1/vector/roads_OCI > 

Thanks for looking into this.

Best

	Stephan

> 
> Radim
> 
> On 12/2/05, Stephan Holl <holl at gdf-hannover.de> wrote:
> > Dear list,
> >
> > I tried to import a vector-dataset from Oracle-spatial using the OGR
> > OCI-bindings.
> >
> > First export the spearfish-rioads to Oracle
> > using v.out.ogr, which works OK. ogrinfo gives all information, that
> > everything is fine.
> >
> > Now I want to reuse the dataset using v.external:
> > v.external dsn=OCI:user/pw at ORACLESP out=roads_OCI
> > layer=ROADS_SPEARFISH60
> >
> > This seems to work OK, also v.db.select roads_OCI gives appropriate
> > output.
> >
> > But when I try to display the dataset, only one line is shown, but
> > no error is given.
> >
> > When I reimport it in GRASS using v.in.ogr and display the imported
> > dataset, then all lines are shown on the display...
> >
> > v.in.ogr -o dsn=OCI:user/pw at ORACLESP out=roads_OCI_import
> > layer=ROADS_SPEARFISH60 type=line
> >
> > A debugging-Output (DEBUG=5) is copied here[1].
> >
> > Thanks for any pointers how to solve this problem.
> >
> > Best
> >         Stephan
> >
> > [1]
> > http://www.gdf-hannover.de/holl/tmp/output_DEBUG5.dvect_OCI_v.external
> >
> > --
> > GDF Hannover - Solutions for spatial data analysis and remote
> > sensing Hannover Office      -     Mengendamm 16d      -
> > D-30177 Hannover Internet: www.gdf-hannover.de      -      Email:
> > holl at gdf-hannover.de Phone : ++49-(0)511.39088507       -
> > Fax: ++49-(0)511.39088508
> >
> > _______________________________________________
> > grass5 mailing list
> > grass5 at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grass5
> >


-- 
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office      -     Mengendamm 16d      -     D-30177 Hannover
Internet: www.gdf-hannover.de      -      Email: holl at gdf-hannover.de
Phone : ++49-(0)511.39088507       -        Fax: ++49-(0)511.39088508




More information about the grass-dev mailing list