{"id":43,"date":"2011-11-19T17:55:50","date_gmt":"2011-11-19T23:55:50","guid":{"rendered":"http:\/\/cartometric.com\/blog\/?p=43"},"modified":"2011-11-19T18:01:21","modified_gmt":"2011-11-20T00:01:21","slug":"prepare-a-shapefile-for-openscales-using-ogr2ogr-and-postgresql","status":"publish","type":"post","link":"https:\/\/elrobis.com\/blog\/2011\/11\/19\/prepare-a-shapefile-for-openscales-using-ogr2ogr-and-postgresql\/","title":{"rendered":"Prepare a Shapefile for OpenScales using ogr2ogr and PostGREsql"},"content":{"rendered":"<p>This post explains how to import GIS data (a shapefile, in this case)\u00a0into a database (PostGREsql) so it\u00a0can be consumed\u00a0by most any mapping API.\u00a0I have OpenScales in mind,\u00a0but this approach will support any mapping app with functions for rendering\u00a0feature overlays using geodetic coordinates (i.e Longitude and Latitude).\u00a0In many cases, you&#8217;ll need to translate your feature data out of a projected\/cartesian system and into a\u00a0geodetic\/spherical system; so I&#8217;ll include a demonstration of that.<\/p>\n<h2>Quick and Dirty Summary<\/h2>\n<p>This approach has\u00a0two parts. First, we&#8217;ll use GDAL&#8217;s ogr2ogr utility\u00a0to import a shapefile into\u00a0our database. Second, we&#8217;ll use a few SQL commands to translate our data from a projected to a geodetic system,\u00a0as well as\u00a0optimize the table for fast query speeds.<\/p>\n<h2>Prerequisites<\/h2>\n<p>The following prerequisites will need to be met in order to follow along:<\/p>\n<p><strong>1) GDAL is installed.<\/strong> If you need to install GDAL,\u00a0check out my earlier post\u00a0titled <a title=\"Install GDAL on Windows\" href=\"http:\/\/cartometric.com\/blog\/2011\/10\/17\/install-gdal-on-windows\/\" target=\"_blank\">Install GDAL on Windows<\/a>. Alternatively, you could install <a title=\"FWTools by Frank Warmerdam\" href=\"http:\/\/fwtools.maptools.org\/\" target=\"_blank\">FWTools<\/a>, which is admittedly easier, but that package is no longer maintained and\u00a0it&#8217;s\u00a0becoming out-of-date as GDAL\/OGR continues to evolve.<\/p>\n<p><strong>2) PostGREsql is installed, and the\u00a0PostGIS extension is enabled.<\/strong> If you need to install PostGREsql and PostGIS, check out the tutorial at Boston GIS demonstrating <a title=\"Getting Started With PostGIS\" href=\"http:\/\/www.bostongis.com\/?content_name=postgis_tut01#20\" target=\"_blank\">how to acquire and install PostGREsql with PostGIS<\/a>.\u00a0It won&#8217;t hurt to reveiw their entire tutorial, but I deviate from their approach once installation is complete (look for\u00a0their sub-heading, <em>Loading GIS Data Into the Database<\/em>).<\/p>\n<p><strong>3) You have some geodata<\/strong>. I think the typical reader will have their own shapefile, pesonal geodatabase, or otherwise, but if you need something to follow along, here&#8217;s\u00a0a US States shapefile projected to NAD83 Albers Equal Area Conic:<\/p>\n<p><a href=\"http:\/\/www.cartometric.com\/blog\/wp-content\/uploads\/data\/usstates_nad83_aeac.zip\">http:\/\/www.cartometric.com\/blog\/wp-content\/uploads\/data\/usstates_nad83_aeac.zip<\/a><\/p>\n<h2>Loading Geodata into PostGREsql \/ PostGIS<\/h2>\n<p>To push shapefile data into your geodatabase, you can run an ogr2ogr script like this:<\/p>\n<blockquote><p>ogr2ogr -f &#8220;PostGreSQL&#8221; PG:&#8221;host=127.0.0.1 user=youruser dbname=yourdb password=yourpass&#8221; &#8220;E:\\4_GIS\\01_tutorials\\usstates_nad83_aeac\\usstates_albers.shp&#8221; -nln usstates -nlt geometry<\/p><\/blockquote>\n<p>For deeper reading on ogr2ogr utility flags (like -nln and nlt), check out the <a href=\"http:\/\/www.gdal.org\/ogr2ogr.html\" target=\"_blank\">usage notes for ogr2ogr<\/a>. Also, it may be worth you while to peruse the <a href=\"http:\/\/www.gdal.org\/ogr\/drv_pg.html\" target=\"_blank\">OGR\u00a0PostgreSQL driver page<\/a>, as well as the <a href=\"http:\/\/www.gdal.org\/ogr\/drv_pg_advanced.html\" target=\"_blank\">Advanced Driver Information page<\/a>. In the meantime, here are a few quick notes regarding my script:<\/p>\n<p><strong>-f &#8220;PostGreSQL&#8221; PG:&#8221;host=127.0.0.1 user=youruser dbname=yourdb password=yourpass&#8221;<\/strong>\u00a0 This tells OGR you&#8217;re exporting to PostGreSQL with the following connection string. Notice that my connection string is wrapped in double-quotes (&#8220;).<\/p>\n<p><strong>&#8220;E:\\4_GIS\\01_tutorials\\usstates_nad83_aeac\\usstates_albers.shp&#8221;<\/strong>\u00a0\u00a0 This is the path to my shapefile \u00a0input data. Once again, I wrapped this value in double-quotes (&#8220;). I do this to prevent the console from introducing linebreaks into the argument value\u00a0and confusing the parser.<\/p>\n<p><strong>-nln usstates<\/strong>\u00a0 The -nln flag means &#8220;rename the table on export&#8221;. In other words, my PostGREsql db will\u00a0get a new table named <em>usstates<\/em>, and not one named <em>usstates_albers<\/em>.<\/p>\n<p><strong>-nlt geometry<\/strong>\u00a0 This one&#8217;s\u00a0particularly important for polygon data. It tells OGR &#8220;accept any geometry you encounter and store it in the feature&#8217;s geometry column&#8221;. Oftentimes, a polygon dataset will have polygons and multipolygons in the same table. For example here&#8217;s a narrow column of\u00a0Well Known Text (WKT)\u00a0geometries from the albers shapefile so you can see what I mean:<\/p>\n<p>WKT;STATE_NAME;STATE_FIPS;STATE_ABBR&#8230;..<br \/>\n&#8220;<strong>MULTIPOLYGON<\/strong> (((-1827806.2165497246 1227&#8230;..<br \/>\n&#8220;<strong>POLYGON<\/strong> ((-1148108.0134327484 649421.311&#8230;..<br \/>\n&#8220;<strong>MULTIPOLYGON<\/strong> (((1949555.0881544715 75264&#8230;..<br \/>\n&#8220;<strong>POLYGON<\/strong> ((-199237.01920416657 704421.540&#8230;..<br \/>\n&#8220;<strong>POLYGON<\/strong> ((-519870.38897088548 372373.616&#8230;..<\/p>\n<p>If you run the ogr2ogr script\u00a0noted above without -nlt geometry, you&#8217;ll get an error like this:<\/p>\n<p><em>ERROR 1: Terminating translation prematurely after failed<\/em><br \/>\n<em>translation of layer usstates_albers (use -skipfailures to skip errors)<\/em><\/p>\n<p>By default, OGR refuses to mix geometry types in a table, so -nlt geometry allows you to\u00a0duck that requirement and store both Polygon and Multipolygon features in the same table. You could optionally instruct OGR to &#8220;explode&#8221; Multipolygons into individual Polygons using the -explodecollections flag, as depicted in\u00a0the following screenshot, but I don&#8217;t recommending that solution for the intended use case. For example, if a map user clicks on Michigan&#8217;s Upper Penenssula, I want the whole state to be selected, not just the UP. I&#8217;m not saying you can&#8217;t make that happen after exploding multifeatures; rather, it&#8217;s just not the approach I favor.<\/p>\n<div id=\"attachment_115\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/ogr-explodecollections.png\"><img aria-describedby=\"caption-attachment-115\" loading=\"lazy\" class=\"size-medium wp-image-115\" title=\"Using ogr2ogr to Import Data into PostGREsql\" src=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/ogr-explodecollections-300x119.png\" alt=\"\" width=\"300\" height=\"119\" srcset=\"https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/ogr-explodecollections-300x119.png 300w, https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/ogr-explodecollections.png 669w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-115\" class=\"wp-caption-text\">Without -nlt geometry, ogr2ogr will throw an error if it attempts to export polygons and multipolygons into the same table. Alternatively, you can use the flag -explodecollections (not recommended in this case) to translate your multipolygons into several polygons.<\/p><\/div>\n<p>Assuming you used the script like the one I initially provided, you should be able to open pgAdmin III (the PostGREsql admin GUI that insalls with the database) and see your new <em>usstates<\/em> table:<\/p>\n<h2>Post-Processing your Geodata with SQL Instructions<\/h2>\n<p>With pgAdmin III open, expand the Tools menu and launch the Query tool. You&#8217;ll use the Query tool\u00a0and the following SQL instructions to prep your data for production. I&#8217;ll start by listing all the queries together, then I&#8217;ll provide some deeper explaination in the text that follows.<\/p>\n<p>SELECT SRID(wkb_geometry) FROM usstates;<br \/>\nSELECT * FROM spatial_ref_sys WHERE srid = 900925;<br \/>\nSELECT st_asText(wkb_geometry) FROM usstates;<br \/>\n<span style=\"color: #0000ff;\">ALTER TABLE usstates ADD COLUMN wgs84geom GEOMETRY;<br \/>\n<\/span><span style=\"color: #0000ff;\">UPDATE usstates SET wgs84geom = st_Transform(wkb_geometry, 4326);\u00a0<br \/>\n<\/span>SELECT SRID(wgs84geom) FROM usstates;<br \/>\nSELECT st_asText(wgs84geom) FROM usstates;<br \/>\n<span style=\"color: #0000ff;\">VACUUM usstates;<\/span><br \/>\n<span style=\"color: #0000ff;\">CREATE INDEX usstates_wgs84_idx ON usstates USING GIST(wgs84geom);<\/span><\/p>\n<p>Basically, the steps emphasized in blue do the actual work, while the steps in black are more for sanity checks. Steps\u00a04 and\u00a05 perform the geometry transformation, and the last two steps do some house-cleaning and\u00a0table optimization. Now I&#8217;ll\u00a0provide a\u00a0one-by-one discussion of\u00a0each step.<\/p>\n<p>1) <strong>SELECT SRID(wkb_geometry) FROM usstates;<\/strong><\/p>\n<p>Here we&#8217;re getting\u00a0the SRID for the features in this layer (which is 900925 on my system). By default, OGR will store\u00a0feature geometries in a field called <em>wkb_geometry<\/em>. Also, your PostGIS installation includes a table named <em>spatial_ref_sys<\/em> that stores coordinate system definitions necessary\u00a0for the database to remain &#8220;spatially aware&#8221;\u00a0of your new table as well as the other spatial datasets the system is managing. Consider this, if you want to select points from one layer that fall inside polygons from another layer, PostGIS needs to understand the coordinate systems for both datasets so that it can align\u00a0their features\u00a0for analysis. So when we run the SRID() function on the table&#8217;s geometry field, <em>wkb_geometry<\/em>, PostGREsql will return the unique identifier for the coordinate system used to define\u00a0the features in our table.<\/p>\n<p>2) <strong>SELECT * FROM spatial_ref_sys WHERE srid = 900925;<\/strong><\/p>\n<p>In this step we answer the question, &#8220;Does the SRS\u00a0established at\u00a0import makes sense for the data?&#8221; This statement queries\u00a0the PostGIS <em>spatial_ref_sys<\/em> table for the coordinate system whose ID is referenced in the previous step. Check the <em>srText<\/em> field for a readable version of the coordinate system. Mine\u00a0begins with <em>&#8220;PROJCS[&#8220;North_America_Albers_Equal_Area_Coni..&#8221;<\/em>\u00a0 That&#8217;s what I expected, and that&#8217;s a good thing.<\/p>\n<p>3) <strong>SELECT st_asText(wkb_geometry) FROM usstates;<\/strong><\/p>\n<p>Now I like to do a quick query to see the WKT for some of my features. The geometry field <em>wkb_geometry<\/em>\u00a0was created by ogr2ogr when it imported the shapefile into PostGREsql. If you don&#8217;t like this name, you can use the creation option <strong><em>-lco GEOMETRY_NAME=geom<\/em><\/strong>\u00a0in your ogr2ogr import\u00a0script to set the name of the geometry field at import time. As shown in the image, the WKT for my features looks like I would expect.<\/p>\n<div id=\"attachment_116\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/pgAdminIII-query-tool-select-st_asText.png\"><img aria-describedby=\"caption-attachment-116\" loading=\"lazy\" class=\"size-medium wp-image-116\" title=\"pgAdminIII-query-tool-select-st_asText\" src=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/pgAdminIII-query-tool-select-st_asText-300x209.png\" alt=\"\" width=\"300\" height=\"209\" srcset=\"https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/pgAdminIII-query-tool-select-st_asText-300x209.png 300w, https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/pgAdminIII-query-tool-select-st_asText.png 849w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-116\" class=\"wp-caption-text\">Querying feature geometries using the ST_asText() function on the geometry column, wkb_geometry.<\/p><\/div>\n<p>4) <strong>ALTER TABLE usstates ADD COLUMN wgs84geom GEOMETRY;<\/strong><\/p>\n<p>This instruction adds\u00a0a new column to the table, which\u00a0I&#8217;ll use to\u00a0store\u00a0the feature geometries for my US States in\u00a0geodetic coordinates. The column will be named <em>wgs84geom<\/em>\u00a0and will expect data of\u00a0type GEOMETRY.\u00a0In other words, this field will store\u00a0a permanent &#8220;cast&#8221; of our feature geometries\u00a0in the WGS84 coordinate system, which is very popular due to its use by the famous Global Positioning System (GPS).<\/p>\n<blockquote><p>Note: GIS coordinate systems are complex beasts, and it&#8217;s easy to get lost in their particulars. Nevertheless, one distinction is very important, and that&#8217;s the\u00a0difference between projected systems and geodetic systems. Projected systems are two-dimensional. &#8212;these are\u00a0the X\/Y grids you used for trigonometry exercises in High School. On the other hand, geodetic systems\u00a0define\u00a0coordinate geometries within a\u00a0three-dimensional, spherical space.<\/p>\n<p>Both systems are roses by many names. For instance, projected systems may be called &#8220;Cartesian&#8221; or &#8220;Geometric&#8221;. And Geodetic systems may be called &#8220;Sexigesimal&#8221; or &#8220;Geographic&#8221;. The PostGIS community may more often refer to features as being geometry, or geography data and mean projected\u00a0vs. geodetic coordinates, respectively. So\u00a0if you run across language like this, realize people intend for <em>geometry\u00a0<\/em>to imply\u00a0X and Y coordinates in a cartesian space, and for <em>geography\u00a0<\/em>to mean familiar\u00a0longitude and latitude coordinates.<\/p>\n<div id=\"attachment_118\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/usstates_albers_image.png\"><img aria-describedby=\"caption-attachment-118\" loading=\"lazy\" class=\"size-medium wp-image-118  \" title=\"US States in Albers Equal Area Conic, a projected coordinate system\" src=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/usstates_albers_image-300x224.png\" alt=\"\" width=\"300\" height=\"224\" srcset=\"https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/usstates_albers_image-300x224.png 300w, https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/usstates_albers_image.png 479w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-118\" class=\"wp-caption-text\">In this image, state boundaries are drawn in Albers Equal Area Conic, which is a projected coordinate system.<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_119\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/usstates_nad83_image.png\"><img aria-describedby=\"caption-attachment-119\" loading=\"lazy\" class=\"size-medium wp-image-119  \" title=\"US States in Unprojected NAD83, a Geographic System.\" src=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/usstates_nad83_image-300x160.png\" alt=\"\" width=\"300\" height=\"160\" srcset=\"https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/usstates_nad83_image-300x160.png 300w, https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/usstates_nad83_image.png 517w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-119\" class=\"wp-caption-text\">Here the state boundaries are &quot;represented&quot; in NAD83 geographic coordinates. NAD83 geographic (EPSG 4269), is similar, if not nearly identical, to WGS84. As you can see, geodetic systems are difficult to represent in 2D space; as such, unprojected maps of large areas tend to look &quot;suspect&quot;.<\/p><\/div><\/blockquote>\n<p>5) <strong>UPDATE usstates SET wgs84geom = st_Transform(wkb_geometry, 4326);\u00a0<\/strong><\/p>\n<p>With\u00a0the new column ready to go,\u00a0you can now\u00a0wield an UPDATE statement and the st_Transform() function to\u00a0translate feature geometries from their projected coordinates\u00a0to their\u00a0geographic WGS84 coordinates.\u00a0The st_Transform() function expects two arguments,\u00a0the source geometry field to transform, and\u00a0the EPSG code for the output coordinate system. WGS84\u00a0is a fundamentally-popular coordinate system, and it&#8217;s EPSG code of 4326 is easy to find. If you do not know the EPSG code for your preferred coordinate system, head over to <a href=\"http:\/\/spatialreference.org\/\">http:\/\/spatialreference.org\/<\/a>\u00a0and do some quick research.\u00a0<\/p>\n<blockquote><p>Note: We could optionally perform\u00a0any coordinate system transformations in our queries by calling st_Transform on\u00a0the geometry field right in the query. However, by\u00a0casting our feature geometries in advance, we remove calculation overhead and get a subtle efficiency gain. This can particularly improve response times for spatial queries.<\/p><\/blockquote>\n<p>6) <strong>SELECT SRID(wgs84geom) FROM usstates;<\/strong><\/p>\n<p>Like\u00a0the second step,\u00a0this query is only intended to\u00a0confirm whether the SRID established in\u00a0the previous step\u00a0makes sense for the data. It should return 4326.<\/p>\n<p>7) <strong>SELECT st_asText(wgs84geom) FROM usstates;<\/strong><\/p>\n<p>Also like the third step, here I&#8217;m querying the feature geometrires as WKT to\u00a0make sure they&#8217;re defined by longitude\/latitude coordinate pairs.<\/p>\n<div id=\"attachment_117\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/pgAdminIII-with-WKT-in-lon-lat.png\"><img aria-describedby=\"caption-attachment-117\" loading=\"lazy\" class=\"size-medium wp-image-117\" title=\"pgAdminIII-with-WKT-in-lon-lat\" src=\"http:\/\/cartometric.com\/blog\/wp-content\/uploads\/2011\/11\/pgAdminIII-with-WKT-in-lon-lat-300x209.png\" alt=\"\" width=\"300\" height=\"209\" srcset=\"https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/pgAdminIII-with-WKT-in-lon-lat-300x209.png 300w, https:\/\/elrobis.com\/blog\/wp-content\/uploads\/2011\/11\/pgAdminIII-with-WKT-in-lon-lat.png 849w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-117\" class=\"wp-caption-text\">Well Known Text (WKT) for features transformed into the WGS84 coordinate system.<\/p><\/div>\n<p><strong>8) VACUUM usstates;<\/strong><\/p>\n<p>Once you&#8217;re finished with the geometry transformation, call a <em>VACUUM<\/em> instruction for the <em>usstates<\/em> table. PostGREsql likes to have a deep knowledge of its feature tables so that it can optimize queries. To this end, the VACUUM command instructs PostGREsql to &#8220;gather fresh intel&#8221; on your table so that it can make better decisions. This step is particularly necessary for tables with a large number of features as well as tables experiencing a lot of maintenance (i.e. frequent feature INSERT and UPDATE activity).<\/p>\n<p><strong>9) CREATE INDEX usstates_wgs84_idx ON usstates USING GIST(wgs84geom);<\/strong><\/p>\n<p>Finally &#8212;if you intend to perform queries on this table, particularly spatial intersection queries on the new geometry column, you&#8217;ll want to create a spatial index referencing that column. Here, <em>usstates_wgs84_idx<\/em> is just a naming convention that implies <em>TableName_FieldName_ThisIsAnIndex<\/em>.\u00a0To create an index, call the GIST() function on a table and pass in the table column you intend to search on &#8212;for instance,\u00a0<em>wgs84geom<\/em>.<\/p>\n<p>After following along with this post, you should have learned how to 1) use ogr2ogr to populate a PostGREsql database with shapefile data, 2) leverage PostGIS functions\u00a0to perform a coordinate system transformation in the database, and 3) apply PostGREsql optimization functions to\u00a0optimize the table for production use.<\/p>\n<p>I hope you found this beneficial. Thanks for reading.<\/p>\n<p>\/Elijah<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post explains how to import GIS data (a shapefile, in this case)\u00a0into a database (PostGREsql) so it\u00a0can be consumed\u00a0by most any mapping API.\u00a0I have OpenScales in mind,\u00a0but this approach will support any mapping app with functions for rendering\u00a0feature overlays using geodetic coordinates (i.e Longitude and Latitude).\u00a0In many cases, you&#8217;ll need to translate your feature [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[8,17,16,10],"_links":{"self":[{"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/posts\/43"}],"collection":[{"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":6,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":126,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/posts\/43\/revisions\/126"}],"wp:attachment":[{"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elrobis.com\/blog\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}