Open alemosie opened 7 years ago
What I got in Heroku was an application break, and then later when I tried locally with our changes, I got "no data received" and nothing was sent. But the files did upload. They just didn't get transmitted. I'm also going to share the two posts I sent you here to keep things in one place:
http://flask.pocoo.org/docs/0.12/patterns/fileuploads/#uploading-files (Uploading Files: A General Introduction)
http://flask.pocoo.org/docs/0.12/security/#xss (Security Considerations: Cross Site Scripting XSS)
I'm definitely going to try and help out.
When I ran the nycha.json
file from our sample data through, this is what the crs conversion looked like:
Unfortunately, at this stage, the geojson crs conversion was still producing infs.
Taking a look at the differences between raw sample json vs the NYCHA.geojson
that Sonya provided (represented as raw_places
below), I noticed that there is a huge discrepancy in the significant digits of the values. One has precise floats, the other ints. Example:
Also of note -- the sample json geometry objects are polygons, whereas the geojson objects are multipolygons.
I remember seeing inf
s when we didn't have the EPSG set properly in the code/files...any chance that's the issue here? In other words, perhaps the files you're trying are from a different geographic region? /cc #13
Two places to see this in action:
Snapshot of breakpoint in app:
In
geometry \"inf\" debugging.ipynb
on thedebug-inf
branch. Explore both raw and processed data. The.to_crs(fiona.crs.from_epsg(2263))
is the root of the polygon value conversions.This occurs in both
master
andmore-headings
(#9 pr) branches.EDIT
Not sure if the infs are invalid, or merely the representation for real numbers. Either way, when I try to extract a single, transformed polygon through the Jupyter notebook, it kills my kernel.
Unrelated, but potentially relevant: https://github.com/WikiWatershed/rapid-watershed-delineation/issues/27.
Not sure if that applies to us. Maybe someone that worked with the geopandas library will have insight?