Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geojson polygons are losing specificity, recording values as "inf" #11

Open
alemosie opened this issue Feb 13, 2017 · 4 comments
Open
Assignees

Comments

@alemosie
Copy link
Contributor

alemosie commented Feb 13, 2017

Two places to see this in action:

Snapshot of breakpoint in app:
screen shot 2017-02-12 at 7 57 49 pm

In geometry \"inf\" debugging.ipynb on the debug-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 and more-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: WikiWatershed/rapid-watershed-delineation#27.

  • "Just checked and inf is the actual value, it's just not encoding the string properly."
  • "Inf is also a phrase (D-Infinity) for flow direction, and though it was a string of the method used, but doing an ogrinfo -al on the shapefile shows that it's a Real number."

Not sure if that applies to us. Maybe someone that worked with the geopandas library will have insight?

@interglobalmedia
Copy link
Contributor

interglobalmedia commented Feb 13, 2017

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.

@alemosie
Copy link
Contributor Author

alemosie commented Feb 19, 2017

When I ran the nycha.json file from our sample data through, this is what the crs conversion looked like:

screen shot 2017-02-19 at 9 41 01 am

Unfortunately, at this stage, the geojson crs conversion was still producing infs.

@alemosie
Copy link
Contributor Author

alemosie commented Feb 19, 2017

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:

screen shot 2017-02-19 at 9 59 58 am

Also of note -- the sample json geometry objects are polygons, whereas the geojson objects are multipolygons.

@afeld
Copy link
Contributor

afeld commented Mar 26, 2017

I remember seeing infs 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants