6

With QGIS, I am trying to create a heatmap from a set of points I added as a layer using the "Add Delimited Text Layer" plugin.

The points are a collection of complaints from around a city and I want to visualize portions of the city that have a higher frequency of complaints.

Using the heatmap plugin, I choose the following options:

  • Input Point Vector: my CSV layer of complaint points
  • Output Raster: heat_map
  • Output Format: GeoTIFF
  • Radius: 1000 meters
  • Decay Ratio: 0.1

I click OK and then choose NAD83, EPSG:4269 for coordinate system.

Next, I get a large grey box with tiny transparent circles.

I've tried switching the color map to pseudocolor and adding a transparent pixel list to make anything with a value of zero appear to be transparent.

Then the whole map disappears.

I'm not getting a heatmap at all and I've followed all of the popular guides I can find with Google.

5
  • a screenshot would really help (if you can't insert pictures upload it to an imagehoster and post the link). Furthermore also have a look at all the other heatmap-related qgis questions in the right sidebar
    – Curlew
    Commented Mar 15, 2013 at 21:29
  • Which CRS are your points from CSV in?
    – underdark
    Commented Mar 16, 2013 at 8:58
  • Sorry, Stackexchange wouldn't let me upload any screenshots until I've done some more activity on the site. Here is screenshot 1: imgur.com/qM3hiqq Here is screenshot 2: imgur.com/uzw4aNf Hi underdark, I've seen your blog. I made the CSV using Google's geocoding engine, so I'm not positive. The CSV is storing the locations as lat/long. THanks!
    – Twitch
    Commented Mar 16, 2013 at 21:47
  • Reproject the points from CSV to EPSG:4269 using "Save as ..." to Shapefile and 4269 as target CRS. This is necessary as far as I know because the Heatmap plugin fails with WGS84 points.
    – underdark
    Commented Mar 18, 2013 at 13:50
  • I didn't choose a CRS when I originally geo-encoded the CSV from addresses using Google's geo-encode API. All I have is a CSV file with the address in one column, and the lat and long each with their own columns. When I added the layer, I chose WGS84.
    – Twitch
    Commented Mar 27, 2013 at 18:45

1 Answer 1

4

You cannot (to my knowledge) generate a heatmap from an unprojected layer. You will first need to reproject your source data to an appropriate projection with meter mapping units (UTM works). Right-click on your points layer, select Save As..., then next to CRS choose either Project CRS if your project has an appropriate projection, or Selected CRS to select a different projection (See Reprojecting vector layer in QGIS?). After that the heatmap plugin should work correctly.

I recently needed to explain to someone how to use the heatmap plugin, and you may find the video useful: http://youtu.be/h-zX67ewqC4

4
  • I changed the CRS to WGS84/UTM16N - I hope that was the correct one. So I have the points showing up and another layer also showing up in the right place, but now the Google map I added using OpenLayers isn't lining up correctly.
    – Twitch
    Commented Mar 27, 2013 at 18:47
  • Okay okay - I think I got it. Here is what I did: - Changed the points to WGS84 and added a background using OpenLayers which is WGS84 Pseudo Mercator. - Changed the project CRS to match the OpenLayers background (WGS84 Pseudo Mercator) - Took the points -> Save As -> Selected CRS to match the Project CRS I now have something that looks like a heat map. :D
    – Twitch
    Commented Mar 27, 2013 at 19:04
  • 1
    I'm glad you got it working! I usually do it this way: 1) load the points as WGS84, 2) save that layer in a UTM projection (if the area fits within one UTM zone, otherwise some appropriate local projection). 3) create the heatmap using the projected points as input 4) reproject resulting heatmap to pseudo mercator using raster warp 5) load openlayers. You shouldn't have any alignment problems that way, and you're not doing analysis in pseudo mercator (which can lead to distortion errors). Commented Mar 28, 2013 at 11:15
  • 1
    Here's a useful explanation of why it's not recommended to do analysis in Pseudo Mercator (also known as Web Mercator): blogs.esri.com/esri/arcgis/2010/03/05/… If you are only after the "heatmap effect" and not worried about the spatial meaning (x points within kernel radius), then you can get away with generating heatmaps with data in EPSG:3857 projection. If those numbers are important, then it's best to reproject. Commented Mar 28, 2013 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.