question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for PostGIS geography types is missing

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
shahidhkcommented, Mar 25, 2019

@asindl Yes, this is going out in next release.

0reactions
asindlcommented, Mar 25, 2019

Any news here? This is a very interesting feature to have…

Read more comments on GitHub >

github_iconTop Results From Across the Web

missing Types for postgis after created new schema in ...
I am using Spring to connect to the pgsql, for example, I am connecting to schema s1 and the extension is installed on...
Read more >
PostGIS Geometry folder is missing
You will want a table that has a geometry column though. Actually, geometry is the data type, and the column that is of...
Read more >
#472 (Missing ST_IsValid for Geography Types) – PostGIS
There is no ST_IsValid for geography types. I do not think casting a geography as a geometry and then running it through ST_IsValid...
Read more >
Chapter 2. PostGIS Installation
Once PostGIS is installed, it needs to be enabled (Section 3.3, “Creating spatial databases”) or upgraded (Section 3.4, “Upgrading spatial databases”) in each ......
Read more >
Working with geospatial data | BigQuery
In BigQuery, the GEOGRAPHY data type represents a geometry value or ... WKB can be hex encoded for formats that don't support binary...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found