Yesterday was wild.
Flash back to 6 years ago and I transferred a ESRI Process over to QGIS/PostGIS and it happened to be a 911 addressing database. As I was walking out the door, the client said “So how do we deliver the data to the state” and through a bunch of conversations we ended up producing a geopackage. The ESRI Enterprise system consumed it. Life was good. Mostly.
Occasionally the Quality Check process would change on the receiving end and there was a problem. I switch back and forth from “ESRI can’t read this consistently” to “Geopackage isn’t quite working like I need”. Regardless of what I think, I need to fix it. The latest break happened last week.
There was a lot of emailing back and forth and exchanging of error logs. I have two counties running an open source setup. We’re in the minority. This has to be smooth so I can point and go “See it’s Open Source and it’s smooth and it works”.
The QAQC group sent us an empty ESRI File Geodatabase. From that I discovered a few issues with my postgresql setup I had missed. I also fell back to GDAL.
ogr2ogr -progress -append -f OpenFileGDB tn911.gdb -nln "Addresses" PG:"host=localhost port=5432 user='snoop' password='hahaha' dbname='henderson'" -sql "select id as objectid, geom, oirid, r_segid, a_segid, seg_side, gislink, structype, strucdesc, stnum_h, stnum_l, stnum, stnumsuf, building, floor, unit_type, unit_num, predir, pretype, name, type, sufdir, postmod, address, addr_esn, label, subname, vanity, zip, zip4, esn, city, county, state, lon, lat, x_sp, y_sp, z_val, gpsdate, addrauth, source, editor, geomod, geosrce, geodate, attmod, attsrce, attdate, status, delnotes from tn911.address_points"
In English:
- Open the ESRI File Geodatabase TN911.gdb, specifically the Addresses Feature Class
- Connect to Postgresql
- Use SQL to grab what I need from Postgresql
- I keep all the aliases and everything else in the File GDB that may be affecting pass/fail.
Easy….Mostly.
I had this long conversation at a conference with a student and her worry was “WHAT DO I LEARN? Python? R?” The only thing that has held consistent for me has been data centric skills. As of right now in my career that means having a good handle on GDAL. It’s an underappreciated skill set because all this other stuff you’re going to learn hinges on GDAL. I fixed a process at two client locations with one tool. I also took data from a database and shoved it into a proprietary dataset. With any hope we get another 5 years out of this process.
Anyway – Learn some GDAL.