# Tag Info

8

A Caveat A standard error is a useful way to estimate an uncertainty from sampled data when there is no systematic error in the data. That assumption is of dubious validity in this context, because (a) the KDE maps will locally have definite errors that may persist systematically among the layers and (b) a potentially huge component of uncertainty due to ...

7

I would use the following workflow to calculate the area within the classes: Reclassify (Spatial Analyst) the kernel density output to whichever classes you are using. By default ArcGIS creates a continuous raster surface for the kernel density output, but reclassifies the legend (which is temporary). Using the reclassify tool will make this permanent. ...

7

I posted this question on the R-sig-Geo listserv and received a helpful answer from Adrian Baddeley, one of the spatstats authors. I will post my interpretation of his response here for posterity. Adrian notes that the function spatstat::pixellate.psp() is a better match to my task. This function converts a line segment pattern (or SpatialLines object ...

6

I was curious so I did a small test to see if the two programs perform the same function. The quick answer is yes and no. Let's have a look- Random set of 100 points with a random weight value: Setup KDE in ArcMap 10.2.1: Setup KDE in qGIS 2.0.1: Compare the results. I adjusted the symbology so that the discrete values were equal interval, 6 classes, ...

5

This may be easier if you think of it in separate steps: first calculate the quantitative density, then reclassify that result into "high" and "low." The Point Density tool inputs will be: Input point features: your outfall points Population field: Use NONE for this, because each point is being counted once. (If a point could represent multiple instances, ...

5

If you are performing calculations on a Geographic Coordinate System instead of a Projected Coordinate System, you will get blank data returned. Reproject the data into a Projected Coordinate System and try it again. See: Problem: The Kernel Density tool does not generate the expected output in ArcMap The issue occurs because the projection of the ...

5

Although Hornbydd is absolutely correct (+1 for that by the way), the first part of the question is to loop through all the unique values in a field.. this snippet should be usable in your existing code: FieldToUse = "Field" # change this to your field name with the unique values for fc in fcList: uVals = [] # new empty list # loop through each ...

5

So for some matrix, Z, you want to find the value k such that the sum of Z for Z > k equals 0.95 * sum(Z). You can do this with uniroot on a function that returns the amount of a matrix above a threshold. This function returns an appropriate objective function for a raster: cover = function(z,k=0.95){T=sum(values(z))*k;function(t){sum(z[][z[]>t])-T}} ...

4

I've worked with LEHD data before, including in a GIS context so I can probably clear up some of the confusion. First off, S000 does not represent a point, it represents an attribute. Secondly, I can tell that user26056 is working with Origin-Destination data because the GEOID's in the w_geocode are repeating and the S000 usually shows a bunch of 1's for ...

4

First, make some data so we have a reproducible example: > set.seed(123); xy = cbind(rnorm(1000), rnorm(1000)) Use kde2d from MASS. Pick h for a nice smooth map, pick n for the resolution: > library(MASS) > k = kde2d(xy[,1],xy[,2],h=.4,n=100) > library(raster) > r = raster(k) > plot(r) Which you can write to a geoTIFF: > ...

3

I suggest (as Vince) to put the center of your custom projection in the middle of the study area at 168 W 59 N. The following projections might give best results: +proj=laea +lat_0=59 +lon_0=-168 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +proj=aea +lat_1=53 +lat_2=65 +lat_0=59 +lon_0=-168 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +proj=tmerc +lat_0=...

3

By default the extent of the output kernel is the same as the extent of the shapefile. This is why it appears to be getting clipped. You'll need to explicitly define the extent for the output. The easiest way to do this in Arcmap may be to go to Geoprocessing -> Environment Settings, then select 'Processing Extent'. Select the input point layer, and adjust ...

3

Here is an approach in R. It is computationally expensive and a bit slow when applied to large rasters. Because of this, I added a point sub-sampling approach that seems tractable. I should note that, because the raster needs to be coerced into a vector, this function is not memory safe. This function returns the percent volume data and not a contour, but ...

3

Please read How to build effective heat-maps? It seems like you are looking for Distributions of attribute values rather than Concentration of points. Therefore, the QGIS heatmap plugin is the wrong tool for the job since it only does concentration of points. Try Raster | Analysis | Grid (Interpolation) instead. Another solution could be to first generate ...

3

As underdark pointed out, you are running out of RAM. How much RAM do you have? 64 bit system or 32 bit? SAGA GIS always puts all datafiles completely in memory. This is one of the reasons why it is so fast, but it fails on huge files. Things you could do to: Increase the grid resolution to eg 200m. You may also try to run the command directly from the ...

3

3

****Edit 11/08/2018 - There is now a function sp.kde in the spatialEco package that allows for weighted or unweighted kernel density estimates.**** There is no simple implementation of a Kernal Density Estimate using weights in R. Most of the advice for KDE's are limited to spatial locations only. You can write a function to project results from the ks ...

3

I have also been looking for a proper way to perform a weighted bivariate kernel interpolation. The code below worked for me: # Download an example dataset - those are tree logs in a 100x100m plot. I used the volume of log, as weight. test <- read.csv("https://dl.dropboxusercontent.com/u/39606472/R_rep/test.csv") require(ks) # Evaluate effect of tree ...

3

If you read the help file for this tool and look at the syntax section what does it takes as input? A Feature Layer. Unlike a Feature Class, you can do selections on Feature Layers. As all geo-processing tools honour selections first all you need to do is select the points of interest and have that selection feed into the Kernel Density tool. So you need to ...

2

You need the scipy file in the PythonFolder to run the Kernel Density Estimation UD. You can download the scipy setup from "http://jaist.dl.sourceforge.net/project/scipy/scipy/0.12.0/scipy-0.12.0-win32-superpack-python2.7.exe" After running the set up save it in the Python Folder in your QGIS. Restart QGIS and check. You will have the Kernel Density ...

2

To summarize my comments above: When running a spatial analysis tool on geographic lng/lat tabular data follow these steps: Make sure your data frame is set to GCS WGS 1984 Create your x/y event layer Export your event layer out to a new layer (to data frame spatial reference) Re-project your layer to a PCS using the Project tool Run your spatial analysis ...

2

The biggest difficulty is that blocks can range widely in extent, from portions of a city block (only a few tens of meters across) to many kilometers in rural areas. When the cellsize is not small enough to capture every single block polygon (or centroid) and uniquely represent it, data will be lost--and lost in a biased fashion (that is, in regions of high ...

2

A geodesist could give better advice than me on your choice of coordinate system but UTM Zone 12S (which I think is around Sri Lanka or the Maldives) seems odd. When I draw your study area (small grid) up against Australia and the MGA Zones it looks like you should probably be using WA Albers (for which I do not have the parameters handy) but Australia ...

2

If you want an arcpy solution: import numpy as np #not sure how arcpy imports numpy r = arcpy.RasterToNumPyArray('your raster name') for val in np.unique(r): area = np.sum(r == val) #multiply this by your pixel area print 'value ', val, ' : ', area alternatively you can write the values to a csv/text file.

2

In case anyone is still confused about this and needs an answer...Refer to page 12 of SpatialEcologyGME http://www.spatialecology.com/gme/images/SpatialEcologyGME.pdf. Your i was changed to a 1 because the Output tab in GME displays the literal statements you tell it to execute. So each iteration of your for loop executes a kde statement with whatever i ...

2

There is a set of add-on ArcGIS Desktop tools (versions 9- 10.2) using network kernel density techniques developed by Professor Okabe available here. http://sanet.csis.u-tokyo.ac.jp/. However they are only licensed for academic use. I used them on my MSc thesis and they worked really well. I guess you could enquire about commercial implementations. ...

2

I believe it depends on what you want to analyze to determine which tool will suit your needs. Both tools smooth out the information represented by a collection of points in a way that is pleasing visually. The purpose of the point and Kernal Density tools is to attempt to construct a surface that perfectly reflects the likelihood of an event. Point ...

2

I think you need to replace your radius parameter with a number. Incase this might help for future reference, what I usually do when I need to know what parameters I have to set, is to check the "help" details of the algorithm within Python Console (Plugins > Python Console). Type the first 2 lines below: >>>import processing >>>...

2

I finally figured it out! The main problem for me was OUTPUT_EXTENT and RADIUS. Kernel density estimation takes radius in degress only and OUTPUT_EXTENT is the size of the output rater layer and takes input as a string of "xmin,xmax,ymin,ymax". ALGORITHM: Kernel density estimation POINTS <ParameterVector> Takes a vector layer(can be a local path) ...

2

I may have found a solution to my own question, but I am not sure: v.kernel -v input=MY_LOCATIONS net=MY_NETWORK output=MY_OUTPUT stddeviation=57.735 distmax=1 mult=200 kernel=uniform The parameters and values in bold are important. Where do they come from? The kernel surrounding each dot has the uniform distribution with a range of 100 m at both sides of ...

Only top voted, non community-wiki answers of a minimum length are eligible