Displaying 20 results from an estimated 900 matches similar to: "Calculating angle of a polyline"
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
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
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
2024 Jun 24
3
Converting .grib to excel file
Dear all;
I have downloaded meteorology data from "
https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels?tab=form"
as .grib format. It has hourly data of a complete year (every hour of every
day of 12 months) and has 6 meteorology parameters. The file has been
attached.
I am trying to convert it to an excel file that puts every parameter in a
separated column.
2024 Jun 25
1
Converting .grib to excel file
Dear Bert and Sara;
I have searched on the internet and found some way to do this like python.
But python is so complicated to me as it needs many steps to be done for
reading and converting it.
I will try terra package to convert it.
On Tue, 25 Jun 2024, 15:15 javad bayat, <j.bayat194 at gmail.com> wrote:
> Richard,
> Many thanks for your email.
> I had attached the grib file to
2024 Jun 25
2
Converting .grib to excel file
Richard,
Many thanks for your email.
I had attached the grib file to the original email to R help team but it
seems you did not receive it.
Unfortunately, I do not know how to reduce the volume or extract some of
the grib file data to send it for you. The file has the volume of 6
Megabyte.
I can send it by email.
The file has 6 met parameters and Date (day/month/year hour:minute).
I want the
2023 Dec 06
2
Volume of polygon
The volume of a polygon = 0. Polyhedra have volumes.
This may be irrelevant, but if the lake is cylindrical == constant cross
sectional area at all depths, then height doubles when the volume does and
vice versa. Otherwise you have to know how area varies with height or use
more sensible approximations thereto.
Cheers,
Bert
On Tue, Dec 5, 2023, 20:13 javad bayat <j.bayat194 at
2017 Nov 13
0
Convert poly line to polygon in R
Might want to post this on R-sig-geo.
Might also want to post in plain text format... see below how your message got messed up coming through the mailing list.
--
Sent from my phone. Please excuse my brevity.
On November 12, 2017 9:58:56 PM PST, Javad Bayat via R-help <r-help at r-project.org> wrote:
>I have a shape file as poly line and I want to convert it to polygon.Is
>it
2023 Dec 06
2
Volume of polygon
Dear all;
I am trying to calculate the volume of a polygon shapefile according to a
DEM raster. I have provided some codes at the end of this email.I dont know
if the codes are correct or not. Following this, I have another question
too.
I want to know if the volume of the reservoir rises or doubles, what would
be the elevation?
I would be more than happy if anyone could help me.
Sincerely
"
2017 Nov 13
2
Convert poly line to polygon in R
I have a shape file as poly line and I want to convert it to polygon.Is it possible to do that in R?lake <-readShapeLines("./lake_main_utm.shp")proj4string(lake) <- CRS("+proj=utm +zone=39 +datum=WGS84")
Sincerely.
[[alternative HTML version deleted]]
2024 Sep 26
1
Problem with converting grib file to excel
Attachments CAN NOT be sent to group
On Thu, 26 Sep 2024, 21:22 javad bayat, <j.bayat194 at gmail.com> wrote:
> Dear Roy,
> Sorry for my mistake, I thought I have uploaded the grib file.
> I really apologise for that. I will send it on Saturday.
> Thank you very much.
>
> On Thu, 26 Sept 2024, 17:40 Roy Mendelssohn - NOAA Federal, <
> roy.mendelssohn at
2024 Jun 26
1
Converting .grib to excel file
I'm now inclined to go with 'search for "convert GRIB to CSV".
https://confluence.ecmwf.int/display/CKB/How+to+convert+GRIB+to+CSV
is the first line. I know that's not an R solution, but using software
specifically developed for encoding, decoding, extracting, &c GRIB file by the
European Centre for Medium-Range Weather Forecasts and actively
maintained, with an example
2024 Sep 26
1
Problem with converting grib file to excel
Hi Javad:
I know a lot about reading GRIB files, I work with them all the time. But if you don?t make the file available, or point me to where I can download it, there is not much I can do.
Thanks,
-Roy
> On Sep 25, 2024, at 9:41?PM, javad bayat <j.bayat194 at gmail.com> wrote:
>
> Dear all;
> Many thanks for your responses. Actually it is not completely a GIS file, it
2024 Sep 26
1
Problem with converting grib file to excel
Dear Roy,
Sorry for my mistake, I thought I have uploaded the grib file.
I really apologise for that. I will send it on Saturday.
Thank you very much.
On Thu, 26 Sept 2024, 17:40 Roy Mendelssohn - NOAA Federal, <
roy.mendelssohn at noaa.gov> wrote:
> Hi Javad:
>
> I know a lot about reading GRIB files, I work with them all the time.
> But if you don?t make the file
2023 Dec 06
1
Volume of polygon
Hi,
As already mentioned, this is a great topic for R-sig-geo, where you'd
probably get specialist answers like the lake morphology package
https://cran.r-project.org/web/packages/lakemorpho/index.html which is
explicitly designed for this kind of question.
Sarah
On Tue, Dec 5, 2023 at 11:13?PM javad bayat <j.bayat194 at gmail.com> wrote:
>
> Dear all;
> I am trying to
2009 Mar 04
5
Detect polyline relationship to map bounds?
I''m working on a mapstraction implementation modeled after the radius
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()
2024 Sep 26
1
Problem with converting grib file to excel
Dear all;
Many thanks for your responses. Actually it is not completely a GIS file,
it is a data file which stores meteorological data of a specific region.
But the site allows downloading with grib format and as I searched to read
this type of file in R, I found the Raster Package.
In python it is possible to do this using cdsapi and xarray library, but I
am not familiar with python.
Sincerely
2024 Jun 26
1
Converting .grib to excel file
Whoops, sorry, you *did* answer "what went wrong".
> param_names <- c("param1", "param2", "param3", "param4", "param5", "param6")
> extracted_data <- extract(raster_data, param_names, df = TRUE)
#Error in (function (classes, fdef, mtable) :
#unable to find an inherited method for function ?extract? for
signature
2024 Apr 10
1
Question regarding reservoir volume and water level
Dear all;
Thank you for your reply.
David has explained an interesting method.
David I have DEM file of the region and I have extracted the xyz data from
that.
Also I can extract bathymetry data as xyz file.
I have calculated the storage (volume) of reservoir at the current
elevation.
But the method I have used to calculate the volume is different from your
method. I have crop DEM by the reservoir
2012 Oct 19
3
saving to docx
hi all,
how can i saving R output to docx or Jpeg format?
[[alternative HTML version deleted]]