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

Fix SQL queries with spatial disjoint filter #227

Merged
merged 3 commits into from
Nov 17, 2021

Conversation

clausnagel
Copy link
Member

No description provided.

Copy link
Member

@yaozhihang yaozhihang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clausnagel thanks for the fix. Only one remark, see my comment.

validateRing(points, dimension);
}

result[i++] = convertPrimitive(points, dimension);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be here result[i] instead of result[i++]? otherwise, we'll get NPE in case of the following XML query:

<query xmlns="http://www.3dcitydb.org/importer-exporter/config">
  <typeNames>
    <typeName xmlns:bldg="http://www.opengis.net/citygml/building/2.0">bldg:Building</typeName>
  </typeNames>
  <filter>
    <disjoint>
      <valueReference>bldg:boundedBy/bldg:GroundSurface/bldg:lod2MultiSurface</valueReference>
				<polygon>
				  <exterior>35 10 45 45 15 40 10 20 35 10</exterior>
				  <interior>20 30 35 35 30 20 20 30</interior>
				</polygon>
    </disjoint>
  </filter>
</query>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, @yaozhihang, thanks 👍 fixed with cf84619

@clausnagel clausnagel merged commit ccad47d into release-5.0 Nov 17, 2021
@clausnagel clausnagel deleted the hotfix-spatial-queries branch November 17, 2021 14:36
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

Successfully merging this pull request may close these issues.

2 participants