Skip to content

docs: Add PostGIS geography fields documentation#502

Open
charlesarchibong wants to merge 2 commits into
serverpod:mainfrom
charlesarchibong:main
Open

docs: Add PostGIS geography fields documentation#502
charlesarchibong wants to merge 2 commits into
serverpod:mainfrom
charlesarchibong:main

Conversation

@charlesarchibong

Copy link
Copy Markdown

Summary

  • Add a new Geography fields page documenting the four supported types: GeographyPoint, GeographyLineString, GeographyPolygon, and GeographyGeometryCollection, with YAML model examples for each.
  • Add a Geography operators section to the filter docs covering intersects, dwithin, distance, contains, and within, with Dart code examples.
  • Add a Geography indexes section to the indexing docs explaining GIST index setup for geography columns.
  • Update the supported types list in the models overview to include all four geography types.
  • Add a new Upgrading to PostGIS support guide covering Docker-based environments (including a combined pgvector + PostGIS Dockerfile), managed PostgreSQL services, and troubleshooting tips.

Test plan

  • Verify all new pages render correctly in Docusaurus with no broken links.
  • Confirm cross-links between geography fields, indexing, filter, and upgrade guide pages resolve correctly.
  • Check that the new upgrade guide appears in the correct position under the Upgrading section (09-upgrading).

Add documentation for geography field types (GeographyPoint, GeographyLineString, GeographyPolygon, GeographyGeometryCollection), spatial filter operators (intersects, dwithin, distance, contains, within), GIST index support, and a guide for upgrading existing projects to use PostGIS.
Rename 04-upgrade-to-postgis.md to 05-upgrade-to-postgis.md to avoid
a collision with the existing 04-archive/ directory in the upgrading section.

@Swiftaxe Swiftaxe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @charlesarchibong, for this great contribution!

Sorry for the wait.

This seems accurate and is well-written. Just a couple of nit comments added.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The upgrading folder was moved. Consider this when rebasing.


## GeographyGeometryCollection

The `GeographyGeometryCollection` type stores a collection of mixed geography types — points, lines, and polygons — as a single field.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: we are avoiding em dashes.

Suggested change
The `GeographyGeometryCollection` type stores a collection of mixed geography types points, lines, and polygons as a single field.
The `GeographyGeometryCollection` type stores a collection of mixed geography types (points, lines, and polygons) as a single field.

@@ -0,0 +1,62 @@
# Geography fields

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As a new convention, we are adding frontmatter descriptions to new pages for SEO.

Suggested change
# Geography fields
---
description: Store geospatial data in Serverpod models using GeographyPoint, GeographyLineString, GeographyPolygon, and GeographyGeometryCollection backed by PostGIS.
---
# Geography fields

@@ -0,0 +1,116 @@
# Upgrading to PostGIS support

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# Upgrading to PostGIS support
---
description: Add PostGIS to a Serverpod project to enable geography fields, with steps for Docker, managed PostgreSQL services, and pgvector.
---
# Upgrading to PostGIS support

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.

2 participants