I didn’t mispellll Atlas in the title.
For those of you who might want to catch up:
So I started this 6 months ago….and I’m just getting around to finishing it. Why so long? Client wasn’t in a hurry for new PDF’s until they were in a hurry for new PDFs. To backtrack just a bit – client wanted PDF’s of data. A Mapbook if you will. This was done in ArcGIS’s Data Driven Pages with shapefiles and it was a tad bit clunky because of the amount of data we were dealing with. Since all this occurred a year ago I’ve been “upgrading” the data to PostGIS/Postgresql and QGIS. Why? Because my client doesn’t have deep pockets for ArcEditor or whatever it’s called at this point.
Yesterday I got the phone call which was “ZOMG We need updated maps” and I was about halfway done (if you read all the previous posts) with the migration of this project to QGIS and Atlas. I had migrated symbology and colors. I had built a template in QGIS to handle the two variations of plots (portrait and landscape). I had started playing with Atlas and since this was unfunded work on my part I stopped.
Well here we go. Part of the charm of these maps is the amount of information on them. One of the things we needed was a summary of each parcel of land from the clients perspective. So I needed to build a summary table and join it to the parcel level. If you were lucky enough to have ArcInfo (ArcGIS Desktop Advanced) you could run a frequency table. No one on my clients end of things could because they all have arcview. So with the move to PostGIS and a little bit of SQL I was providing this and people liked it.
They wanted this for each property. In the last 6 months I’ve been sharpening the database skills so I ended up building a clunky script that created a summary table for everything. I’m going to rewrite it and make it more compact and less of a headache to maintain – but usually my first run scripts all are clunky. I did this for 8 values on 23 properties. So that was (counts toes and fingers) a lot of lines of stuff to type.
It went like:
update tfg.standsum_tbl set plntdmerch = (select coalesce(sum(acres),0) from tfgviews.stands where afmstrata = ‘Planted Merch’ and tract = ‘Big Cedar Creek’) where tract = ‘Big Cedar Creek’;
In english – give me a summary of a value and if the value is Null make it 0 (so the data will be prettier in Atlas) and stick it in a column in row X.
One quick join later I could query the parcel level information for summary of the stand information – more importantly QGIS could pull that information into Atlas. In Atlas (and data driven pages) you can insert values from fields in your data. In this case – I’m pulling in data from PostGIS. I inserted an expression and Atlas will pull that data into my map.
Those lines in Red and Black turned into:
The one thing that made me the most giddy – I stuck a “date” on the bottom.
Finally I could have done this with two QGIS sesssions – one for portrait and one for landscape – BUT – I did one qgis session for each property. Now that I’ve almost idiot proofed this I’m gonna hand it off to the client to update when they wish and they want (with a small amount of instruction).
I need to do some cleanup and move text. I need to invest in a nicer North Arrow. Other than that – it works. With just a few button pushes I’ve got a self updating QGIS project. Open it – and maybe make two clicks and you have a PDF. Maybe Three Clicks.
So my very small client has a enterprise level database. Now has software on three workstations. Now has map documents that update as the data updates. For free. Well except for my time.
This is why QGIS is probably one of the more exciting FOSS4G projects you will deal with.