I converted a csv file to projected SpatialPointsDataFrame in R, input it to bkde2D, converted the result to raster, saved the raster to a TIFF, and input that raster into the GME Isopleth tool.
Here is my R code:
data = read.csv("_PolarBearData.csv", na.strings = "NA", header = T)
oldproj = "+proj=longlat +ellps=WGS84 +datum=WGS84"
myproj = "+proj=stere +lat_0=90 +lon_0=-55 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs +towgs84=0,0,0"
coords = cbind(data$longitude, data$latitude)
spdata = SpatialPointsDataFrame(coords, data, proj4string=CRS(oldproj))
# ensure it's projected
spdata = spTransform(spdata, CRS(myproj))
# KDE parameters
xy = cbind(coordinates(spdata)[,1], coordinates(spdata[,2])
bandwidth = 34390
grid_x = 130
grid_y = 288
# Run KDE and save to raster TIFF
datakernel = bkde2D(xy, bandwidth, gridsize=c(grid_x, grid_y))
ras = raster(list(x=datakernel$x1, y=datakernel$x2, z=datakernel$fhat))
writeraster(ras, paste("mydata", '.tif', sep=''), "GTiff", overwrite=T)
Next I ran this GME code to produce 95% volume contours:
isopleth(in="I:\Data\mydata.tif",
out="I:\Data\Contours.gdb!mylines",
quantiles=c(.95),
poly="I:\Data\Contours.gdb!mypoly");
Here is an image of my output: Bad GME Isopleth
Black-to-white raster (background) represents a KDE generated in R with "bkde2D" from the KernSmooth package. The yellow points were the input to the KDE. The red line shows the 95% isopleth generated in GME. GME is stretching the contours south when the input is an untampered TIFF from R, but otherwise, if the raster is from Arc for instance, GME produces correct contours. Why does this happen?
UPDATE: I should also mention that I added the raster from R directly into ArcMap, and it had an unknown CRS even though I specified it in R (at least, for the input). I tried using Define Projection to fix this, but GME still produces the same output. The raster itself has coordinates that make sense (it matches the point clusters in the image), but GME is not producing good isopleths from it.