2,074 reputation
817
bio website staff.acecrc.org.au/~mdsumner
location
age
visits member for 4 years, 5 months
seen 1 min ago

R, Manifold, GDAL, also interested in Python, topojson/D3 and NetCDF/HDF


Apr
20
comment tfw world file in decimal degrees?
they can be given in degrees, but it would not make sense to apply those to a UTM image - since the world file affine transform assumes "regular spacing" in x/y (possibly with affine shear) - it's the fault of the data producer to not include basic metadata, you can probably figure it out if they are not forthcoming (is there any other auxiliary files with the data? what are all the files you have?)
Apr
15
comment How to add a plot with a different x axis to an existing plot?
fwiw, don't use @ slots: stepsize = res(r)[2] ; yvals = yFromRow(r)
Apr
11
comment create tracks file from points
I think it's perfectly clear what the OP wants. Is use of R an option, it's pretty straightforward to do this. AI is not really suited for this kind of work
Apr
10
comment R: How to get latitudes and longitudes from a RasterLayer?
Thanks, I added the as.data.frame step. I think it's terrible advice to add the coordinates as attributes - especially by munging with slot - since the coordinates of the object can change. If you want a raw data.frame just make one. I don't care where the information is, maybe just edit yours and we can zap this answer.
Apr
10
comment R: How to get latitudes and longitudes from a RasterLayer?
Actually you don't need to transfer the attributes, I'll remove that.
Apr
9
comment How to download climate data
worldclim.org and inside-r.org/packages/cran/raster/docs/getData
Apr
8
comment Read HDF4 data using python
Looks promising: hdfeos.org/software/pyhdf.php
Apr
8
comment QGIS and the South Pole: bug or feature?
It's not a problem with your CRS, I get it too - it seems generally flaky overall - often other points don't show either - but interesting that you don't see that? You'll probably find it works if you reproject your points layer so that it's not "on the fly". (Are you using "on the fly"? Also, what is your point source - I used CSV). I tried a few points directly off centre, at different longitudes, and slightly north of SP too but no better. I get a weird "level of detail" glitch when zoomed out too, but that's going to be dependent on the data layer as well as the graphics hardware in use.
Apr
8
comment Read HDF4 data using python
GDAL cannot read these 1D arrays (or 2D with a degenerate dimension, whatever shakes your tree). You'll need the hdf library in Python (no experience here).
Apr
8
comment Read HDF4 data using python
gdalinfo would have listed the subdatasets if they are there, this is not that kind of file afaics - still worth seeing what python returns from GetSubDatasets()
Apr
8
comment Read HDF4 data using python
If there's no listing of subdatasets (and otherwise no primary dataset as it seems here), you can't get anything with this build of GDAL. This is essentially a "header-only" summary I'm afraid. You might have to use the HDF4 library more directly, or dump out stuff with command line utilites. Can you point to an example file?
Apr
8
comment Read HDF4 data using python
Does gdalinfo not list any subdatasets?
Apr
6
comment Density Heat Maps using R
There are endless density functions in R packages, you should detail what you have done so we get some sense of your data and where you want to go? Have you tried kde2d in MASS? It's extremely simple to use: im <- MASS::kde2d(x, y); image(im); ## for example
Mar
27
comment Plotting Netcdf data. How to get right projection?
Can you provide the file? Probably you need to rasterize
Mar
13
comment How to import R-generated .gri/.grd raster files in GRASS?
Doh! Had no idea that hdr could write VRT like this . . . :)
Mar
13
comment Getting latitude and longitude raster from DEM
read the dem with raster() and use functions coordinates, xFromCol, yFromRow, xyFromCell etc.
Mar
9
comment constrain random points with a polygon in R using sp library
Put the polygon in as the first argument to spsample rather than the grid.
Feb
21
comment How to import several GeoTiff files into R?
Try library(raster); r <- stack(list.files(pattern="tif$", full.names=FALSE)) ## you can convert to sp/rgdal format if need be
Feb
8
comment Simulation of random flight paths for helicopters
Another candidate is MUCflights
Feb
7
comment Simulation of random flight paths for helicopters
The package adehabitatLT has a number of simm.[x] functions for simulating animal tracks. Also fwiw, the SpatioTemporal Task View lists packages with support for tracking data.