Skip to content

GEOMESA-3579 Add SpatialFillingCurves Java-interop functionality to geomesa#3580

Open
cwdobbins wants to merge 1 commit into
locationtech:mainfrom
cwdobbins:feature/java-sfc-interop
Open

GEOMESA-3579 Add SpatialFillingCurves Java-interop functionality to geomesa#3580
cwdobbins wants to merge 1 commit into
locationtech:mainfrom
cwdobbins:feature/java-sfc-interop

Conversation

@cwdobbins

Copy link
Copy Markdown
Contributor

Summary

Migrates geomesa-trino plugin's Scala SfcBridge to org.locationtech.geomesa.curve.interop.SpaceFillingCurves in geomesa-z3 — a Java-friendly facade over Z2SFC/XZ2SFC — mirroring a pre-existing GeoMesa code convention, centralizing SFC-related code in the geomesa-z3 core library, enabling re-use across modules, and removing SDK dependency from geomesa-trino-plugin, allowing it to be a pure-Java module.

Motivation

The SfcBridge scala class was built to support the development of the geomesa-trino-plugin, to present a Java-friendly facade over Z2SFC/XZ2SFC methods, whose signatures Java could not consume. Hosting the facade in geomesa-z3 makes it available to any JVM consumer and removes the one and only Scala source code from the Trino plugin module.

Changes

geomesa-z3

  • New org.locationtech.geomesa.curve.interop.SpaceFillingCurves: z2Index/z2Hex/z2HexRanges, xz2Index/xz2Hex/xz2HexRanges.
  • Nested HexRange(lower, upper) case class as the Java-nameable analogue of IndexRange; range methods return java.util.List<HexRange>.
  • Hex encoding delegates to the existing Z2SFC.hexEncode/XZ2SFC.hexEncode which produces left-shifted lexographically-comparable strings
  • SpaceFillingCurvesTest: assures index/hex parity with the underlying SFCs, clamping, range coverage of indexed values, and the maxRanges` bound.

geomesa-trino-plugin

  • SfcBridge.scala removed; call sites use the new facade and the typed HexRange
  • Module is now pure Java: src/main/scala removed, direct scala-library dependency dropped (still bundled transitively in the shaded jar), scala-maven-plugin configuration removed.

No behavioral changes.

Testing

mvn -pl geomesa-z3 -pl geomesa-trino/geomesa-trino-plugin -pl geomesa-trino/geomesa-trino-datastore clean install

…eomesa-z3 and leverage it in geomesa-trino-plugin
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.

1 participant