Re: [R-sig-Geo] writeOGR(GeoJSON) to string instead of file

2013-03-06 Thread Roger Bivand
On Wed, 6 Mar 2013, Philip Greenwood wrote: Hi all, This is a re-post from a few weeks ago. I'm using writeOGR{rgdal} to a create GeoJSON temporary file then reading the file and passing as a string in Java. It would be really nice to avoid writing the temporary file, and have writeOGR

Re: [R-sig-Geo] ground overlays in KML

2013-03-06 Thread Barry Rowlingson
On Wed, Mar 6, 2013 at 2:07 AM, Hodgess, Erin hodge...@uhd.edu wrote: Hello again. I'm not sure if I should ask this here, but I thought it might be a place to start: I'm producing PNG files for ground overlays in Google Earth. After some help from you this afternoon, my png files are

[R-sig-Geo] eastings/northings to long/lat

2013-03-06 Thread Ross Ahmed
I have these eastings and northings: easting - c(626550, 583550, 584083, 584550, 518437) northing - c(169550, 172550, 173989, 169550, 160768) Is there a way to convert to long/lat in R? Attempts to code through googling have failed. Thanks Ross [[alternative HTML version deleted]]

Re: [R-sig-Geo] eastings/northings to long/lat

2013-03-06 Thread Michael Sumner
It's impossible to guess effectively from an infinite number of possible coordinate systems (though probably the units are metres), but if you have more information on where they come from, what they are, and even where *you are* it can start to narrow down likely candidates. More information

Re: [R-sig-Geo] eastings/northings to long/lat

2013-03-06 Thread Barry Rowlingson
If these are eastings and northings in the UK and based on the OSGB National Grid system, then you just use the code I told you about last week or so The only problem might be if you don't know what grid square they came from. On Wed, Mar 6, 2013 at 9:36 AM, Ross Ahmed

Re: [R-sig-Geo] eastings/northings to long/lat

2013-03-06 Thread vikram ranga
Hi Ross, which projection does it have?? I think it can be done using spTransform but for that you need to provide projection info. This code might be useful # need library (rgdal) and (sp). a-data.frame(easting,northing) coordinates(a)= ~easting + northing proj4string(a)-CRS(Need projection info

[R-sig-Geo] readGDAL re-mapping data to 0-255

2013-03-06 Thread Biuw, Martin
Hi, I'm using readGDAL to read data from a geoTiff file. The valid data range of the single band is -26 to 0. I have two versions of the file, one with a NoDataValue = - and one with NoDataValue = -128. When reading the version with - everything works great, and I get the data values in

Re: [R-sig-Geo] readGDAL re-mapping data to 0-255

2013-03-06 Thread Roger Bivand
On Wed, 6 Mar 2013, Biuw, Martin wrote: Hi, I'm using readGDAL to read data from a geoTiff file. The valid data range of the single band is -26 to 0. I have two versions of the file, one with a NoDataValue = - and one with NoDataValue = -128. When reading the version with -

Re: [R-sig-Geo] readGDAL re-mapping data to 0-255

2013-03-06 Thread Biuw, Martin
Ah, that was the problem. The file with - that works fine is Int16: apparent band summary: GDType Bmin Bmax Bmean Bsd hasNoDataValue NoDataValue 1 Int16 -260 -3.130923 3.832138 TRUE - While the other one is Byte: apparent

Re: [R-sig-Geo] readGDAL re-mapping data to 0-255

2013-03-06 Thread Roger Bivand
On Wed, 6 Mar 2013, Biuw, Martin wrote: Ah, that was the problem. The file with - that works fine is Int16: apparent band summary: GDType Bmin Bmax Bmean Bsd hasNoDataValue NoDataValue 1 Int16 -260 -3.130923 3.832138 TRUE - While the

Re: [R-sig-Geo] ground overlays in KML

2013-03-06 Thread Hodgess, Erin
The slider was exactly what I needed. Thanks so much! Erin From: b.rowling...@gmail.com [b.rowling...@gmail.com] on behalf of Barry Rowlingson [b.rowling...@lancaster.ac.uk] Sent: Wednesday, March 06, 2013 2:45 AM To: Hodgess, Erin Cc:

[R-sig-Geo] random spatial distribution code / shapefiles with more than one polygon

2013-03-06 Thread Abby Rudolph
Hi, I was given the following code to determine whether the spatial distribution of attribute=1 is significantly different from the spatial distribution of attribute=0 given that the points (overall) are not randomly distributed in space. BaltCity2-readShapePoly(baltcity_mdsp83m.shp)

Re: [R-sig-Geo] random spatial distribution code / shapefiles with more than one polygon

2013-03-06 Thread Marcelino de la Cruz
Hi, My first advise is to point you to the vignette about handling shape les in the spatstat package .Go to section 3.2.5 Objects of class SpatialPolygons. In short, you could do something like this: BaltCity2-readShapePoly(baltcity_mdsp83m.shp) play2-ppp(play$X_m,play$Y_m,