2

I have been given a CSV file which contains the Longitude and Latitude data points for a number of mobiles that run our own internal app. The data includes the unique "ID" for the device plus a date & time stamp for each ping received.

I have been asked if I can extract the data to show only the mobiles within a specific area. I'm new to this so based on research I think I need to create polygon covering the area we are interested in and then work out which points are within that polygon.

I have downloaded and installed some software called QGIS which seems like its capable of doing what I need. I have imported the CSV file which looks correct.

Can anyone point me in the direction of how to go about getting the info i need. Ultimately I wanted to extract the points I'm interested in and then load that into kepler.gl to have a graphical view of the movements over a period of a week so I need to retain the unique "ID" and date / time stamp but for only the points within my polygon.

10
  • 1
    QGIS is capable of time-visualization. Check the documentation and official training manual.
    – Erik
    Commented Sep 3, 2021 at 8:56
  • 1
    Not exactly sure what you want to do - however, try Menu Vector / Analysis Tools / Count points in polygon. Otherwise, use QGIS expressions (with field calculator or select by expression) to define a filter based on overlay_within (to get the points in the polygon), combined with the condition for the timestamp.
    – Babel
    Commented Sep 3, 2021 at 9:05
  • @Babel, thanks for the info, that sounds like what i need to do. However i'm a step behind unfortunatley. I am struggaling to work out how to create the polygon. Is this something i do within QGIS or do i create it elsewhere and import it? Thanks.
    – Pigsfoot
    Commented Sep 3, 2021 at 9:30
  • Create a new lyer (I recommend: Geopackage) of polygon type, then draw the polygons. See: docs.qgis.org/3.16/en/docs/user_manual/managing_data_source/…?
    – Babel
    Commented Sep 3, 2021 at 9:35
  • 1
    It depends on what you mean by "specific area". If it's a municipality/state/country, you should be able to download boundaries from public repositories. If it's another kind of area, like a zone around a specific point, you can create a buffer. Or, you also can draw it by hand in QGIS.
    – gvanhavre
    Commented Sep 3, 2021 at 9:36

1 Answer 1

2

Not exactly sure what you want to do - however, try Menu Vector / Analysis Tools / Count points in polygon. Otherwise, use QGIS expressions (with field calculator or select by expression) to define a filter based on overlay_within (to get the points in the polygon), combined with the condition for the timestamp. [Babel, 2021]

In QGIS, or other GIS software,

  1. Import .csv data
  2. create a layer
  3. create the desired polygon
  4. using Clip tool or Count Points in Polygon tool, extract/count the points.

I would personally draw the polygon and use the clip tool to create a clipped dataset with the desired area of concern, and the clip tool won't drop the attribute/table data. If it needs to be exported into .csv you can do that using QGIS.

If you are new to QGIS, here are some helpful link on the subject:

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.