5 ms·
Yea, as someone who does this sort of thing for a living much of that was quite painful to read. I mean hats off to them for getting a nice result, but they cou
by dagw 8y ago
Yea, as someone who does this sort of thing for a living much of that was quite painful to read. I mean hats off to them for getting a nice result, but they could have done it so much more efficiently by using the right tools.
- reaperducer 8y agoWhile I don't disagree, this isn't something they do on a daily basis like you, so they're going in with blinders on. Unfortunately, mapping documentation is absolutely abysmal. 90% of what's available online is either eight years out of date, riddled with TODO:'s, or a mish-mash of incompatible versions. As someone who doesn't do this for a living, but has to build 70,000 maps on a weekly basis, I know it's a nightmare. Especially when you're going in for the first time. I think they did a pretty good job considering they have to be jacks of all trades.
- dagw 8y agoYea, I guess I was being a bit harsh. They delivered a nice looking result and at the end of day that's what counts. And honestly thinking back at the first several times I did something similar I can't really say I did a more efficient job.
- llao 8y agoMy OP was very negative, sorry. Absolutely! Solving what you are set out to do is a great result and I am super happy for them and their end result! But this state of documentation (as you call it, I would also/rather consider all the needed background knowledge and lingo to be a hurdle) is all the more reason to just document their goal, their data(s), their abilities and capabilities and ask an expert for 15 minutes of their time for input and pointers. That is so much more efficient!
- kaybe 8y agoI'd be interested in mapping solutions for python. What is your preferred workflow, HN?
- deleted 8y ago[deleted]
- llao 8y agoDepends on the kind of data. Check out cartopy, descartes, rasterio, geopandas.
- dagw 8y agoAnother general point is that once you're working with sufficiently large data sets you no longer have a GIS problem, but a Big Data/High Performance Computing problem and you need to start working with tools available in those domains together with the GIS tools. Like in the article. If you have a problem that takes 11 days to run in QGIS, then you shouldn't be using QGIS, but a tool that is designed for processing large amounts of data. 1-2 million points might be a lot from a GIS tools perspective, but is absolutely nothing from a big data/HPC perspective, so be sure to check what those guy are doing.
- kaybe 8y agoSo far I've been able to avoid that by only looking at chunks of the datasets. Can you give me some keyworks for what to look for/point me in the generally right direction? (I dread the day my supervisor wants to look at all the data at once.)
- dagw 8y agoFirst rule. PostGIS is your friend. The PostGIS people have done a lot of work with making processing large sets of GIS data fast and easy, so always start there. If for some reason that doesn't work... As a general rule always try to ask yourself, what am I actually trying to do, mathematically, and then ask how would someone go about solving that math problem, if you didn't tell them it was a GIS problem? Much of raster analysis, for example, is just a combination of matrix math and convolutions. So look up how the numerical analysis people do matrix math and convolution on huge matrices. In python, for example, you have tools like numexpr for fast elementwise transformation of matrices and via numpy/scipy you can call BLAS and LAPACK. If you're dealing with rasters that don't fit in memory take a look at solutions like Dask. Same principle applies when dealing with vector data. Many problems are 'just' graph theory, so find out which library that graph theory people use to solve that sort of problem on large graphs and use that instead. Or if a problem reduces to a line/polygon intersection problem, well that's just raycasting, and the games industry has spent a lot of effort in making that really really fast. Finally, learn to use the underlying libraries from the command line and scripts rather than via the GUI and how to divide that work across several processors/machines. GDAL + GNU parallel from the command line will transform 1000 rasters faster than QGIS could ever hope to do.