Select to view content in your preferred language

Plotting GPS data

1653
5
12-26-2018 12:29 AM
KentaOkuyama
New Contributor III

I'm trying to plot GPS data in ArcGIS pro for the first time.

The raw data is in text format and looks like below

$GPRMC,151144.00,A,3335.69893,N,13012.84953,E,5.219,253.95,171218,,,A*68
2136198633 0000004023
$GPRMC,151152.00,A,3335.69887,N,13012.83373,E,2.715,255.40,171218,,,A*65
2136723401 0000004023
$GPGGA,151152.00,3335.69887,N,13012.83373,E,1,05,5.07,331.5,M,27.8,M,,*52
$GPRMC,151153.00,A,3335.70102,N,13012.83402,E,2.412,285.11,171218,,,A*64
2146959215 0000004023

.

.

.

I found that GPX to Feature class was easy and fast, I first converted this text file to .gpx file using website service and succeeded in plotting the data in ArcGIS Pro.

1. GPX to Feature class (tool_gpx.PNG)

2. Successfully mapped (map.PNG)

After that, I could convert the point data to line by Point to Lines tool.

3. Converted to point to line (line.PNG)

It looks pretty good, but I wonder if there is a way to size or highlight parts of the line that had overlapped.

In other words, the car tracked by GPS did not drive straight from the start to the end point, but it traveled back and force sometime. 

I would really appreciate if anyone is familiar with GPS and could help answer my question. 

Tags (1)
0 Kudos
5 Replies
MervynLotter
Regular Contributor

You could try first running the Intersect tool using your line feature as

input only. This will create unique line sections where they overlap. Then

run the Spatial Join tool with the result of the Intersect as both the*

Target Features* and Join Features as inputs to the tool. The output

will provide many attributes but the *Join_Count *field will identify the

overlap and provide a count of the number of times that the lines

overlapped.

KentaOkuyama
New Contributor III

Thank you Mervyn.

I tried Spatial Join with the lines and points (One to many, Intersect).

But the field Join_Count created in output line feature was all equal to 1.

Do you have any idea on what i might possibly be missing? 

Thanks in advance for your help.

0 Kudos
MervynLotter
Regular Contributor

The workflow I described does not include any points, just the line feature layer you created from your points.

From your post I could not tell whether you actually ran the Intersect tool on your line feature (as the only input)? This is an important step to break up your line segments wherever they overlaps with one another.

As your results did not show any overlaps using join count, either (1) there are no overlapping features if you zoom in close enough (i.e. the lines may be adjacent to one another like on either side of a highway), or (2) I did not properly explain the process of Intersecting and running the Spatial Join tools.

Lets call your overlapping polyline C20181224data_GPX4. I created a simple polyline with 3 features that partially overlap to explain the below process. The process I would follow:

a) Run the Intersect tool with only the C20181224data_GPX4 as your input feature. See screenshot. The result will only include areas where the lines overlap. But to determine how many lines overlap, proceed to b).

b) Then run the Spatial Join tool using the result from a) as both the Target Feature and Join Features. I forgot to mention previously that you need to change the Match Option to something like "Are identical to" or "Within" (Within may be useful as you can set a search radius if the roads do not quite touch - but I have not tested this).

c) Open the output of the attribute table and there should be a Join_Count field with a count of the overlap.

Lastly, as a completely different approach, to simply try simply visualize the overlap if there is a lot of it, try setting the transparency to something like 80% and the areas where they overlap will be darker in color.

KentaOkuyama
New Contributor III

Mervyn,

Thank you so much for your step by step guide.

I apologize for not giving details of my dataset and process. 

I will explain what dataset i have in detail and also my attempts followed your guide.

1st,, converted .gpx file to feature class, and it generated point fc.

point fc created  by GPX to Feature class tool

2nd, I converted this point fc to line fc by using Point to Lines tool.

line fc created by Point to Lines tool

3rd, I followed your instruction: use Intersect tool. But nothing could be created.

after Intersect tool

4th, I did Spatial Join using the result for both target and join feature.

spatial join

5th, ~GPX3 was created but no data.

line fc created by spatial join

I know that issue might be the line fc created in step 2nd  does not have attributes rather than 1 row. Therefore, i tried the similar procedure by using point fc.

1st, used Intersect tool for point fc.

point fc created by Intersect tool

2nd, Spatial Join with line fc. (Join one to many, Intersect).

spatial join with line fc and point fc to count overlapped points

3rd, line fc created with "Join_Count" field, but all values are equal to 1.

line fc created by spatial join with points

I thought this would have generated "Join_Count" field with number of overlapped points, and could have symbolized the parts of the line based on this value, but it did not happen. 

I wonder the original gps dataset has an issue of missing some important elements that can be used for my desired visualization. 

I'm sorry for the long notes, but can you give me suggestions on what might be potential issues?

Thank you so much. I really appreciate your time and help!

Kenta

0 Kudos
MervynLotter
Regular Contributor

Hi Kenta

I see what you mean regarding the problem with the output from the Point to Line feature class.  I replicated this issue using my own GPX file. The workaround would be to work with the point feature class that was an output from the GPX conversion tool. 

There is a nifty tool called Collect Events that will take your point feature class as an input and provide an output of point features with a count of the number of times that points overlapped. But the point geometry has to be identical for them to be counted as such. Try this and check the results, but you may first want to run another tool before this one where you can specify that all points within, for example, 20 meters are considered to be the spatially identical and then these points are snapped to one another. This is the Integrate tool but be very careful to work on a copy of your original feature class as this tool changes the geometry of your existing points. 

0 Kudos