Hi Ari, I checked out the repo and tried this from a Python prompt:
>>> import fiona >>> from shapely.geometry import shape >>> with fiona.drivers(): ... with fiona.open('poly_test/polygon.shp') as src: ... for f in src: ... print shape(f['geometry']).area ... 660.036866573 635.789329099 That's what you expect, right? Fiona and Shapely are doing the right thing, so I think there could be misplaced coordinates in your triangles. Thanks for providing a link to the repo, it makes debugging a lot easier! On Tue, Feb 25, 2014 at 2:54 AM, Ari Simmons <ari.ucb.f...@gmail.com> wrote: > > ..data is in Pseudo Mercator...unit meters...in Georgia/Florida > whereabouts...and still under 700 sq meters... > > On Tue, Feb 25, 2014 at 1:46 AM, Ari Simmons <ari.ucb.f...@gmail.com>wrote: > >> Hello (again)... >> >> I am attempting to re-create yet another Visvilingam simplify algorithm >> using Shapely/Fiona (...this is mostly an effort to experiment with >> Fiona/Shapely). >> >> I have some test data (trivial in size -- polygons under 700 sq meters), >> but in calculating the triangles (which all should be less then 700 sq. >> meters)...I am pulling out areas in the millions. >> >> I've exhaustively run through the way I am picking up points (and >> calculating area)...so to try this a different way...could this all have >> something to do with the Fiona reading/writing...? A projection issue >> perhaps...? From what I can tell the file reads and outputs fine -- I am >> just getting really large areas out of my 'not that big' polygons. >> >> Anybody ever had something like this come up? Or have a tip... >> >> P.S> I didn't really think posting my code is going to be that helpful, >> but here is a link to my Git[2] if nothing I said above computes...since >> the test data was small I added it in too... >> >> >> [1]: https://pypi.python.org/pypi/Fiona . I modeled most the read/write >> code based on what I found on the site ...but in my noobness might be >> totally not getting it... >> [2]: https://github.com/ARSimmons/Shapely_Fiona_Visvalingam_Simplify >> my git, with code and the trivial size polygons if you want to see what I >> mean... >> > > > _______________________________________________ > Community mailing list > Community@lists.gispython.org > http://lists.gispython.org/mailman/listinfo/community > > -- Sean Gillies
_______________________________________________ Community mailing list Community@lists.gispython.org http://lists.gispython.org/mailman/listinfo/community