How to export country polygons as Shapefiles with RDF viewer
In order to create e.g. a country or state boundary, take the query below, execute this query in the RDF viewer and export the result into a Shapefile. Change the text query for ISO_COUNTRY_CODE to alter the result to the desired country.
To export level 1 polygon features, use the 2nd query listed and change the ISO_COUNTRY_CODE and CARTO_ID for the polygon feature you wish to export.
1. SQL Query to select a cartographic representation of the country (admin order 0) border of Dominican Republic:<br />select co.iso_country_code, c.carto_id <br />from rdf_carto c, <br />rdf_country co, <br />rdf_admin_hierarchy ah <br />where c.named_place_id = ah.admin_place_id <br />and ah.country_id = co.country_id <br />and co.iso_country_code = 'DOM' <br />and ah.admin_order = 0;<br />
To run the query, paste the query into RDF Viewer by going to Tools --> Queries --> Paste desired query in query box --> Run Query
2. SQL Query to select a cartographic representation of an admin order 1 polygon (La Altagracia) in Dominican Republic:<br />select co.iso_country_code, c.carto_id <br />from rdf_carto c, <br />rdf_country co, <br />rdf_admin_hierarchy ah <br />where c.named_place_id = ah.admin_place_id <br />and ah.country_id = co.country_id <br />and co.iso_country_code = 'DOM' <br />and ah.admin_order = 1 <br />and c.carto_id = 1420115768 ;<br />
Once the desired area is shown as outlined in the map, click File --> Export query results to shapefile.
Save the new shapefile to the desired location, and now you can add the shapefile to your desired GIS Application or software for viewing.