Passing along as an FYI. Poking through the code for the Bonfire application (ActivityPub) this morning, it appears that these type definitions are what they are using to define a “place”. It is unclear to me if there are non-Exilir definitions for these data structures somewhere else in the code base.
The code appears to use Foursquare data for venues and OSM for geocoding. It is unclear to me whether it does a further “blended” search across both datasets at runtime. Likewise the docs say that the application can do reverse-geocoding and there are hooks for indexing and querying non-venue data but I don’t see where that data is coming from. This may simply be because I am new to Elixir.
"""
A physical mappable location.
"""
type SpatialThing {
id: ID!
"An informal or formal textual identifier for a location. Does not imply uniqueness."
name: String!
"An address that will be recognized as mappable by mapping software."
mappableAddress: String
"Latitude."
lat: Float
"Longitude."
long: Float
"Altitude."
alt: Float
"A textual description or comment."
note: String
geom: Json
##############################################################################
# inverse relationships and queries - FIXME
# agents: [Agent!]
# economicResources: [EconomicResource!]
# economicEvents: [EconomicEvent!]
# commitments: [Commitment!]
# intents: [Intent!]
## Bonfire-specific
canonicalUrl: String
displayUsername: String
inScopeOf: AnyContext
}
pointable_schema do
field(:name, :string)
field(:geom, Geo.PostGIS.Geometry)
# field(:geom, :map, virtual: true)
# altitude
field(:alt, :float)
field(:mappable_address, :string)
field(:note, :string)
field(:lat, :float, virtual: true)
field(:long, :float, virtual: true)
field(:is_public, :boolean, virtual: true)
field(:published_at, :utc_datetime_usec)
field(:is_disabled, :boolean, virtual: true, default: false)
field(:disabled_at, :utc_datetime_usec)
field(:deleted_at, :utc_datetime_usec)
# FIXME, implement Bonfire Character
# field(:character, :any, virtual: true)
# has_one(:character, CommonsPub.Characters.Character, references: :id, foreign_key: :id)
belongs_to(:creator, @user)
belongs_to(:context, Pointer)
# because it's keyed by pointer
field(:follower_count, :any, virtual: true)
timestamps(inserted_at: false)
end