[GRASS-stats] rgrass7_0.1-2 on CRAN
Markus Neteler
neteler at osgeo.org
Sat Sep 5 03:09:12 PDT 2015
On Mon, Aug 24, 2015 at 9:05 AM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> I've just submitted a new version of rgrass7 to CRAN, and the source
package
> is now available. The Windows CRAN binary will follow shortly, but the OSX
> CRAN Mavericks binary may be delayed. This is because the new version
> suggests the most recent rgdal_1.0-6, which fixes an issue with the SQLite
> driver in GDAL2, seen when that driver is available.
>
> The main change is to move the vector interface to using the SQLite format
> for intermediate files if it is available, and to get around the field
name
> length restriction when using the shapefile format. Users should not see
> changes in behaviour,
This is excellent, thanks for having implemented this improvement.
> but I'd be grateful for reports to ensure that using
> these alternative mechanisms does not change results. Among other things,
> the laundering of SQLite field names is turned off, to prevent unintended
> conversion to lower case.
I have just made a test:
GRASS 7.0.2svn (nc_spm_08_grass7):~ >
g.copy vect=zipcodes_wake,myzipcodes_wake
g.region raster=elevation -p
projection: 99 (Lambert Conformal Conic)
zone: 0
datum: nad83
ellipsoid: a=6378137 es=0.006694380022900787
north: 228500
south: 215000
west: 630000
east: 645000
nsres: 10
ewres: 10
rows: 1350
cols: 1500
cells: 2025000
# generate very long column names with long prefix:
v.rast.stats myzipcodes_wake raster=elevation column_prefix=elev_data
method=minimum,maximum,average,stddev,percentile percentile=95
Processing data (13 categories)...
Updating the database .
v.info -c myzipcodes_wake
Displaying column types/names for database connection of layer <1>:
INTEGER|cat
INTEGER|OBJECTID
DOUBLE PRECISION|WAKE_ZIPCO
DOUBLE PRECISION|PERIMETER
DOUBLE PRECISION|ZIPCODE_
DOUBLE PRECISION|ZIPCODE_ID
CHARACTER|ZIPNAME
DOUBLE PRECISION|ZIPNUM
CHARACTER|ZIPCODE
CHARACTER|NAME
DOUBLE PRECISION|SHAPE_Leng
DOUBLE PRECISION|SHAPE_Area
DOUBLE PRECISION|elev_data_minimum
DOUBLE PRECISION|elev_data_maximum
DOUBLE PRECISION|elev_data_average
DOUBLE PRECISION|elev_data_stddev
DOUBLE PRECISION|elev_data_percentile_95
GRASS 7.0.2svn (nc_spm_08_grass7):~ > R
R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
...
> library(rgrass7)
Loading required package: sp
Loading required package: XML
GRASS GIS interface loaded with GRASS version: GRASS 7.0.2svn (2015)
and location: nc_spm_08_grass7
> mydata <- readVECT("myzipcodes_wake")
Exporting 48 areas (may take some time)...
100%
v.out.ogr complete. 48 features (Polygon type) written to <myzipcodes_wake>
(SQLite format).
OGR data source with driver: SQLite
Source:
"/home/neteler/grassdata/nc_spm_08_grass7/user1/.tmp/oboe.localdomain/myzipcodes_wake",
layer: "myzipcodes_wake"
with 48 features
It has 17 fields
Warning message:
In rgdal::readOGR(dsn = RDSN, layer = LAYER, verbose = !ignore.stderr) :
Z-dimension discarded
> summary(mydata)
Object of class SpatialPolygonsDataFrame
Coordinates:
min max
x 610047.9 677060.7
y 196327.5 258102.6
Is projected: TRUE
proj4string :
[+proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334
+lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +datum=NAD83 +units=m
+no_defs +ellps=GRS80 +towgs84=0,0,0]
Data attributes:
cat OBJECTID WAKE_ZIPCO PERIMETER
Min. : 1.00 Min. : 1.0 Min. :5.951e+05 Min. : 3226
1st Qu.:11.75 1st Qu.: 16.5 1st Qu.:8.368e+07 1st Qu.: 51693
Median :22.50 Median : 32.5 Median :5.698e+08 Median :135398
Mean :22.50 Mean :103.4 Mean :5.765e+08 Mean :138404
3rd Qu.:33.25 3rd Qu.:224.2 3rd Qu.:8.408e+08 3rd Qu.:199258
Max. :44.00 Max. :301.0 Max. :2.826e+09 Max. :465259
ZIPCODE_ ZIPCODE_ID ZIPNAME ZIPNUM
Min. : 2.00 Min. : 1.00 RALEIGH :15 Min. :27501
1st Qu.:17.25 1st Qu.: 9.75 APEX : 4 1st Qu.:27526
Median :32.00 Median : 18.00 CARY : 4 Median :27592
Mean :29.93 Mean : 36.25 ANGIER : 2 Mean :27574
3rd Qu.:43.25 3rd Qu.: 29.25 DURHAM : 2 3rd Qu.:27607
Max. :53.00 Max. :157.00 FUQUAY VARINA: 2 Max. :27713
(Other) :15
ZIPCODE NAME SHAPE_Leng
ANGIER 27501 : 2 RALEIGH :15 Min. : 3221
APEX 27539 : 2 APEX : 4 1st Qu.: 44978
FUQUAY VARINA 27526: 2 CARY : 4 Median :127213
WILLOW SPRING 27592: 2 ANGIER : 2 Mean :132809
YOUNGSVILLE 27596 : 2 DURHAM : 2 3rd Qu.:193936
APEX 27502 : 1 FUQUAY VARINA: 2 Max. :477265
(Other) :33 (Other) :15
SHAPE_Area elev_data_minimum elev_data_maximum elev_data_average
Min. :5.943e+05 Min. : 55.58 Min. :107.5 Min. : 80.94
1st Qu.:7.061e+07 1st Qu.: 68.90 1st Qu.:117.6 1st Qu.: 97.35
Median :5.267e+08 Median : 77.12 Median :134.3 Median :107.11
Mean :5.430e+08 Mean : 79.85 Mean :135.0 Mean :110.36
3rd Qu.:7.941e+08 3rd Qu.: 89.95 3rd Qu.:152.7 3rd Qu.:121.78
Max. :2.807e+09 Max. :113.91 Max. :156.3 Max. :142.60
NA's :31 NA's :31 NA's :31
elev_data_stddev elev_data_percentile_95
Min. : 6.667 Min. : 99.84
1st Qu.: 9.219 1st Qu.:111.22
Median :11.882 Median :123.83
Mean :11.601 Mean :127.94
3rd Qu.:13.630 3rd Qu.:144.57
Max. :15.839 Max. :151.69
NA's :31 NA's :31
>
Looks all good!
Best,
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-stats/attachments/20150905/34081532/attachment.html>
More information about the grass-stats
mailing list