-
Notifications
You must be signed in to change notification settings - Fork 143
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
Arches throws error when updating geojson-feature-collection node when zero-length LineString or MultiLineString is present #11666
Comments
@tris-ots I'm no GeoJSON expert, but in your sample file (zero-length-issue.json) there are actually two zero-length LineStrings, both at the exact same location. (They have different Also, they both have Also: in the cases of those two LineStrings, that So I guess I have three semi-related questions:
I assume that the fact that there are two LineStrings whose location and shape are exactly the same is not, in itself, a problem, since obviously geographic features can overlap in real life. |
hi Karl - good questions, thanks. I'll also admit at this point that my hypothesis about what's causing the issue came from examining the Arches log in journalctl, and coming across these messages: GEOS_NOTICE: Too few points in geometry component at or near point 1.4804999999999999 51.895167000000001 0 This error message led me to an old stackexchange post which I'll admit I don't fully understand, but it suggests that the GEOS library used by PostGIS (and in turn used by Arches) doesn't like zero-length LineStrings. Here's the sample geojson that I imported into Arches (before it adds UUIDs or does any other editing) :
|
I’m noting that there is one other interesting case here: these linestrings are 3-dimensional (note the third value in coordinate pairs), though the elevation value appears unused (0). I don’t think that Arches supports 3d geometries at the moment, so this may alone be the issue. i would need to consider how best to proceed on that question (support 3d geometries? aggressively convert to 2d?), but converting to 2d geometries may provide a workaround in the short term if you don’t truly need 3-dimensional geometries. |
Good spot, Rob. Just to reduce the number of variables, i deleted the third coordinate in the linestring feature and tried to update the geojson-feature-collection node. Same error - |
In our work with Arches, we sometimes receive geojson files from clients which include zero-length LineString or MultiLineString features. QGIS and geojson.io handle this type of feature gracefully, but Arches returns an error ("Unable to serialize some geometry features") and refuses to save the geojson data. This is surprising and opaque to users who have experience with standard GIS software.
So far I have only encountered this issue while using Arches 7.6.0, and haven't tried reproducing it in any other versions.
The error message is this:
Attached is a sample geojson which produces the error, and screenshots of the file being loaded successfully (as a polygon layer and a line layer) in QGIS and in geojson.io, as well as a screenshot of the error shown by Arches.
Steps to reproduce:
Update Features
button.Add
button.Expected behavior:
Arches stores the geojson data on the node successfully.
Observed behavior:
Arches throws an error and the data is not saved on the node.
JSON file for reproducing error on Arches: (file contains both a valid polygon and a zero-length LineString) zero-length-issue.json
The text was updated successfully, but these errors were encountered: