Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does AWS Redshift supports postgis extensions?

I know AWS RDS-postgresql supports postgis extension. Does AWS Redshift support postgis extension?

like image 422
Sunny Sunny Avatar asked Jan 17 '14 04:01

Sunny Sunny


2 Answers

As per this answer was written (June 2016), AWS Redshift itself still does not support PostGIS extensions.

The official documentation have not much changed. In an AWS blog post, it said implicitly:

You can use the dblink extension to connect to Amazon Redshift and leverage PostgreSQL functionality. .... There are likely many other uses for the dblink extension with Amazon Redshift, such as PostGIS or LDAP support in PostgreSQL (Amazon EC2 only), ....

From the above AWS blog post, we can combine Amazon Redshift and RDS/self-hosted PostgreSQL database to make a PostGIS queries by using dblink.

If your data is in latitude-longitude pairs (EPSG-4326/WGS84) format, you can convert your data to single-dimension data using GeoHash or S2 Geometry Library hash. Personally, I prefer S2 Geometry Library because it has more precision levels and functionalities. After that, you can make some query over that hash column. And of course, you can combine the result to PostGIS database.

like image 113
Edward Samuel Avatar answered Oct 29 '22 15:10

Edward Samuel


According to AWS docs,

Amazon Redshift is based on PostgreSQL 8.0.2. Amazon Redshift and PostgreSQL have a number of very important differences that you must be aware of as you design and develop your data warehouse applications. (http://docs.aws.amazon.com/redshift/latest/dg/c_redshift-and-postgres-sql.html)

It is not supporting the basic types that PostGIS depends upon (https://forums.aws.amazon.com/message.jspa?messageID=425664#)

Therefore, the answer is no.

like image 32
nonbar Avatar answered Oct 29 '22 14:10

nonbar