-
Notifications
You must be signed in to change notification settings - Fork 6
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
Invalid GeoJSON #27
Comments
In the shapefile (as viewed through QGIS), what is the actual value for |
Just checked and |
According to the details on the ogr GeoJSON spec, it should encode strings correctly:
It also says we can turn off attribute generation at all by using an environment variable:
However, we need the attributes for the input point shapefile, thought not the watershed. Too bad this feature is not part of the command input, which would let us move past this for now. |
Sorry, just clicked what the slack chatter was about regarding
|
Here's the output from my test shapefile:
|
A new upstream commit to the rwd python file should prevent |
There are certain conditions where the RWD job completes successfully, but does not yield a valid watershed. Without this alert, there is no indication that the job completed or not. The reason this is a plain alert box instead of something nicer, is because we intend to address the cause behind the null watersheds soon. Ref: WikiWatershed/rapid-watershed-delineation#27 Fixes WikiWatershed#1166
Great! I'll add it now. |
Just note that that commit was added to upstream |
Fixed by #28 |
I encountered this issue again today. If the result contains "Infinity" then JSON.parse raises a SyntaxError exception. Here's an example where
|
This is a problem in RWD that occurs due to an untrapped divide by 0 when clicking on a grid cell that is the upstream end of a stream (or on a point that snaps down to that point). The most recent pull request will not generate this as this part of the code is deactivated (commented out) as it does not report this attribute. If we decide we want to bring these watershed attributes back then this will need to be corrected. The longer hydrologic explanation (which you may not want to hear) is that at the upstream point on a stream the length of streams upstream is zero, and drainage density is 0 so overland flow length which is calculated as 1/(2 * drainage density) is infinity. Under these conditions this formula becomes a poor estimate of average overland flow length. I would recommend changing this to actual average overland flow length which can be computed from the DEM if we bring this back, but this will require additional preprocessing of the data. As a heads up this may be a problem in DRB implementation too (though if it is not causing trouble you have likely trapped for it already). |
Some points result in a shapefile that yields invalid JSON when converted by
ogr2ogr
.For the following request:
The result GeoJSON:
Part of the result is invalid JSON (
"AvgOLF": inf
). Because of this, a valid JSON object cannot be decoded.The following command can be executed against shapefiles generated by RWD to reproduce this issue:
The text was updated successfully, but these errors were encountered: