4 ms·
Yeah the software ergonomics is the challenging part. It's all tradeoffs. In the case of geopandas, would you rather: a) have the software (silently) transform
by perrygeo 6y ago
Yeah the software ergonomics is the challenging part. It's all tradeoffs. In the case of geopandas, would you rather:
a) have the software (silently) transform your data, making decisions on your behalf about which are the source and destination projections, datum transforms, raster resampling, line densification, and precision.
PRO: easy, CON: potential poor performance, accuracy.
b) fail because the coordinate references systems don't match.
PRO: logical, type-safe, CON: Comparing coordinate systems is not a solved problem. You can have two identical (or practically identical) systems that are not equal by their representation or your programming language semantics.
c) try to naively attempt the spatial analysis in 2D cartesian space.
PRO: does what it says, leaves the responsibility to the programmer. CON: does what it says, leaves the responsibility to the programmer.
I've seen justification for all three approaches but no obvious solution. I tend to go with c) ala geopandas since ultimately the responsibility lies with the person building the system.
- j-pb 6y agoI think Erlangs approach is valuable: fail early and loud. There is no harm done by b), there will never be a costly mistake. If the programmer has to deal with it anyways, at least make them very aware of the fact, they can then still decide to perform c).
- framecowbird 6y agoDefinitely this. When software silently thinks it knows what I wanted and silently does the wrong thing, sometimes you find out a long time later, and it ends up being very expensive, particularly when it’s to do with data analysis. I would always prefer an error. I think this is a huge weakness of Pandas. I have to put “errors=raise” all over the place, although not many functions have that parameter.