things I did NOT want to know about GIS
Mar. 17th, 2008 01:01 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I'm (re-)implementing/packaging up some first steps in my sometime-officemate's cool new spatial cluster detection algorithm. It's graph-theoretical, and we're using some open-source libraries for things like finding Voronoi diagrams of initial (control) points. It's cool stuff, but it's been bothering me a bit--I'm sure that library just calculates Euclidean distances, and we're working with location information. In fact, what we have available is geocoordinates.
I should have known that my mathematician officemate would NEVER just gloss over the distinction between distance on the plane and distances on the Earth's surface. I finally asked her about the input data. "Oh," she said, "I usually translate the geocoordinates into a state plane projection first." (And thank goodness for Google, because she didn't include any details. There are plenty of links out there, though.)
I never knew these things existed. Basically, they're a set of very local projections, 4 times as accurate as the Universal Transverse Mercator projection, applied at each state (or even sub-state) level. States that are wider east-west (MA, for example) use a Lambert Conformal Conic projection; ones that are more north-southish use a (tangent, not secant) Transverse Mercator projection, and the Alaska panhandle, which runs mostly diagonally, uses the Oblique Mercator projection. Oh, and in Michigan, "state plane zones are mapped using the rarely encountered 'Michigan spheroid'". The whole thing is really remarkably ugly. (And frankly I worry a bit about her choice in using this, since it scales badly to crossing region boundaries.)
Luckily, I guess, there are some free downloads (PC executables) out there, mostly provided by the government. Unluckily, the two I've met so far are in Fortran. YUCK. I see one web form for doing the transformation, but a) I don't know if I can use it programatically, and b) it's irrelevant because I can't send data there. (For the same reasons, we can't use geocoding web services, which really sucks for us, but that's another rant.)
Off to ask Google if there's any more user- (or at least lehser-) friendly free downloadable code out there for getting state plane projection coordinates out of geocoordinates. Or maybe just decide to use some other, more globally-suitable projection. Or assume that the difference between planar & actual distances won't be too bad at relatively small scales and ignore the whole thing. Though I have to be encouraged by this quote from the link above, on an engineer who wanted to do just that: "(I've always had the impression that this engineer was either lousy with math or just plane lazy, but I'm probably being unfair)."
I should have known that my mathematician officemate would NEVER just gloss over the distinction between distance on the plane and distances on the Earth's surface. I finally asked her about the input data. "Oh," she said, "I usually translate the geocoordinates into a state plane projection first." (And thank goodness for Google, because she didn't include any details. There are plenty of links out there, though.)
I never knew these things existed. Basically, they're a set of very local projections, 4 times as accurate as the Universal Transverse Mercator projection, applied at each state (or even sub-state) level. States that are wider east-west (MA, for example) use a Lambert Conformal Conic projection; ones that are more north-southish use a (tangent, not secant) Transverse Mercator projection, and the Alaska panhandle, which runs mostly diagonally, uses the Oblique Mercator projection. Oh, and in Michigan, "state plane zones are mapped using the rarely encountered 'Michigan spheroid'". The whole thing is really remarkably ugly. (And frankly I worry a bit about her choice in using this, since it scales badly to crossing region boundaries.)
Luckily, I guess, there are some free downloads (PC executables) out there, mostly provided by the government. Unluckily, the two I've met so far are in Fortran. YUCK. I see one web form for doing the transformation, but a) I don't know if I can use it programatically, and b) it's irrelevant because I can't send data there. (For the same reasons, we can't use geocoding web services, which really sucks for us, but that's another rant.)
Off to ask Google if there's any more user- (or at least lehser-) friendly free downloadable code out there for getting state plane projection coordinates out of geocoordinates. Or maybe just decide to use some other, more globally-suitable projection. Or assume that the difference between planar & actual distances won't be too bad at relatively small scales and ignore the whole thing. Though I have to be encouraged by this quote from the link above, on an engineer who wanted to do just that: "(I've always had the impression that this engineer was either lousy with math or just plane lazy, but I'm probably being unfair)."