The ESRI July 1998 technical documentation for polygon shapefiles at page 10 makes no mention of either area measures or length measures (apart from byte/record-layout matters). Yet OGR enables me to extract the area for each polygon in a shapefile, and (after converting from square feet to square meters) it agrees to four decimals with what the Tatuk Editor reports for the same polygons, even though the shapefile dbf contains no such info; it must have come strictly from the shp, not the dbf. The Tatuk Editor also reports the length, presumably the perimeter. The quick processing time for both OGR in Python and the TE, for a file of about a quarter million polygon records makes me think the reported numbers are being retrieved, not calculated on the fly, perhaps from the bounding box. It's hard to believe they really pertain to the polygons. Can someone enlighten me about where the data are coming from and what is being measured? I'm puzzled about the polygon length (which I don't know how to retrieve via OGR/Python geometry functions), as well as the area measure, but I'd be happy to get just one question answered for now.

  • 2
    Calculating area by the trapezoid rule is actually quite simple, and likely takes much less time than the I/O time to read the vertices. Coverages needed to store area because calculating it was quite involved, but with the "whole shape" vertex array, it wasn't necessary. – Vince Nov 6 '14 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.