search for: lat1

Displaying 16 results from an estimated 16 matches for "lat1".

Did you mean: dat1
2011 Jan 20
1
Generating time progressing line for Google Earth
...lt;- function (degree) { radian = degree * (pi/180.0) return(radian) } #radians to degrees Degrees <- function (radian) { degree = radian * (180.0/pi) return(degree) } # Calculates the distance between two points using the # Spherical Law of Cosines gcd.slc <- function(lon1, lat1, lon2, lat2) { R = 6371.0 # Earth mean radius [km] lon1 = Radians(lon1) lat1 = Radians(lat1) lon2 = Radians(lon2) lat2 = Radians(lat2) d = acos(sin(lat1)*sin(lat2) + cos(lat1)*cos(lat2) * cos(lon2-lon1)) * R return(d) # Distance in km } ##...
2008 Sep 12
2
Join data by minimum distance
I am wondering if there is a function which will do a join between 2 data.frames by minimum distance, as it is done in ArcGIS for example. For people who are not familiar with ArcGIS here it is an explanation: Suppose you have a data.frame with x, y, coordinates called track, and a second data frame with different x, y coordinates and some other attributes called classif. The track data.frame has
2005 Jan 19
1
looking for a basic spatial diff function
...andrake 10.1 release: R 2.0.0 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 --------------------------------- Colleagues Is there a function to calculate distances between adjacent latitude/ longitude pairs in a matrix? It is basically a spatial diff() function that I have in mind. Data: long1, lat1 long2, lat2 long3, lat3 looking for: diff(data$long, data$lat) function Result long1, lat1 long2, lat2, distance = long/lat2 - long/lat1 long3, lat3, distance = long/lat3 - long/lat2 I've probably missed it but a search of the maillist archives and quick scan of the packages (map*) did not...
2010 Jul 23
1
Midpoint between coordinates
Dear R users, I need to find the coordinates for the point (midpoint) located half way between two pairs of coordinates (lon1,lat1 and lon2,lat2) assuming a straight line between them. What would be the best way? I tried to find an answer in the help archives but without success. I would greatly appreciate any help. df<- data.frame(lon1=c(-4.568,-4.3980), lat1=c(59.235,56.369), lon2=c(-5.123,-4.698), lat2=c(60.258,59.197)...
2012 Dec 19
1
"For" loop and "if" question
All - I have a large data frame that looks like ID p1 p2 p3...p20 Lat1 Lat2 Lat3...Lat20 Long1 Long2 Long3...Long20 1 0 0 1 0 NA NA 29.xx NA NA NA -89.xx NA 2 1 0 0 1 27.xx NA NA 29.00 -88.00 NA NA -89.xx 3 0 0 0...
2006 Jul 19
5
Model Validation - with a twist
...t+googlekey ).read doc = Document.new(result.to_s) root = doc.root retstatus = root.elements[''/kml/Response/Status/code''].text if retstatus.to_i == 200 coordinates = root.elements[''/kml/Response/Placemark/Point/coordinates''].text long1, lat1, = coordinates.split('','').map { |v| v.to_f } params[:bookstore][:latitude] = lat1 params[:bookstore][:longitude] = long1 @bookstore = Bookstore.new(params[:bookstore]) if @bookstore.save redirect_to :action => ''add'' flas...
2007 Oct 30
2
calculate spatial distance
Hi, I have a set of locations defined by longitude and latitude (in degrees), and want to calculate the spatial (or geographic) distance among all locations. I did not find such a function in the spatial-related packages. (I *cannot* use 'dist', as I have geographic, not cartesian coordinates). thanks! Robert Robert Ptacnik Norwegian Institute for Water Research (NIVA) Gaustadall?en 21
2011 Feb 08
0
favorite pattern for adding functionality to an AR?
Do you have a preferred programming pattern for adding functionality to an ActiveRecord? As an example, say I have some gnarly trig functions for distance and bearing between pairs of latitude and longitude: === file: latlng.rb module LatLng def haversine_distance(lat1, lng1, lat2, lng2) ... end def bearing(lat1, lng1, lat2, lng2) ... end === EOF ... and I want to mix in haversine_distance(other_ar) and bearing(other_ar) methods into an ActiveRecord. The shim functions would look like this: === def haversine_distance(other_ar) haversine_distance(self.l...
2008 Nov 17
2
How to calculate the linear distance between 2 points
Deemed colleagues I would appreciate your help with a sentence to calculate the linear distance between 2 geographical points (coordinates in UTM). In advance thnks for your attention, -- Ricardo Bandin Llanos rbandin@udec.cl Estudiante - Magíster Cs. m. Pesquerías Universidad de Concepción, Región del Bio-Bio, Chile Celular: (0056-41) 97949957 [[alternative HTML version deleted]]
2009 Apr 07
0
Converting a whole dataframe (including attributes) from latin1 to UTF-8
...R with Emacs/ESS. I have used the following hack to convert a data.frame in latin1 to utf8: > Sys.setlocale(category = "LC_ALL", locale = "sv_SE.iso88591") > foo <- read.spss("foo.sav", to.data.frame=TRUE) > write.table(foo, "foo.data") $ recode lat1..utf8 foo.data > Sys.setlocale(category = "LC_ALL", locale = "sv_SE.utf8") > foo <- read.table("foo.data") I have now found two problems with this approach: a) variable.labels is droped b) the order of unordered factors is changed I had just worked out a h...
2005 Jul 12
2
unix charset = LOCALE
Andrew Bartlett said once that 'unix charset = LOCALE' means to force samba to read 'LANG=' from environment. >echo $LANG >en_US >cat /etc/sysconfig/i18n >LANG="en_US.UTF-8" >SUPPORTED="en_US.UTF-8:en_US:en" >SYSFONT="lat1-16" When i restart smbd/nmbd all my files inside all shares change their names. Its looks an charset mis-match for me. My clients are Windows XP SP2. My clients are UTF8 My Samba reads charset from Linux My Linux is 'en_US.UTF-8' Everything is UTF8? or not? Why its happens ? Than...
2005 Mar 04
1
Unicode problem.
Hi! Here is my isolinux.cfg. It's slackware based. ====================== default Kernels/bare.i/bzImage initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=8192 rw root=/dev/ram ZILIX_KERNEL=bare.i prompt 1 timeout 1200 font lat1-16.psfu display mensagem.msg F1 mensagem.msg F2 opcoes.msg F3 help.msg label linux kernel Kernels/bare.i/bzImage append - label adaptec.s kernel Kernels/adaptec.s/bzImage append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=8192 rw root=/dev/ram ZILIX_KERNEL=adaptec.s labe...
2005 Jul 11
3
charset issue
Hi, When i restart smbd/nmbd, all the files inside all shares change their names. All the files are affected specially accent portuguese brazilian files. File names become a mess in whole samba server. 1) Has anyone seen this kind of samba server behavior? 2) Im using samba 3.0.4, is there a recognized bug? , if i change to latest version will this issue be solved? Any suggestions are highly
2009 Nov 15
1
R crashing
Hello, This is what I am trying to do: I wrote a little function that takes addresses (coordinates) as input, and returns the road distance between every two points using Google Maps. Catch is, there are 2000 addresses, so I have to get around 2x10^6 addresses. On my first go, this is what I did: ######################################### getRoadDist = function(X,complete=F){ # X must be a
2012 Dec 17
5
save to file
 Hi, What's the equivalent of "Save to File" from the R console File menu on an R routine? Just trying to capture the whole R console into a text file when my code fails. Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA http://www.fws.gov/redbluff/rbdd_jsmp.aspx [[alternative HTML version deleted]]
2007 Aug 23
20
Eliminating bad tests from SuperRedCloth
Hi, all. I haven''t felt at liberty to go axing test cases, but some of the 33 that are failing now are ones I don''t think we want to pass? cruft coming from Markdown or made up to fill a gap some years ago. I''d like to float the proposition that we make Super (and thus RedCloth 4) behave as identically as possible to Textile2 as working on