In the past few months, I've been learning graphical information systems (GIS). This is a challenge; I've never done GIS before.
The latest learning task is figuring out how to convert highway mileposts to latitude and longitude. Why do I need this? Highways generally don't have street addresses. For example, almost all TxDPS tickets reference a milepost on a highway, such as milepost 283 on I-20.
That introduces another problem: there's no existing dataset that maps mile markers to latitude and longitude. So I have to create it myself.
Back to GIS, I have a GIS ShapeFile file from TxDOT. It has precise coordinates for all highways, and it also has the highway's length.
I've converted this ShapeFile to a PostGIS-enabled PostGres database. Now I get to use PostGIS's linear referencing functions to trace these routes and discover their mile markers.
But even that creates interesting challenges. In the ShapeFile, each highway's distance is measured in degrees. As in degrees of latitude. (Not longitude--each degree of longitude is a different distance apart depending on distance from the equator.)
So I have to convert degrees of latitude to miles. Not too hard--take the earth's circumference in miles and divide by 360.
NASA says the equatorial circumference is 24,901.55 (source). (Can I use that as a serious source when I write my praxis? Ha!) That divided by 360, the number of degrees of latitude, means a degree of latitude is 69.17 miles.
Yay, now I can find mile markers!
Comments
Post new comment