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

empty_geometry test case not completely clear #589

Open
rouault opened this issue Apr 4, 2021 · 1 comment
Open

empty_geometry test case not completely clear #589

rouault opened this issue Apr 4, 2021 · 1 comment

Comments

@rouault
Copy link
Contributor

rouault commented Apr 4, 2021

This test case which refers to req 152 mentions:
"i. Fail if gc.flags.Y == 1 and gc.flags.E != 0
ii. Fail if the geometry is empty but the envelope is not empty (gc.flags.E != 0 and envelope values are not NaN)
"
I'm ok with i. but ii. is not super clear to me. I guess it should be rewritten as "ii. Fail if the geometry is empty and gc.flags.Y != 1" (and given point i. this also implies we check that gc.flags.E == 0). Unless we really want to allow empty geometries, with an envelope whose minx, miny, maxx, maxy values are NaN, but that would contradict req 152 which mentions "The envelope contents indicator code SHALL be 0 indicating no envelope."

Point i. could actually be extended as "i. Fail if gc.flags.Y == 1 and (gc.flags.E != 0 or the geometry is not empty)"

And for completness, to reflect point ii of the case, req 152 should probably be completed with "When the empty geometry flag is set, the WKBGeometry in a GeoPackageBinary SHALL be empty" (the current phrasing of the requirement only sets requirements when the WKBGeometry is empty)"

@jyutzler
Copy link
Contributor

jyutzler commented Apr 4, 2021

@rouault This gets really technical and it complicated by the stipulation that empty point geometries are encoded as quiet NaN values while other empty geometries are just null. With this in mind, I think you are just being confused with the and envelope valus are not NaN. I think that phrasing is wrong and I am okay with eliminating it. I believe the rest of your suggestions are wrong because of the screwy point stipulation.

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

2 participants