Skip to content

Add support for Point, LineString, and Polygon geospatial types#2283

Merged
einari merged 5 commits into
mainfrom
chore/geospatial-types-support
Jun 9, 2026
Merged

Add support for Point, LineString, and Polygon geospatial types#2283
einari merged 5 commits into
mainfrom
chore/geospatial-types-support

Conversation

@einari

@einari einari commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace the deprecated Coordinate type with comprehensive support for Point, LineString, and Polygon geospatial types across MongoDB and Entity Framework Core. All types follow the GeoJSON standard for compatibility with MongoDB spatial queries and external GIS tools.

Added

  • Point, LineString, and Polygon MongoDB BSON serializers with GeoJSON format
  • Entity Framework Core support for all three geospatial types with cross-database compatibility
  • Comprehensive documentation for geospatial types in both MongoDB and Entity Framework
  • ProxyGenerator support for Point as a known type

Changed

  • Reorganized MongoDB documentation with dedicated geospatial folder
  • Grouped Entity Framework geospatial documentation under "Geospatial Types" section
  • Updated type metadata for geospatial type recognition

Fixed

  • Removed deprecated Coordinate type references throughout codebase
  • Fixed spec file structure for single-outcome tests (promoted from nested folders)
  • Ensured all geospatial serializers use correct APIs for Polygon constructor (Shell + Holes)

Breaking Changes

None — Coordinate type removal was of an experimental type with no stable API.

einari added 5 commits June 9, 2026 14:41
The Coordinate type has been superseded by Point, LineString, and Polygon
from Cratis.Geospatial. Remove all Coordinate-related serializers, specs,
and documentation to simplify the codebase.
Implement BSON serializers for geospatial types following GeoJSON format:
- PointSerializer: Single geographic coordinates
- LineStringSerializer: Routes and paths as ordered point sequences
- PolygonSerializer: Geographic areas with optional interior boundaries

All serializers support MongoDB's geospatial query operators via 2dsphere indexes.
Support Point, LineString, and Polygon in Entity Framework Core with:
- PointColumn, LineStringColumn, PolygonColumn extension methods for migrations
- AsPoint, AsLineString, AsPolygon extension methods for property configuration
- Cross-database compatibility (PostgreSQL jsonb, SQL Server/SQLite text)
- JSON serialization for all geospatial types
Create dedicated documentation structure for geospatial support:
- Entity Framework: Point, LineString, Polygon conversion guides
- MongoDB: Dedicated geospatial folder with Point, LineString, Polygon serializers
- Includes usage patterns, storage formats, querying examples, and best practices
- Organized navigation with clear cross-references
- Update ProxyGenerator TypeExtensions to recognize Point as known type
- Promote single-outcome spec files for Point (formerly nested in folders)
- Update package versions in Directory.Packages.props
- Update Arc package.json version
@einari einari added the patch label Jun 9, 2026
Comment on lines +86 to +88
catch (EndOfStreamException)
{
}
Comment on lines +103 to +105
catch (EndOfStreamException)
{
}
Comment on lines +126 to +128
catch (EndOfStreamException)
{
}
@einari einari merged commit 3c29b79 into main Jun 9, 2026
12 of 13 checks passed
@einari einari deleted the chore/geospatial-types-support branch June 9, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant