locationtech / locationtech/geomesa

DWithin filter does not work across the antimeridian

Open
#10,494 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.5k
Forks
446
Avg merge
1d 8h
Merged PRs (30d)
31

Description

DWithin filter does not work across the antimeridian

Test case:
val sft = SimpleFeatureTypes.createType("test", "geom:Point:srid=4326") val feature = ScalaSimpleFeature.create(sft, "1", "POINT (178 0)") val ecql = "dwithin('POINT (-179 0)', geom, 2500, kilometers)" val fast = FastFilterFactory.toFilter(sft, ecql) println(fast.evaluate(feature))
Excepted output is true as the feature distance is ~333 km (false.


Original JIRA Issue: https://geomesa.atlassian.net/browse/GEOMESA-3308

Key: GEOMESA-3308
Type: Bug
Priority: Major
Status: In Review
Resolution: Unresolved
Assignee: Adeet Patel
Reporter: Jacob Wood
Created: Wed, 1 Nov 2023 15:13:24 -0400
Updated: Wed, 17 Jan 2024 16:38:06 -0500
Affects Version(s): 4.0.4


Comments:

557058:da7f6dfa-f0a1-468b-aec5-2cb61273feb5 (Thu, 2 Nov 2023 11:38:20 -0400):

Thanks for filing this! The issue seems tricky - none of the distance ops seem to account for the CRS, they are purely geometric ops (not geographic ones). I’m not sure of the best solution here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the DWithin test case using FastFilterFactory and the antimeridian coordinates shown in the issue. Inspect the distance operations and CRS handling noted in the discussion, then verify that evaluating the example feature returns true and that related distance behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.