Using the ArcGIS Server JavaScript API version 4.18, how can I visually highlight areas with high concentrations of overlapping polygons, such as these historical cyclone tracks?
In addition I need to give higher weighting to more severe cylones based on a numerical attribute (HazardValue, as shown in the legend).
The ArcGIS Server JavaScript API contains a HeatMapRenderer, which looks promising but is only suitable for points.
If possible I would like to find a front-end solution rather than creating a raster on the server (I plan to add the ability to filter the polygons and would like the heatmap to regenerate dynamically based on the selection, which seems more suitable to front-end processing).
-
The last time I needed to do that, I wrote an SOE geoprocessing service in ArcObjects Java, and rigged the JS client to send it the request and render the result.Vince– Vince2021年03月02日 03:49:30 +00:00Commented Mar 2, 2021 at 3:49
-
1@Vince thanks, I'm hoping to avoid needing to use the back-end but it's good to know you had it working if it comes to thatStephen Lead– Stephen Lead2021年03月02日 04:45:55 +00:00Commented Mar 2, 2021 at 4:45
-
I think you would either need to use opacity like in your photo or create a point layer from your polygons and then use HeatmapRenderer, since each polygon has its own value you can create a "csv" layer (like the one used in this example) from the points and the value and use the heatmap renderer.Dror Bogin– Dror Bogin2021年03月15日 09:09:49 +00:00Commented Mar 15, 2021 at 9:09
-
1@DrorBogin there you go, proof that it works ;)Stephen Lead– Stephen Lead2021年03月17日 02:50:41 +00:00Commented Mar 17, 2021 at 2:50
1 Answer 1
In the end I wrote a Python script to create a mesh of points to represent each polygon, then used the aforementioned HeatMapRenderer to display them:
I was surprised to see the bright yellow hot-spot above Western Australia, which wasn't as apparent from the base polygons, even with a transparency. Which I guess demonstrates the benefit that this visualisation brings....
-
1brilliant work StephenMahmoud Adel– Mahmoud Adel2022年12月21日 12:01:19 +00:00Commented Dec 21, 2022 at 12:01
-
That looks like what a need. Care to share some pointers on how you designed your python code?sal– sal2024年07月02日 18:59:41 +00:00Commented Jul 2, 2024 at 18:59
-
@sal I don't have the code handy at the moment. But from memory the Python script created a series of evenly-spaced points, say 10km apart on a grid. Then I clipped the grid with each polygon to give a new dataset consisting of evenly-spaced points representing that polygon. Overlaying all of the clipped-points-layers gives an approximation of the overall density of events occurring at each grid point location.Stephen Lead– Stephen Lead2024年08月05日 23:51:37 +00:00Commented Aug 5, 2024 at 23:51
Explore related questions
See similar questions with these tags.