3

I have about 100 locations that are open for a couple of weeks, some for a day or two, some for multiple days, some every day. They are currently all plotted as data points on a map. So right now, I have a map with every location that will be open on every day over the weeks. What I need to do is separate these points so that I can create specific maps for each day. For example, I need a map of all locations that will be open on Day 1, all locations that will open on Day 2, and so on.

I realize that I can go into my CSV file that I used to plot these points and manually separate them into multiple files based on each individual day (or build an ungodly Excel macro). However, since I am trying to increase my QGIS skills, I am wondering if there is a more efficient way that I can solve this problem within QGIS itself.

(I understand this may be possible by using the Python plugin, but I am very new to Python and cannot really do anything with it, as I have only started to pick it up in the last few days. So if you were to recommend using Python, please do so only if you have a script)

2 Answers 2

3

For your particular problem might be better instead of many maps have one map with labels to points of opening dates. That requires one date interval column or two columns starting date / closing date.

You can also use these columns to change style of the layer from Single symbol to Categorized and categorize by your date intervals. Once categorized you can easily switch on and off categories (dates). Up to you, if you duplicate layer many times for every date or use only that one layer with locking style of layer in Print Composer(s) or just switch it every time and use Project/Save as image...

0

The tool you are looking for in QGIS is the Split Vector Layer... (Vector > Data Management Tools > Split Vector Layer...). Specify the Input vector layer as your data layer, and the Unique ID field as the data field that contains which days/weeks each point is open. Specify the output folder, and a series of Shapefiles (the points split by the days they are open) will be written into the output folder.

The output of the split tool will depend on how the data attribute field is designed (e.g., single column with many values vs. many columns with boolean values), so you might need to re-arrange the data to get the output you want.

3
  • I've tried this step for step about three times. I'm specifying the output folder as my Desktop, and nothing is happening. There are no files there at all. Any insight?
    – Joe
    Commented Aug 5, 2016 at 0:03
  • Try creating a folder on your desktop, for example "output-shapefiles" and printing them to that. Also, what is the structure of the data? What do the columns look like when you right click on the layer and open the Attribute Table? Miro's answer below is also a good alternative that you may want to consider.
    – jbukoski
    Commented Aug 5, 2016 at 0:13
  • Still no luck. I get the notification that it has place the shapefiles in the specified location, yet they aren't there. I don't know what's going on here. I'm not sure how to add a picture on here, otherwise I'd just add a screengrab of my attribute table. Anyway, it's about 10 columns, but I have a column for the "Schedule" of each location, formatted as: 10/31-11/3: 9A-7P, 11/4: 9A-8P.
    – Joe
    Commented Aug 5, 2016 at 0:17

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.