How do I take a median value every 100 m along a points file?

565
7
11-21-2017 08:13 AM
EllenPatrick
New Contributor

I have air pollution measurements taken throughout cities along bus routes that I need to display on my maps with the data aggregated into set distance segments. Right now when I map the raw data I have points throughout the cities from data collected every 10 seconds. Is there a simple tool I can use that will take the median and/or mean value every 100 m, for example?

0 Kudos
7 Replies
DanPatterson_Retired
MVP Emeritus

no builtin tool, but I can definitely think of an approach.  

I suspect that your points aren't spaced 100 m apart... that would be too easy.

And just to clarify, you just want the value at each 100 m spacing and not a rolling/moving/sliding window median over a 100 m interval?

Can you describe or provide a sample of your point data.

How comfortable are you with a python solution?

0 Kudos
EllenPatrick
New Contributor

No they're not currently spaced any set distance, they were collected every 10 seconds so the spacing is quite random. I don't need a rolling median, just a single median for every set distance. Essentially I just want to clean up my map (picture below) so that it's not just a blur of points. I know some people I worked with go along and draw fixed length polygons the entire length of the route and then join the points to each polygon and find the median value that way, but surely there has to be a more simplistic method because drawing out polygons for an entire city is no simple task.

I've touched on Python through the GIS courses I took, but I have not used it in any of my analysis.  

 Sample Map

0 Kudos
DanPatterson_Retired
MVP Emeritus

If you have the appropriate license, why not convert the points to polyline, assuming that they are sequential.  Once you have the polyline, there are a variety of things to do.  Perhaps you could fill in that detail before I make other suggestions.  If the data are being collected in a gps, then there is software that will convert directly

Advise and we can go forward

0 Kudos
EllenPatrick
New Contributor

I have the complete advanced ArcGIS license. The coordinates were collected in GPS so each point has a corresponding GPS coordinate.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Then there are many things you can do

Obviously, you can convert the points to a polylines

Splitting is easy... soo many ways http://desktop.arcgis.com/en/arcmap/latest/manage-data/editing-fundamentals/ways-to-split-a-line-fea...

How about split line at specified distance or percentage?

You could just provide some symbology and keep the lines.... or

Use the Add Geometry Attributes tool get the centroid of your new 100 m line segments

Add it back in as an event layer using the X, Y coordinates to make new points you could use this

http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/feature-to-point.htm

or several other options.

OR, you could just filter your existing points and be close-ish to 100 m

Options abound.

0 Kudos
EllenPatrick
New Contributor

Okay thanks, I'll play around with some of those!

0 Kudos
EllenPatrick
New Contributor

Ok, so I can split my line into the specified lengths. However, how do I then get a median value in each line segment?

0 Kudos