-
Notifications
You must be signed in to change notification settings - Fork 30
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
masked_area_interpolate errors #136
Comments
Thanks for reporting this. Can you provide a bit more info regarding your os and version of geopandas? |
Running on mac OSX (10.15.7m Catalina) |
tough to diagnose, but my first guess would be you have some topology errors in your source/target data (both of those errors come from shapely). try running source = source.buffer(0)
target = target.buffer(0) before using Another thing to try would be to see if you can follow this notebook using your data (though you can omit the OSM step if you want) which performs essentially the same task as |
You'll need source.geometry = source.buffer(0)
target.geometry = target.buffer(0) Buffer returns GeoSeries. |
sorry, yes thank you @martinfleis |
Tried
and I still get the same/similar errors. Will try the notebook thing when I get some time... |
I'm getting this same error doing a similar calculation. Specifically, I am trying to estimate population from census tracts using developed land rasterized by the geocube api. I also tried the NLCD data and received same error. |
@jtamerius Can you share the full traceback and a specification of your environment? |
can you share the full traceback so I can try and see where the root error is coming from? or possibly the source/target data you're using? That's a low-level error coming from geos and usually has to do with invalid geometries afaik, though i have no idea why it would occur only in masked_area_interpolate. As a workaround, you may be able to use the method described in this notebook instead |
@martinfleis lol beat me to the punch while i was pasting in the url and i didnt even notice |
@knaaptime : this looks like a great method for estimating population. Unfortunately, this link is not working for me: https://s3-us-west-2.amazonaws.com/mrlc/NLCD_2016_Impervious_L48_20190405.zip p.s. I'll get you all the traceback soon. |
hm, they may have updated the links but you should be able to pick an appropriate year from here and use that |
So, there is not much of a traceback:
I truncated list of coordinates because it goes on forever. I added teh target and source geometries to zip file attached. Here are packages I have installed: Name Version Build Channel |
Hi! Tobler is awesome! Thank you for all the work!
I am aggregating census count data from the census-tract level to the congressional district level. Using "area_interpolate" this works fine. Thanks!!
Now I'm trying to improve this using the NLCD data and "masked_area_interpolate". When I do that I get lots of errors of the form:
"CBR: result (after common-bits addition) is INVALID: Self-intersection at or near point..."
or
"CBR: result (after common-bits addition) is INVALID: Too few points in geometry component at or near point..."
each followed by many many numbers. I've tried projecting both source and target geometries to EPSG:3857 and EPSG:4326 and it happens either way.
It continues to run, despite the errors. So I have 2 questions:
Thanks!
The text was updated successfully, but these errors were encountered: