Hello,

I'm new to GIS and R and have been working my way along from various
sources.  I'm having difficulty getting R to see some data in GRASS.  For
troubleshooting, I'm trying out the examples in Applied Spatial Data
Analysis with R, chapter 4.

I am able to use readVECT6 to read the 'bugsites' but not the 'streams' in
the spearfish dataset.  I was able to use vInfo for the 'streams'. Here is
the error, more input/output is below.

> streams <- readVECT6("streams", type = "line,boundary", remove.duplicates
= FALSE)
Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding =
input_field_name_encoding) :
  Multiple incompatible geometries: 2:3

I have searched for the phrase "Multiple incompatible geometries" and have
not found anything helpful.  Any advice would be appreciated!

Thanks,
Eric

Terminal commands and outputs (with some extraneous lines deleted …):

'/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit
…
Python 2.6.1 found.
…
Welcome to GRASS 6.4.1 (2011)
…
GRASS 6.4.1 (spearfish60):~ > r64

R version 2.13.2 (2011-09-30)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
…
[Previously saved workspace restored]

> library(spgrass6)
Loading required package: sp
Loading required package: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.8.1, released 2011/07/09
Path to GDAL shared files:
/Library/Frameworks/GDAL.framework/Versions/1.8/Resources/gdal
Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009, [PJ_VERSION: 470]
Path to PROJ.4 shared files: (autodetected)
Loading required package: XML
GRASS GIS interface loaded with GRASS version: GRASS 6.4.1 (2011)
and location: spearfish60

> bugsDF <- readVECT6("bugsites")
OGR data source with driver: GRASS
Source:
"/Users/eric.momsen/grassdata/spearfish60/PERMANENT/vector/bugsites/head",
layer: "1"
with 90 features and 2 fields
Feature type: wkbPoint with 2 dimensions

> summary(bugsDF)
Object of class SpatialPointsDataFrame
Coordinates:
              min     max
coords.x1  590232  608471
coords.x2 4914096 4920512
Is projected: TRUE
proj4string :
[+proj=utm +zone=13 +datum=NAD27 +units=m +no_defs +ellps=clrk66
+nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat]
Number of points: 90
Data attributes:
      cat                 str1
 Min.   : 1.00   Beetle site:90
 1st Qu.:23.25
 Median :45.50
 Mean   :45.50
 3rd Qu.:67.75
 Max.   :90.00

> system("g.list vect")
----------------------------------------------
vector files available in mapset <user1>:
basins    contours  rivers

vector files available in mapset <PERMANENT>:
… landuse         streams         t_9961_300_bks  …

----------------------------------------------

> vInfo("streams")
     nodes     points      lines boundaries  centroids      areas
 islands
       139          0        104         12          4          4
 4
     faces    kernels primitives      map3d
         0          0        120          0

> streams <- readVECT6("streams", type = "line,boundary", remove.duplicates
= FALSE)
Error in ogrInfo(dsn = dsn, layer = layer, input_field_name_encoding =
input_field_name_encoding) :
  Multiple incompatible geometries: 2:3
>

	[[alternative HTML version deleted]]

