2021-05-20 Empire Building
I'm Not A Cartographer
I don't make maps. I've drawn some crude representations of areas, towns, cities, continents—all with no thought to accuracy or scale. "Gee, that looks pretty." Aaaand... Done!
For this project I'm not doing that (again) and so I needed some kind of basis is what amounts to objective reality in the simulation we call life. I don't know if you know, but you can't use Google Maps for anything, really. It's all copyrighted imagery from the map view to the satellite photography to the meshes for the pretty 3D structures in major metropolitan areas. Try to buy some imagery and the process starts with "contact us for a quote" and that roughly translates to "Waaayyy outside of my meager budget" so I went elsewhere. And elsewhere. And elsewhere.
It's pretty much the same story all over. There does not seem to be a service where you can just pan a globe to the view you want, click buy, and have an image that you can use royalty free for any purpose, including commercial. Since I could someday monetize this site with ads, or whatever, and I am definitely creating a derivative work, there's really nothing out there. Do you make websites? Here's a business opportunity for you. Call it Halesvision and tell 'em where you got the idea.
So, let me tell you what I did find: public domain map data! You may not think about it very much, but you literally own the government—at least a very small portion of it. That means that anything the government produces is, therefore, your property. In other words, all products of the government are in the public domain, freely usable by anyone for any purpose. They may ask that you give credit where do for the source material (and I will), but you don't even have to do that. It's yours.
Happily, one of the products the government produces among its oodles of data is an incredible amount of incredibly detailed maps. You can check out the TIGER/Line® Shapefiles page to download some of your own. Please note that this is the download page where you actually find the maps. This page was actually not that easy to find in their site when I navigated away, so I suggest you bookmark it right away so you can easily return to the actual map downloading area. There is also an FTP site for those so inclined, but since I didn't actually know what I was searching for, the web interface was simple enough to navigate.
For the data, you select a year, a subject, and then drill down in some cases by state and then county to reach the actual shapefiles. What you do with all those files is up to you, but I'll tell you what I did with them.
Building a City
First, I found that getting really, really big image exports from QGIS, a free and open source geographic information system, are fraught with difficulty. Using the megapixel calculator at toolstud.io I discovered that the image I was attempting to produce was 2 gigapixels. That turns out to be a higher resolution than 8K video which is the highest resolution television that is currently defined by the UHDTV standard. Much higher. So the PNG was clipped upon export so I only got part of my map.
Backing up a bit, I was exporting an image that, if printed, would have been 1200 dpi and 42 inches by 33 inches. That's 50,400 pixels wide and 39,600 pixels tall.
Most unfortunately, I only found out about this clipping issue partway through the very time intensive process of image exporting. My insistence on this huge image size was definitely a t fault and ended up causing all sorts of issues, but with digital files you can always make it uglier but you can never make it prettier.
That is to say that decreasing the quality by shrinking an image or sound file down or compressing the data is always possible, but the results of trying to go the other way are quite limited. Image software will usually make fairly good guesses at how to interpret the now much larger pixels and how they should blend when you blow the image up to huge sizes or zoom in on a particular area, but the results will still be a blurry mess.
Have you seen this man?
Despite what Hollywood likes to indicate, you simply cannot extract image data that does not exist from a pixelated security camera view of an indistinct figure in a dark room. If it really worked, wouldn't the police stop posting grainy images of bank robbers that could be almost anyone?
From Failure to Failure
Or, as legendary huckster Thomas Edison would say, I learned several ways how not to do this. Since PNG would not work and PDF proved to be annoying (I could not get rid of the white background and did not care to figure it out), I decided to export into SVG next as I already knew of tools that exist for that purpose (Inkscape) and that GIMP, my image processing software of choice, could import them as paths. And all of that totally worked too!
Right up until I got to the part where I turn those paths into a raster image. Things, uh... slowed down a bit.
This would not necessarily have been the end of the world even though GIMP had pegged one thread at 100% and looked like it might be doing that for a while. I have eleven other threads. I could do, you know, other stuff. Right?
GIMP grabbed my keyboard, evidently, and would not release it. Rather, because it was so overloaded with mathematical Bézier data that it could not proceed and so my keyboard was evidently still there? I could use my whole system, but with the mouse only. Fortunately some system hotkeys still functioned and I was able to reach a TTY to kill GIMP.
No matter how many other resource hungry programs I killed off, I wasn't running out of memory at this point, I was running out of processor and GIMP is essentially a single thread process still. At the point of figuring the math it was choking.
This is why:
This is a close up of the level of detail that is being rendered as a vector image.
It is a tiny, tiny part of this.
When selected, all of the points look like this.
So, yeah... math.
And so, having re-re-failed to defeat the monster, exit our hero stage redux. It is at this point I considered checking the box that had to do with simplifying the vector export.