If you copy data from somewhere and paste it into R, you can easilyt import it as a data.frame using the textConnection function
dat <- textConnection("1 0 7 0 0 1 0 0 0 5 0 0 0 0 2 0 0 0 0 1 0 0 0 1
1 0 0 1 0 0 0 3 0 0 0 0 1 0 0 0 1
0 0 0 1 0 0 0 2 0 0 0 0 1 0 0 0 1 0 1 0 0 1
1 0 0 1 0 3 0 0 0 0 1 0 0 0 1
0 0 0 1 0 0 0 2 0 0 0 0 1 0 0 0 1 0 1 0 0 1 1 2 1 0 1 0 1")
df <- data.frame(scan(dat, fill = TRUE, what = as.list(rep(1, 29))))
Nothing fancy. Just a scratchboard for Open Source Geospatial manipulations. Involves (although not limited to) Linux, R, gdal, Quantum GIS, Geoserver etc.
Sunday, December 19, 2010
Thursday, December 16, 2010
Ubuntu login problem
gdm says:" error initiating conversation with authentication system - general failure"
The problem was solved after commenting out the following row in /etc/pam.d/gdm
@include common-pamkeyring
The problem was solved after commenting out the following row in /etc/pam.d/gdm
@include common-pamkeyring
Monday, December 13, 2010
Friday, December 3, 2010
Line to polygon conversion in GRASS
http://osgeo-org.1803224.n2.nabble.com/converting-lines-to-polygons-td5557002.html
v.in.ogr -o dsn=C:\path\to\shapefile\or\dxf.file output=circles1 type=line
v.clean input=circles1 output=circles2 tool=snap,break,rmdupl thresh=0.2,0,0
v.type input=circles2 output=circles3 type=line,boundary
v.centroids input=circles3 output=circles4 option=add
Be sure to play with the treshold parameter of v.clean
v.in.ogr -o dsn=C:\path\to\shapefile\or\dxf.file output=circles1 type=line
v.clean input=circles1 output=circles2 tool=snap,break,rmdupl thresh=0.2,0,0
v.type input=circles2 output=circles3 type=line,boundary
v.centroids input=circles3 output=circles4 option=add
Be sure to play with the treshold parameter of v.clean
Subscribe to:
Posts (Atom)