[GRASS-stats] unexpected error with readVECT6

2 messages Options
Embed this post
Permalink
Jarosław Jasiewicz

[GRASS-stats] unexpected error with readVECT6

Reply Threaded More More options
Print post
Permalink
Hi

I try to read vector line file with following 775 lines:

v.info results:

+----------------------------------------------------------------------------+
 | Layer:          
zb@trzy_mapy                                              |
 | Mapset:          
trzy_mapy                                                 |
 | Location:        
polska                                                    |
 | Database:        
/home/jarekj/grassdata                                    |
 |
Title:                                                                     |
 | Map scale:      
1:1                                                       |
 | Map format:      
native                                                    |
 | Name of creator:
jarekj                                                    |
 |
Organization:                                                              |
 | Source date:     Mon Mar 10 16:03:03
2008                                  |
 |----------------------------------------------------------------------------|
 |   Type of Map:  vector (level:
2)                                          |
 |                                                                            
|
 |   Number of points:       0               Number of areas:      
0          |
 |   Number of lines:        775             Number of islands:    
0          |
 |   Number of boundaries:   0               Number of faces:      
0          |
 |   Number of centroids:    0               Number of kernels:    
0          |
 |                                                                            
|
 |   Map is 3D:              
0                                                |
 |   Number of dblinks:      
1                                                |
 |                                                                            
|
 |         Projection: Transverse
Mercator                                    |
 |               N:    470423.4220965    S:    
429940.9545465                 |
 |               E:    561987.1623495    W:    
539556.8766255                 |
 |                                                                            
|
 |   Digitization threshold:
0                                                |
 |  
Comments:                                                                |
 |                                                                            
|
 +----------------------------------------------------------------------------+





........
Geospatial Data Abstraction Library extensions to R successfully loaded
 > v=readVECT6("zb", type="line")
Exporting 775 points/lines...
 100%
775 features written
OGR data source with driver: ESRI Shapefile
Source: "/home/jarekj/grassdata/polska/trzy_mapy/.tmp/jarekj-desktop",
layer: "zb"
with  775  rows and  1  columns
Error in Polygons(srl, ID = IDss[i]) : srl not a list of Polygon objects
 > ls()
character(0)


why polygon????????

Jarek
_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Roger Bivand

Re: [GRASS-stats] unexpected error with readVECT6

Reply Threaded More More options
Print post
Permalink
On Mon, 10 Mar 2008, Jaros?aw Jasiewicz wrote:

> Hi
>
> I try to read vector line file with following 775 lines:
>
> v.info results:
>
> +----------------------------------------------------------------------------+
> |  Layer:
> zb@trzy_mapy                                              |
> |  Mapset:
> trzy_mapy                                                 |
> |  Location:
> polska                                                    |
> |  Database:
> /home/jarekj/grassdata                                    |
> |
> Title:                                                                     |
> |  Map scale:
> 1:1                                                       |
> |  Map format:
> native                                                    |
> |  Name of creator:
> jarekj                                                    |
> |
> Organization:                                                              |
> |  Source date:     Mon Mar 10 16:03:03
> 2008                                  |
> | ----------------------------------------------------------------------------|
> |    Type of Map:  vector (level:
> 2)                                          |
> |
> |
> |    Number of points:       0               Number of areas:
> 0          |
> |    Number of lines:        775             Number of islands:
> 0          |
> |    Number of boundaries:   0               Number of faces:
> 0          |
> |    Number of centroids:    0               Number of kernels:
> 0          |
> |
> |
> |    Map is 3D:
> 0                                                |
> |    Number of dblinks:
> 1                                                |
> |
> |
> |          Projection: Transverse
> Mercator                                    |
> |                N:    470423.4220965    S:
> 429940.9545465                 |
> |                E:    561987.1623495    W:
> 539556.8766255                 |
> |
> |
> |    Digitization threshold:
> 0                                                |
> |
> Comments:                                                                |
> |
> |
> +----------------------------------------------------------------------------+
>
>
>
>
>
> ........
> Geospatial Data Abstraction Library extensions to R successfully loaded
>>  v=readVECT6("zb", type="line")

The help page gives a relevant example. The problem is the possible
existence of duplicates in the accompanying data frame. If there are known
to be no duplicates, or it does not matter, use remove.duplicates=FALSE
and then the final step assembling (lines or) polygons will not be carried
out. There is a bug too, but I think that for your case, setting the
argument will be a better resolution.

Please let me know if this helps,

Roger

> Exporting 775 points/lines...
> 100%
> 775 features written
> OGR data source with driver: ESRI Shapefile
> Source: "/home/jarekj/grassdata/polska/trzy_mapy/.tmp/jarekj-desktop", layer:
> "zb"
> with  775  rows and  1  columns
> Error in Polygons(srl, ID = IDss[i]) : srl not a list of Polygon objects
>>  ls()
> character(0)
>
>
> why polygon????????
>
> Jarek
> _______________________________________________
> grass-stats mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>
>

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: [hidden email]

_______________________________________________
grass-stats mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-stats
Roger Bivand
Economic Geography Section
Department of Economics
Norwegian School of Economics and Business Administration
Helleveien 30
N-5045 Bergen, Norway