Select to view content in your preferred language

Heat Map on ArcGIS Viewer for Flex

11367
64
03-07-2011 12:04 PM
MESHALALMASHAN
Emerging Contributor
Hi,

   I'm trying to implement a heat map on my ArcGIS viewer using the code posted on the following link:

http://thunderhead.esri.com/readonlyurl/HeatMapNew/srcview/


But still I'm not getting anything running yet as I'm not sure if it's compatible with the Viewer for Flex or not.

Any idea?
Tags (2)
0 Kudos
64 Replies
JackJoseph
Emerging Contributor
Hi Jack,

The heat map layer is created using the flash player display engine and client-side layer.  Unfortunately there is no easy way to recreate that same layer server side since the algorithms are different from the spatial analyst functionality.  There are some other print libraries such as Alive PDF that can create the client side components.

Hope this helps answer your question.


Thanks for the reply Lloyd.  I'll look into the Alive PDF library to see if that's something we can use.

Jack
0 Kudos
MattiasEkström
Frequent Contributor
When for example using the rainbow colors with the heat map, one single point is displayed with a gradient with all colors from blue to white. And some overlapping points is displayed with the same colors but the gradient is different (more white in the middle) so you can tell the difference. But I wonder if it would be possible to make this difference clearer, if one point for example was displayed with a gradient between the first two colors (blue and green) and it would require another point in the same area for the next color to be included in the gradient. This way the difference between a single point and a few overlapping points would be even clearer than it is now.
Is there a setting for this that I've missed, or would it be possible to achieve this with some minor changes to the code?
0 Kudos
BrandenBelajac
New Contributor
Thanks for the cool widget!

Can you tell me which geoprocessing tool the widget is actually running? Kernel Density?

Thanks,
Branden
0 Kudos
GISDev1
Deactivated User
Thanks for the cool widget!

Can you tell me which geoprocessing tool the widget is actually running? Kernel Density?

Thanks,
Branden


It's actually done on the Client side on-the-fly, if I recall correctly.

Check out https://github.com/Esri/heatmap-widget-flex/blob/develop/src/com/esri/ags/samples/layers/ArcGISHeatM...
0 Kudos
BrandenBelajac
New Contributor
It's actually done on the Client side on-the-fly, if I recall correctly.

Check out https://github.com/Esri/heatmap-widget-flex/blob/develop/src/com/esri/ags/samples/layers/ArcGISHeatM...


Okay, but what I need to know is what exactly does the output represent? Basically just density of overlapping buffers?
0 Kudos
LloydHeberlie
Regular Contributor
Hi Mattias,

Have you seen the Weighted HeatMap sample?  Basically it calculates the radius (size or radius of the point) and the index (where to pull the colors from the color palette).  I think if you enable the weighted function in the sample and then select the rainbow theme, it might be what you are looking for.  These are calculated through the layer's featureIndexCalculator and featureRadiusCalculator functions.

No palette applied:
[ATTACH=CONFIG]26019[/ATTACH]
Rainbow palette applied:
[ATTACH=CONFIG]26020[/ATTACH]

Hope this helps.
0 Kudos
LloydHeberlie
Regular Contributor
When for example using the rainbow colors with the heat map, one single point is displayed with a gradient with all colors from blue to white. And some overlapping points is displayed with the same colors but the gradient is different (more white in the middle) so you can tell the difference. But I wonder if it would be possible to make this difference clearer, if one point for example was displayed with a gradient between the first two colors (blue and green) and it would require another point in the same area for the next color to be included in the gradient. This way the difference between a single point and a few overlapping points would be even clearer than it is now.
Is there a setting for this that I've missed, or would it be possible to achieve this with some minor changes to the code?


Hi Mattias,

Have you seen the Weighted HeatMap sample?  Basically it calculates the radius (size or radius of the point) and the index (where to pull the colors from the color palette).  I think if you enable the weighted function in the sample and then select the rainbow theme, it might be what you are looking for.  These are calculated through the layer's featureIndexCalculator and featureRadiusCalculator functions.

No palette applied:
[ATTACH=CONFIG]26022[/ATTACH]
Rainbow palette applied:
[ATTACH=CONFIG]26023[/ATTACH]
0 Kudos
LloydHeberlie
Regular Contributor
Okay, but what I need to know is what exactly does the output represent? Basically just density of overlapping buffers?



Hi Branden,

The layer represents density and overlapping features.  The features that overlap are being blended client-side using the Flash Player's BlendMode effect.  If this was not applied you would just see a bunch of overlapping features.  If you want more control over the size and color of each feature, see the advanced sample on developers.arcgis.com.

Hope this helps.
0 Kudos
MattiasEkström
Frequent Contributor
Hi Lloyd!

The result of the weighted heat map looks like what I'm looking for, but doesn't it require an attribute to base the weight on? I don't have such an attribute in my data source. Or would it be possible to use the featureIndexCalculator and somehow calculate a new value based on number of overlapping/nearby points?
Otherwise I guess I have to see if I can modify the data and create a weight attribute.
0 Kudos
LloydHeberlie
Regular Contributor
Hi Lloyd!

The result of the weighted heat map looks like what I'm looking for, but doesn't it require an attribute to base the weight on? I don't have such an attribute in my data source. Or would it be possible to use the featureIndexCalculator and somehow calculate a new value based on number of overlapping/nearby points?
Otherwise I guess I have to see if I can modify the data and create a weight attribute.


You are correct, the weighted heat map does require an attribute that is used for calculation. Another option (if you have ArcGIS Desktop) might be to use the "Analysis Tools" -> "Proximity" -> "Near" tool in the Toolboxes to calculate your weighted attribute.  This option might be easier and quicker than having to write the client-side code to calculate the "overlapping/nearby points" client side.
0 Kudos