Skip to content

Expose GeoDataFrame geometry dependencies to consumers - #2005

Open
zaleslaw with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-geodataframe-missing-dependency-class
Open

Expose GeoDataFrame geometry dependencies to consumers#2005
zaleslaw with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-geodataframe-missing-dependency-class

Conversation

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown

dataframe-geo exposed JTS and GeoTools types in its public API while declaring their dependencies as implementation, causing [MISSING_DEPENDENCY_CLASS] errors for downstream Gradle projects.

  • Dependency visibility
    • Changed GeoTools modules, JAI, and JTS dependencies from implementation to api.
    • Consumers can now compile against public types such as org.locationtech.jts.geom.Geometry without manually adding transitive dependencies.
implementation("org.jetbrains.kotlinx:dataframe-geo:<version>")
// JTS and GeoTools dependencies are now provided transitively

Copilot AI changed the title [WIP] Fix GeoDataFrame missing dependency class access Expose GeoDataFrame geometry dependencies to consumers Jul 28, 2026
Copilot AI requested a review from zaleslaw July 28, 2026 11:00
@Jolanrensen
Jolanrensen marked this pull request as ready for review July 29, 2026 10:41
@Jolanrensen

Copy link
Copy Markdown
Collaborator

So, do we need all dependencies to be api()? or just a handful?

@zaleslaw

Copy link
Copy Markdown
Collaborator

@copilot answer to the latest question from @Jolanrensen

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Author

@copilot answer to the latest question from @Jolanrensen

Only a handful need api: dependencies whose types appear in dataframe-geo public signatures. In this module that is JTS core, GeoTools main (for ReferencedEnvelope/feature types), and GeoTools referencing (for CoordinateReferenceSystem). JAI, JTS IO common, and format-specific GeoTools modules are implementation details and do not need to be exposed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes downstream Gradle compilation failures caused by dataframe-geo exposing JTS/GeoTools types in its public API while keeping the corresponding dependencies non-transitive (implementation). By moving those dependencies to api, consumers can compile against public geometry/geospatial types (e.g., org.locationtech.jts.geom.Geometry) without manually adding extra dependencies.

Changes:

  • Switched GeoTools module dependencies from implementation to api.
  • Switched JAI and JTS dependencies from implementation to api to ensure transitive availability for consumers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zaleslaw

zaleslaw commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Ok @copilot, after your self-review on API vs. implementation, please make some new commits and move some dependencies back.

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Author

Ok @copilot, after your self-review on API vs. implementation, please make some new commits and move some dependencies back.

Done in 08e8eba. I moved the runtime-only dependencies back to implementation and kept only gt-main, gt-referencing, and jts-core as api.

@Jolanrensen

Copy link
Copy Markdown
Collaborator

I don't trust copilot on this. It made different dependencies api() then those @koperagen mentioned in the original issue #1920:

implementation("javax.media:jai-core:1.1.3")
implementation("org.locationtech.jts:jts-core:1.20.0")
implementation("org.locationtech.jts.io:jts-io-common:1.20.0")

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.

GeoDataFrame: [MISSING_DEPENDENCY_CLASS] Cannot access class 'org.locationtech.jts.geom.Geometry'.

4 participants