{"id":15331,"date":"2020-03-17T08:15:06","date_gmt":"2020-03-17T08:15:06","guid":{"rendered":"https:\/\/dbtut.com\/?p=15331"},"modified":"2020-03-17T08:17:36","modified_gmt":"2020-03-17T08:17:36","slug":"how-to-install-postgis-in-postgresql-12","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/","title":{"rendered":"How to Install PostGIS in PostgreSQL 12"},"content":{"rendered":"<h2>What is PostGIS in PostgreSQL?<\/h2>\n<p>It would not be wrong to say that PostGIS is an open source software program that supports geometrical features for object relational database.<\/p>\n<p>We use PostGIS together with postgresql. Thanks to PostGIS, we can store the polygon, linestring and point types of the data in the database. We can say that Polygon symbolizes a certain region and linestring is a particular line segment between two locations.<\/p>\n<p>We describe the PostGIS installation on PostrgreSQL 12 step by step below.<\/p>\n<h2>How to Install PostGIS in PostgreSQL 12?<\/h2>\n<h3>Step1: Download RPM Packages<\/h3>\n<p>In the first step, we download RPM packages.<\/p>\n<pre class=\"lang:default decode:true \">sudo yum -y install https:\/\/download.postgresql.org\/pub\/repos\/yum\/reporpms\/EL-8-x86_64\/pgdg-redhat-repo-latest.noarch.rpm\n<\/pre>\n<p id=\"cpoqvOb\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"66\" class=\"size-full wp-image-15332  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e707ce44e25a.png\" alt=\"\" \/><\/p>\n<pre class=\"lang:default decode:true \">sudo dnf -y install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm<\/pre>\n<p id=\"HXNSEaA\"><img loading=\"lazy\" decoding=\"async\" width=\"762\" height=\"303\" class=\"size-full wp-image-15333  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e707d188bbf5.png\" alt=\"\" \/><\/p>\n<h3>Step2: Enable PowerTool<\/h3>\n<pre class=\"lang:default decode:true \">sudo dnf config-manager --set-enabled PowerTools<\/pre>\n<p id=\"sbaLmKZ\"><img loading=\"lazy\" decoding=\"async\" width=\"701\" height=\"25\" class=\"size-full wp-image-15334  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e707d6fab184.png\" alt=\"\" \/><\/p>\n<h3>Step3: Disable default PostgreSQL AppStream Repository<\/h3>\n<pre class=\"lang:default decode:true \">sudo dnf -qy module disable postgresql<\/pre>\n<p id=\"ykrgViU\"><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"31\" class=\"size-full wp-image-15335  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e707db1c3f3e.png\" alt=\"\" \/><\/p>\n<h3>Step4: Install PostGIS<\/h3>\n<pre class=\"lang:default decode:true \">sudo yum install postgis25_12<\/pre>\n<p id=\"xILepWV\"><img loading=\"lazy\" decoding=\"async\" width=\"766\" height=\"209\" class=\"size-full wp-image-15336  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e707df63a394.png\" alt=\"\" \/><\/p>\n<p>This will install PostGIS v2.5 for PostgreSQL 12.<\/p>\n<pre class=\"lang:default decode:true \">rpm -qi postgis25_12<\/pre>\n<p id=\"POzUaIV\"><img loading=\"lazy\" decoding=\"async\" width=\"751\" height=\"511\" class=\"size-full wp-image-15337  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e707e3b53c81.png\" alt=\"\" \/><\/p>\n<h3>Step5: Create Extensions<\/h3>\n<p>After the necessary installations are completed, let&#8217;s create EXTENTION now.<\/p>\n<pre class=\"lang:default decode:true \">su - postgres\ncreateuser demo_usr\ncreatedb demo_postgis -O demo_usr\n \n-- connect psql\n \npsql -d demo_postgis\n \nCREATE EXTENSION postgis;<\/pre>\n<p id=\"WfdmyIm\"><img loading=\"lazy\" decoding=\"async\" width=\"575\" height=\"70\" class=\"size-full wp-image-15338  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e707ea803a29.png\" alt=\"\" \/><\/p>\n<h3>Step5: Check PostGIS Version<\/h3>\n<pre class=\"lang:default decode:true \">SELECT PostGIS_version();<\/pre>\n<p id=\"gEVRQqg\"><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"169\" class=\"size-full wp-image-15339  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e707ef16452b.png\" alt=\"\" \/><\/p>\n<p>Let&#8217;s query the library versions it uses.<\/p>\n<pre class=\"lang:default decode:true \">select PostGIS_Full_Version();<\/pre>\n<p id=\"ZexxwIJ\"><img loading=\"lazy\" decoding=\"async\" width=\"771\" height=\"80\" class=\"size-full wp-image-15340  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e708325f2531.png\" alt=\"\" \/><\/p>\n<h3>Examples<\/h3>\n<p>We start our examples by creating a table with an Id and Geometry column below.<\/p>\n<pre class=\"lang:default decode:true \">create table table_a\n(\n    id serial NOT NULL,\n    geo geometry,\n    CONSTRAINT tableA_pkey PRIMARY KEY (id)\n);<\/pre>\n<p>Let&#8217;s add a column to the table_a table with the AddGeometryColumn function, which has a position of 4326 in the geographic coordinate named geo2 and will contain two-dimensional coordinates.<\/p>\n<pre class=\"lang:default decode:true \">SELECT AddGeometryColumn ('public','table_a','geo2',4326,'POINT',2);<\/pre>\n<p id=\"KinQrGz\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"111\" class=\"size-full wp-image-15341  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e7083b15f5db.png\" alt=\"\" \/><\/p>\n<h4>Create a point with the geomfromtext function<\/h4>\n<pre class=\"lang:default decode:true\">insert into table_a (geo)\nselect st_geomfromtext('POINT(30.8618697 36.9090847)',4326);<\/pre>\n<h4>Create a point with the makepoint function and define projection with setsrid<\/h4>\n<pre class=\"lang:default decode:true \">select st_setsrid(\n            st_makepoint(32.8618697,39.9090847),4326\n        );<\/pre>\n<p id=\"RZzgiHS\"><img loading=\"lazy\" decoding=\"async\" width=\"657\" height=\"152\" class=\"size-full wp-image-15342  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e70842ea116f.png\" alt=\"\" \/><\/p>\n<h4>Creating geometry from geojson<\/h4>\n<pre class=\"lang:default decode:true \">insert into table_a (geo)\nselect st_geomfromgeojson('{\"type\":\"Point\",\"coordinates\":[32.7703187,39.9449081]}');<\/pre>\n<h4>Creating geometry from kml<\/h4>\n<pre class=\"lang:default decode:true \">insert into table_a (geo)\nselect st_geomfromkml('&lt;Point&gt;&lt;coordinates&gt;32.770318699999997,39.944908099999999&lt;\/coordinates&gt;&lt;\/Point&gt;');<\/pre>\n<h4>Create a line with the makeline<\/h4>\n<pre class=\"lang:default decode:true \">insert into table_a (geo)\nselect st_makeline(\nst_geomfromtext('POINT(32.8618697 39.9090847)',4326), st_geomfromtext('POINT(33.8618697 39.9090847)',4326)\n);<\/pre>\n<h4>Create a polygon with makepolygon<\/h4>\n<pre class=\"lang:default decode:true\">insert into table_a (geo)\n    SELECT ST_MakePolygon(ST_GeomFromText('LINESTRING(75.15 29.53 1,77 29 1,77.6 29.5 1, 75.15 29.53 1)'));<\/pre>\n<h4>Outputs geometry in wkt format<\/h4>\n<pre class=\"lang:default decode:true \">select st_astext(geo) from table_a;<\/pre>\n<p id=\"VJRQSMP\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"243\" class=\"size-full wp-image-15343  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e70856d9cc79.png\" alt=\"\" \/><\/p>\n<h4>Outputs geometry in geojson format<\/h4>\n<p id=\"tVaBqMI\"><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"174\" class=\"size-full wp-image-15344  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e7085a146994.png\" alt=\"\" \/><\/p>\n<h4>Output in kml format<\/h4>\n<p>Projection information must be defined for kml<\/p>\n<p id=\"OKCRbNE\"><img loading=\"lazy\" decoding=\"async\" width=\"746\" height=\"130\" class=\"size-full wp-image-15345  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/img_5e7085cfcf97d.png\" alt=\"\" \/><\/p>\n<p>For PostGIS documentation ; <a href=\"https:\/\/postgis.net\/stuff\/postgis-2.5.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/postgis.net\/stuff\/postgis-2.5.pdf<\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_15331\" class=\"pvc_stats all  \" data-element-id=\"15331\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>What is PostGIS in PostgreSQL? It would not be wrong to say that PostGIS is an open source software program that supports geometrical features for object relational database. We use PostGIS together with postgresql. Thanks to PostGIS, we can store the polygon, linestring and point types of the data in the database. We can say &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_15331\" class=\"pvc_stats all  \" data-element-id=\"15331\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":483,"featured_media":15346,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[5],"tags":[9061,9080,9079,9074,9073,9089,9087,9071,9072,9075,9062,9085,9063,9078,9082,9069,9059,9060,9092,9064,9086,9065,9081,9066,9077,9083,9067,9088,9068,9098,9093,9094,9097,9095,9090,9091,9096,9076,9084,9070],"class_list":["post-15331","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-postgres","tag-addgeometrycolumn","tag-create-a-line-with-the-makeline","tag-create-a-point-with-the-geomfromtext-function","tag-create-a-point-with-the-makepoint","tag-create-a-point-with-the-makepoint-function","tag-create-a-polygon","tag-create-a-polygon-with-makepolygon","tag-creating-geometry-from-geojson","tag-creating-geometry-from-kml","tag-define-projection-with-setsrid","tag-geojson","tag-geojson-postgis","tag-geomfromtext","tag-geomfromtext-function","tag-geomfromtext-postgis","tag-how-do-i-enable-postgis","tag-how-to-install-postgis-in-postgresql","tag-how-to-install-postgis-in-postgresql-12","tag-how-to-install-postgis-on-centos-7","tag-kml","tag-kml-postgis","tag-makeline","tag-makeline-postgis","tag-makepoint","tag-makepoint-function","tag-makepoint-postgis","tag-makepolygon","tag-makepolygon-postgis","tag-postgis","tag-postgis-examples","tag-postgis-install","tag-postgis-install-linestring","tag-postgis-tutorial","tag-postgresql-11-postgis","tag-postgresql-12-postgis","tag-postgresql-create-postgis","tag-postgresql-postgis-download","tag-setsrid","tag-setsrid-postgis","tag-what-is-postgis-and-postgresql"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install PostGIS in PostgreSQL 12 - Database Tutorials<\/title>\n<meta name=\"description\" content=\"How to Install PostGIS in PostgreSQL 12\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install PostGIS in PostgreSQL 12 - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"How to Install PostGIS in PostgreSQL 12\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-17T08:15:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-17T08:17:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png\" \/>\n\t<meta property=\"og:image:width\" content=\"501\" \/>\n\t<meta property=\"og:image:height\" content=\"304\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Yusuf KAHVEC\u0130\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yusuf KAHVEC\u0130\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/\"},\"author\":{\"name\":\"Yusuf KAHVEC\u0130\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/695ad69b2bd896864842ba8772930150\"},\"headline\":\"How to Install PostGIS in PostgreSQL 12\",\"datePublished\":\"2020-03-17T08:15:06+00:00\",\"dateModified\":\"2020-03-17T08:17:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/\"},\"wordCount\":262,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png\",\"keywords\":[\"AddGeometryColumn\",\"Create a line with the makeline\",\"create a point with the geomfromtext function\",\"create a point with the makepoint\",\"create a point with the makepoint function\",\"Create a polygon\",\"Create a polygon with makepolygon\",\"Creating geometry from geojson\",\"Creating geometry from kml\",\"define projection with setsrid\",\"geojson\",\"geojson postgis\",\"geomfromtext\",\"geomfromtext function\",\"geomfromtext postgis\",\"How do I enable PostGIS?\",\"how to install postgis in postgresql\",\"how to install postgis in postgresql 12\",\"how to install postgis on centos 7\",\"kml\",\"kml postgis\",\"makeline\",\"makeline postgis\",\"makepoint\",\"makepoint function\",\"makepoint postgis\",\"makepolygon\",\"makepolygon postgis\",\"PostGIS\",\"postgis examples\",\"postgis install\",\"postgis install linestring\",\"postgis tutorial\",\"postgresql 11 postgis\",\"postgresql 12 postgis\",\"postgresql create postgis\",\"postgresql postgis download\",\"setsrid\",\"setsrid postgis\",\"What is PostGIS and PostgreSQL?\"],\"articleSection\":[\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/\",\"name\":\"How to Install PostGIS in PostgreSQL 12 - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png\",\"datePublished\":\"2020-03-17T08:15:06+00:00\",\"dateModified\":\"2020-03-17T08:17:36+00:00\",\"description\":\"How to Install PostGIS in PostgreSQL 12\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png\",\"width\":501,\"height\":304},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install PostGIS in PostgreSQL 12\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/695ad69b2bd896864842ba8772930150\",\"name\":\"Yusuf KAHVEC\u0130\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b7b4650ddb695869b13831d79f25c19ee915dc2151a7c8fcdf01538c295eb032?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b7b4650ddb695869b13831d79f25c19ee915dc2151a7c8fcdf01538c295eb032?s=96&d=mm&r=g\",\"caption\":\"Yusuf KAHVEC\u0130\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/yusufkahveci\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install PostGIS in PostgreSQL 12 - Database Tutorials","description":"How to Install PostGIS in PostgreSQL 12","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/","og_locale":"en_US","og_type":"article","og_title":"How to Install PostGIS in PostgreSQL 12 - Database Tutorials","og_description":"How to Install PostGIS in PostgreSQL 12","og_url":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/","og_site_name":"Database Tutorials","article_published_time":"2020-03-17T08:15:06+00:00","article_modified_time":"2020-03-17T08:17:36+00:00","og_image":[{"width":501,"height":304,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png","type":"image\/png"}],"author":"Yusuf KAHVEC\u0130","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Yusuf KAHVEC\u0130","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/"},"author":{"name":"Yusuf KAHVEC\u0130","@id":"https:\/\/dbtut.com\/#\/schema\/person\/695ad69b2bd896864842ba8772930150"},"headline":"How to Install PostGIS in PostgreSQL 12","datePublished":"2020-03-17T08:15:06+00:00","dateModified":"2020-03-17T08:17:36+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/"},"wordCount":262,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png","keywords":["AddGeometryColumn","Create a line with the makeline","create a point with the geomfromtext function","create a point with the makepoint","create a point with the makepoint function","Create a polygon","Create a polygon with makepolygon","Creating geometry from geojson","Creating geometry from kml","define projection with setsrid","geojson","geojson postgis","geomfromtext","geomfromtext function","geomfromtext postgis","How do I enable PostGIS?","how to install postgis in postgresql","how to install postgis in postgresql 12","how to install postgis on centos 7","kml","kml postgis","makeline","makeline postgis","makepoint","makepoint function","makepoint postgis","makepolygon","makepolygon postgis","PostGIS","postgis examples","postgis install","postgis install linestring","postgis tutorial","postgresql 11 postgis","postgresql 12 postgis","postgresql create postgis","postgresql postgis download","setsrid","setsrid postgis","What is PostGIS and PostgreSQL?"],"articleSection":["PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/","url":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/","name":"How to Install PostGIS in PostgreSQL 12 - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png","datePublished":"2020-03-17T08:15:06+00:00","dateModified":"2020-03-17T08:17:36+00:00","description":"How to Install PostGIS in PostgreSQL 12","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/03\/Ads\u0131z-18.png","width":501,"height":304},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2020\/03\/17\/how-to-install-postgis-in-postgresql-12\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"How to Install PostGIS in PostgreSQL 12"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/695ad69b2bd896864842ba8772930150","name":"Yusuf KAHVEC\u0130","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b7b4650ddb695869b13831d79f25c19ee915dc2151a7c8fcdf01538c295eb032?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b7b4650ddb695869b13831d79f25c19ee915dc2151a7c8fcdf01538c295eb032?s=96&d=mm&r=g","caption":"Yusuf KAHVEC\u0130"},"url":"https:\/\/dbtut.com\/index.php\/author\/yusufkahveci\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/15331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/483"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=15331"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/15331\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/15346"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=15331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=15331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=15331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}