Skip to content

Support Geography datatype and spatial index #1347

Open
@ttilberg

Description

@ttilberg

There is a datatype called geography that is a binary representation of spatial data. I found that when I tried leveraging this in Rails, it was mapped to string in the schema dump. This will cause inconsistency with schema loading in tasks like db:prepare.

Additionally, Spatial Indexes allow performance querying against the geography datatype by organizing the information into quadrants. They are handled separately from traditional data indexes.

We can create them using the type: option with

add_index :zip_codes, :geography_point, type: :spatial

But they do not get listed in the schema dump, and they cannot be found for reversal without specifying by name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions