search for: polyline

Displaying 20 results from an estimated 61 matches for "polyline".

2018 Jan 30
2
Calculating angle of a polyline
Dear R users I am trying to find a formula to calculate the angle of a polyline. Is there a way to do this? Many thanks. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat194 at yahoo.com [[alternative HTML version deleted]]
2018 Jan 30
2
Calculating angle of a polyline
Assuming your polyline is defined by two vectors, one for the x coordinates, one for the y coordinates, you can try the following library(NISTunits) polyangles <- function(xV,yV) { stopifnot( (length(xV)==length(yV)) && (length(xV) >= 3)) v <- function(i) { c( xV[i]-xV[i-1], yV[i]-yV[i-1])} vlen &...
2018 Jan 30
0
Calculating angle of a polyline
A polyline by definition has many angles, so your question is ill-formed. And this is a question about math, not R, so is off topic here. I suggest reading Wikipedia. -- Sent from my phone. Please excuse my brevity. On January 29, 2018 11:10:02 PM PST, javad bayat <j.bayat194 at gmail.com> wrote: >...
2009 Mar 17
0
removeEventListener and polylines
...iously added with the method addEventListener. I found nothing on the documention so I coded a removeEventListener method. If you think it will be useful I can post it (but as i said I''m a newbie to both Javascript and Mapstraction so it can be ful of errors :) ) Another question is about polylines. Is there a way to remove a polyline with the method removePolyline if it was previously added with addPolyline(polyline,true) ? The problem lies in the boolean parameter : if it is true the polyline object is not added to polylines array so the remove method won''t delete anything. Than...
2007 Jul 13
0
layers of polylines, events building up on map
...;s my situation: I have a little route creation app that lets a user create a route. I''m using the mapstraction version of ym4r... here is the workflow: first page has a map displaying the start point of existing routes. if they click "new route: creates a route_object clears all polylines in case there are any clears all the markers and adds an onclick event. for each click I: clear all polylines with RJS add point to the waypoint table (with route_id) select all waypoints for the route and build a polyline display the polyline that all works fine.... but if I hi...
2018 Jan 30
0
Calculating angle of a polyline
..., NA) # radians, positive is counter-clockwise } > x <- c(0:3) > y <- c(0,0,1,1) > polyAngles2(x,y) / pi * 180 [1] NA 45 -45 NA Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Jan 30, 2018 at 7:09 AM, Eric Berger <ericjberger at gmail.com> wrote: > Assuming your polyline is defined by two vectors, one for the x > coordinates, one for the y coordinates, you can try the following > > library(NISTunits) > polyangles <- function(xV,yV) { > stopifnot( (length(xV)==length(yV)) && (length(xV) >= 3)) > v <- function(i) { c( xV[i]-xV[i...
2007 Jul 25
1
regarding polylines
hi all, i am experimenting with ym4r mapstraction, i am using yahoo api , when i tried polylines , its not showing up.. the code is var map; window.onload = addCodeToFunction(window.onload,function() { map = new Mapstraction("map_div","yahoo"); map.setCenterAndZoom(new LatLonPoint(37.3853,-122.0172 ),12);map.addSmallControls(); map.addMarkerGroup(new MarkerGroup([addD...
2011 Nov 22
5
x, y for point of intersection
Hi everyone, ? I am trying to get a point of intersection between a polyline and a straight line ?.. and get the x and y coordinates of this point. For exemplification consider this: ? ? set.seed(123) ? k1 <-rnorm(100, mean=1.77, sd=3.33) ?k1 <- sort(k1) q1 <- rnorm(100, mean=2.37, sd=0.74) q1 <- sort(q1, decreasing = TRUE) plot(k1, q1, xlim <- c((mi...
2023 Mar 26
0
Inconsistency in grid::grid.polyline
Hi The general "evolution" of grid.*() functions (that I have written) have tended towards the grid.polyline() style ... grid.*(...) { grid.draw(*Grob(...)) } With my thinking at least heading towards: if you are calling grid.*(), then you want to actually draw something; if you want to just create a description of something to draw, then you want to call *Grob(). In other words, I have come t...
2009 Feb 02
0
Polyline toMicrosoft() change
Hi guys at mapstraction, I made a change in the Polyline.toMicrosoft() function, in order to have all the power that a VEShape has, for instance fill color. Below is the new code, if you want to use it, change it, or whatever. Cheers, Beta /** * toMicrosoft returns a Microsoft polyline * @returns a VEShape */ Polyline.prototype.toMicrosoft = functi...
2010 Apr 30
6
addListener
I am trying to use the marker method addlistener(). A simplified version of what I''m trying to do: var map; var marker; map = new mxn.Mapstraction(''myMap'',''google''); map.setCenterAndZoom(new mxn.LatLonPoint(45.559242,-122.636467), 15); marker = new mxn.Marker(new mxn.LatLonPoint(45.559242,
2009 Mar 04
5
Detect polyline relationship to map bounds?
...ius search feature. (http://mapstraction.com/demo-radius.php) I''d like to recognize when the user extends the radius beyond the visible edges of the map and adjust the zoom level. I''m not seeing how to test this when redrawing the circle. I thought maybe I wanted to use polylineCenterAndZoom() but that is zooming out to the whole earth even though I haven''t added any polylines besides the filtering circle. I have been digging around a bit, and I''m stumped. Any guidance would be greatly appreciated. Joe PS Mapstraction is incredible! -- Joe Ger...
2004 Feb 26
1
writing polygons/segments to shapefiles (.shp) or other A rcGIS compatible file
...So what I do when I want to create a new shapefile from within R is write out the format required by the ASCII Tool ArcView (Avenue) script. This script is available at: http://arcscripts.esri.com/details.asp?dbid=11442 The format is simple: Works for space delimited ascii to point, polygon and polyline. The format for point ascii file is id, x, y (no comma for real data, space delimited). For polygon & polyline ascii files, the format is code (1 for start point, 2 for middle points, 3 for end point), x, y (no comma for real data, space delimited). Export shapefile to ascii file works for poin...
2009 Jun 01
0
[mapstraction commit] r12 - Implemented most Cloudmade functions. Still requires image, tile and KML/GeoRSS overlays
...eOverlay(marker.proprietary_marker); }, removeAllMarkers: function() { - var map = this.maps[this.api]; - - // TODO: Add provider code + // Done in mxn.core.js }, declutterMarkers: function(opts) { @@ -88,47 +107,37 @@ addPolyline: function(polyline, old) { var map = this.maps[this.api]; var pl = polyline.toProprietary(this.api); - - // TODO: Add provider code - + map.addOverlay(pl); return pl; }, removePolyline: function(polyline) {...
2007 Apr 04
5
how to image.plot a XY grid file into a lat-lon map
Hi All, I have a netcdf gridded file with LCC projection. I can easily use image.plot to visualize it. However, as the axises are in X,Y, not Lat and Lon, I could not add state or country maps onto it (or lat lon information). I do have a grid2d file that describes the lat and lon for each (X,Y) grid, but the lat and lon are not regularly spaced, so I could not use image.plot. Does anyone know
1999 Apr 17
1
Maps in R
Apologies in advance from an R newbie if this is a dumb question. Is it possible to produce choropleth maps in R? I gather from some nice research papers on the AT&T (sorry, Lucent) S web site that in S (and S Plus) there is a map() function which uses arrays of polylines and regions to draw map borders and then fill them with patterns or shades according to some scalar quantity. We currently produce such maps (of disease rates) using PROC GMAP in SAS/GRAPH which also uses the same sort of polyline format for definition of the areas. The problem in SAS is that alth...
2002 Nov 21
1
Distance between points and a polygon?
Dear R users, I know that this could easily be solved within a GIS-package, but sometimes it's more convenient to use R. So here's my question anyway... Does anyone of you know about any R-functions/code that calculates the distance between a number points and a polygon or polyline? I have looked thru the different libraries that deals with spatial statistics but haven't found anything. Thanks, Hans Gardfjell Ume? University, Sweden -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~...
2005 Sep 06
0
Revised shapefiles package
Now available on CRAN is a revised version of the shapefiles package for reading and writing shapefiles in R. New additions, courtesy of others, include the ability to convert a simple R data frame of points, polylines or polygons to a shp format list, which can then be written out to a shapefile with write.shp. There is also a function to convert the read.shp shp format list to a simple data frame as well. In addition, there is a basic implementation of the Douglas-Peucker polyline (and polygon) simplificatio...
2009 Dec 13
0
r65 committed - Use the GeoCommons addOverlay method
...pi]; + // TODO: Add provider code + + }, + + removeAllMarkers: function() { + // Done in mxn.core.js + }, + + declutterMarkers: function(opts) { + var map = this.maps[this.api]; + + // TODO: Add provider code + }, + + addPolyline: function(polyline, old) { + var map = this.maps[this.api]; + var pl = polyline.toProprietary(this.api); + // TODO: Add provider code + // map.addOverlay(pl); + return pl; + }, + + removePolyline: function(polyline) { +...
2008 Jun 03
3
OpenSpace support for mapstraction
...nks clicked from email. If you get an error ''HTTP referrer not valid'' then open a new browser window and paste in the link and it should be ok. The following features are not supported: declutterMarkers() showRoute() addImageOverlay() addOverlay() addTileLayer() toggleTileLayer() Polyline.show() and hide() Marker.setInfoDiv(), setDraggable(), setHoverIcon(), setShadowIcon(), openBubble() Map type control (if requested in addControls() this provides ability to switch on/off layers and markers) setMapType() and getMapType() Everything else should work. Regards Colin Law -----------...