2

I am attempting to import publicly available shapefile data from http://gis.utah.gov/data/boundaries/zip-codes/ into Tableau for a data visualization project.

Unfortunately, the .shp file and .gdb database that are available for download include only the shape length / area for each of the Utah zip codes.

My goal is to convert these from the current NAD 1983 UTM 12N (EPSG: 26912) format into latitude / longitude coordinates that can be read into Tableau.

I am using Quantum GIS (QGIS 2.0.1) and would appreciate any and all help.

  • 1
    is this not a case of enable on the fly projections? – Ger Oct 16 '13 at 6:33
  • reproject to wgs84 and export the layer. – Mapperz Oct 16 '13 at 13:27
  • On the fly projections are enabled in the 'Project Properties' pane. I have also tried to project the layer to wgs84 and saved the layer as a .csv file using 'GEOMETRY=AS_XY' in the 'Layer' field. Unfortunately, when I open the resulting file it contains the exact same shape length and area fields rather than the latitude/longitude values that I am looking for. – Entropy Oct 16 '13 at 14:41
  • Please clarify: Do you want to recalculate the length/area values from meters/squaremeters to degree/squaredegree? Or do you want to reproject the geographic features? – underdark Oct 16 '13 at 16:40
  • What I am looking for is a series of latitude / longitude coordinates for each of the vertices associated with each zip code. – Entropy Oct 16 '13 at 17:02
4

The layer is provided as a polygon so you'll need to convert the polygons to points and calculate the XYs of each point.

  • Enable 'on the fly' CRS projections in Project Properties
  • Ensure that the Selected CRS is the CRS you want to project the data to
  • Add vector layer
  • Right click layer and "Save vector layer as..."
  • Select the CRS you want the layer exported to
  • Save layer and re-add the layer to the project
  • Convert the polygon to points using Vector-->Geometry Tools-->Extract nodes
  • Ensure the points layer is added to the project
  • Open Attributes table for point layer
  • Toggle editing mode on
  • Open field calculator
  • Add two new calculated fields using the $x and $y funcitons under Geometry for each respective field
  • Save edits and toggle off edit mode

This should give you a point file with the vertices for each polygon and the respective calcualted X and Y values for each point in the chosen CRS.

1

I created some videos that take you through the entire process of taking a shape file, bringing it into qgis, exporting the geometry data, converting it into Tableau format, and then loading it into Tableau.

http://www.excelacom.com/resources/blog/tableau-geospatial-reporting-made-easy

Let me know if this helps.

0

I'm not aware which format is needed for importing into Tableau. One human-readable standard format is Well-known Text (WKT). It's just a list of coordinates with defined syntax and can be converted into any format you need with some simple scripting.

On reprojecting to geographic coordinates: Reprojecting vector layer in QGIS?

On exporting a text file with vertex coordinates in WKT: Create a csv with geometry as WKT in QGIS (and choosing the field delimiter)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.