这是indexloc提供的服务,不要输入任何密码
Skip to content

Support for PostGIS geography types is missing #1674

@ekamil

Description

@ekamil

There are two type groups (?) in PostGIS - geometry and geography. Geometry is supported by Hasura and even documented.
Support for geography is missing.
Example working query:

query queryPointsOK($point: geometry) {
  points(where: {point_geom: {_st_d_within: {distance: 3, from: $point}}}) {
    id
  }
}

Variables:

{
  "point": {
    "type": "Point",
    "coordinates": [ 1, 50 ],
    "crs": {
  		"type": "name",
      "properties": {
        "name": "urn:ogc:def:crs:EPSG::4326"
      }
		}
  }
}

BTW: this variable definition is marked as invalid in the console with message: "Expected value of type "geometry""

Not working versions:

query queryPointsNOK($point: geography) {
  points(where: {point_geog: {_st_d_within: {distance: 3, from: $point}}}) {
    id
  }
}

Notice changed type to geography and a different column.
(The same variable definition was used)
I attach minimal compose allowing to reproduce. The only thing to do after docker-compose up is making Hasura watch the table public.points.
hasura.zip

Metadata

Metadata

Assignees

Labels

c/consoleRelated to consolec/serverRelated to servere/quickfixcan be wrapped up in few hoursk/enhancementNew feature or improve an existing featurep/mediumnon-urgent issues/features that are candidates for being included in one of the upcoming sprintss/wipStatus: This issue is a work in progress

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions