similar to: Revised shapefiles package

Displaying 20 results from an estimated 1000 matches similar to: "Revised shapefiles package"

2005 Aug 17
1
RODBC and sqlColumns
I have a Postgres database that I am connecting to with the Postgres ODBC driver on Windows XP in R 2.1.0. In the database is a database with two schemas (public and X). With RODBC (1.1-4) , I can connect to the database and get the tables with sqlTables(db). I can query tables in the schema with sqlQuery("SELECT * FROM X.test"). However, I can't get the columns in table X.test
2005 Jan 05
0
zlib
I need to decompress an array of bytes that were compressed using zlib. The bytes are stored within a binary file. I can seek to the location, read the length of the compressed byte array, and read the bytes into R. What I need to do then is decompress the byte array to an array of doubles. The code looks something like this: compresslength = readBin(infile, integer(), 1, 4) data =
2004 Feb 26
1
writing polygons/segments to shapefiles (.shp) or other A rcGIS compatible file
The main limitation of the shapefiles package that I put together is that it does not create shapefiles from R objects - rather it only writes shapefiles that have been read into R and manipulated within the constraints of the existing file structure. By this I mean that for example you can change the coordinates of points and write them back out. Or you can add a bunch of blank columns in the
2012 Aug 08
1
map axis on projected shapefiles
Hi, I have overlayed 2 projected shapefiles using the "plot" function. When I plot them the numbers next to the x-axis ticks are printed in scientific format (e.g. -4e+05, -3e+05,...,), and the problem is these dont match up to the projected point locations I also wish to overlay from my dataset. For example, according to the x-axis ticks the prime meridian (0?) is in totally the
2004 Feb 25
2
writing polygons/segments to shapefiles (.shp) or other ArCGIS compatible file
I am not sure a previous e-mail reached the list (no mail aknowledgement from R-boundle etc.). The question was how to write polygon or segment coordinates into a shapefile set or any other ArcGIS supported format. The library shapefiles seems to do something but the documentation is a bit beyond of my mind.... and I cannot get the meaning of the functions write**** and its application to the case
2009 Mar 17
0
removeEventListener and polylines
Hello, my name is Mario and I''m new to Mapstraction (and to Javascript too). I''d like to know how can I remove a listener previously 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
2007 Jul 13
0
layers of polylines, events building up on map
Hi all, Here''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
2012 Jul 20
2
Reading Shapefiles
I am attempting to write what MATLAB does as : [S,A]= shaperead() which returns an N by 1 geographic array structure S containing geometric information, and a paralell N by 1 attribute structure array, A containing feature attribute information. How can this be done with R code I tried using shp<-readShapePoints() but this doesnt return the same structure that I am looking for. Please
2012 May 01
0
Plotting shapefiles on existing maps
Very helpful. One (possible) correction inline below... On Thu, 30 Mar 2006, Ray Brownrigg wrote: > > From: nhy303 at abdn.ac.uk > > > > I have plotted a map of the Barents Sea and surrounding coastline using: > > > > map('worldHires',ylim=c(50,85),xlim=c(5,65),fill=T,resolution=0) > > map.axes() > > map.scale(x=30,metric=T) > > > >
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
2006 Mar 29
1
Plotting shapefiles on existing maps
Dear All, This is probably a very basic question but: I have plotted a map of the Barents Sea and surrounding coastline using: map('worldHires',ylim=c(50,85),xlim=c(5,65),fill=T,resolution=0) map.axes() map.scale(x=30,metric=T) Next, I imported a shapefile with depth contours for the sea: contours<-read.shape("D://My Documents/BarentsSea.shp",dbf.data=T) (This is in
2006 Mar 30
0
Converting shapefiles to use in contour plots
Dear R-users, I have imported a shapefile with depth contours for a sea: depths<-read.shape("D://My Documents/BarentsSea.shp",dbf.data=T) (This is in mercator projection) **Is there a way to convert this shapefile into a format that it may be plotted on a contour plot?** I wish to add these contours onto a map (already coded using 'maps' package) to map the sea contours
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
2018 Jan 30
0
Calculating angle of a polyline
I like to use complex numbers for 2-dimensional geometry. E.g., > polyAngles2 function (xV, yV) { stopifnot((length(xV) == length(yV)) && (length(xV) >= 3)) z <- complex(re = xV, im = yV) c(NA, diff(Arg(diff(z))), 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
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 <- function(v) { sqrt(sum(v*v)) } lV <- rep(NA_real_,length(xV)) for
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 = function() { var mpolyline; var mpoints
2009 Jun 01
0
[mapstraction commit] r12 - Implemented most Cloudmade functions. Still requires image, tile and KML/GeoRSS overlays
Author: duvander Date: Sun May 31 17:34:27 2009 New Revision: 12 Modified: trunk/source/mxn.cloudmade.core.js Log: Implemented most Cloudmade functions. Still requires image, tile and KML/GeoRSS overlays Modified: trunk/source/mxn.cloudmade.core.js ============================================================================== --- trunk/source/mxn.cloudmade.core.js (original) +++
2006 Feb 09
1
Shapefiles
Dear List, I have examined the sp, maptools, and shapefiles packages (Windows) but cannot seem to figure out a solution for writing shapefiles for 'curvy shapes'. The scenario is that I generate a series of polygons, circles, and ellipses on a plot and would like to convert them to shapefiles. Since the circles and ellipses are do not return a coordinate list during the plotting
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: >Dear R users >I am trying to find a formula to calculate the angle of a polyline. Is
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