Skip to content

GeoInterface improvements#264

Merged
asinghvi17 merged 4 commits into
masterfrom
as/geointerface
Jun 10, 2026
Merged

GeoInterface improvements#264
asinghvi17 merged 4 commits into
masterfrom
as/geointerface

Conversation

@asinghvi17

@asinghvi17 asinghvi17 commented Jul 26, 2025

Copy link
Copy Markdown
Member

Summary

  • Adds GeoInterface.convert for LineTraitGeometryBasics.Line (2D and 3D)
  • Extends GeoInterface.convert for LineString to also accept LinearRingTrait, so converting any Polygon (which has LinearRing exterior/holes) works correctly
  • Adds geointerface_geomtype(::LinearRingTrait) = LineString
  • Adds tests covering all new code paths (2D and 3D Line conversion, 2D and 3D LinearRingLineString conversion)

@asinghvi17

Copy link
Copy Markdown
Member Author

We need to add GI.testgeometry on sample geoms of all dimensions. That should also bump up coverage generally.

geointerface_geomtype(::GeoInterface.MultiPointTrait) = MultiPoint
geointerface_geomtype(::GeoInterface.LineTrait) = Line
geointerface_geomtype(::GeoInterface.LineStringTrait) = LineString
geointerface_geomtype(::GeoInterface.LinearRingTrait) = LineString

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Lol I just ran into this again, we should get this in!

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.

I feel like I have also fixed this multiple times locally 😭

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.

Get the codecov bot onto it? I'm not a member here

@asinghvi17 asinghvi17 changed the title [WIP] GeoInterface improvements GeoInterface improvements Oct 3, 2025
asinghvi17 and others added 2 commits June 9, 2026 11:56
Tests the new GeoInterface.convert for LineTrait → Line (2D and 3D)
and LinearRingTrait → LineString (2D and 3D) to improve codecov.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ffreyer

ffreyer commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

This only affects GeoInterface so I don't think this needs review from the GeometryBasics side?

@asinghvi17 asinghvi17 merged commit 7a9d261 into master Jun 10, 2026
14 checks passed
@asinghvi17 asinghvi17 deleted the as/geointerface branch June 10, 2026 14:32
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.

3 participants