1 2 3 Previous Next 139 Replies Latest reply on Mar 30, 2017 1:11 PM by Clifton Farr

    Map Utility Downloads

    Richard Leeke

      I've recently updated my mapping utilities to work with Tableau 8.2 (in the case of "tabgeohack") and to add support for point and polyline shape files as well as polygons (for "shapetotab").

       

      It just occurred to me that the download links for the latest version are buried somewhere in the middle of page 22 of the gigantic Grow your own Filled Maps thread - so it will soon become really hard to find them.

       

      So I've started this thread as a permanent location for downloading the latest versions. Then as and when new versions come out, I'll update this post so it always has links to any relevant versions.

       

      I suggest that we keep this thread just for that and carry on using the original Grow your own Filled Maps thread for questions and support.

       

      Summary of available versions:

      Version 2.0.10 of tabgeohack is updated to work with Tableau 9.3 (due to a change in the way Zip Codes are stored). This release also contains a couple of other minor bug fixes and some changes aimed at supporting Mac (not completed).

      Version 2.0.6 is still available in case of issues with the changes made for MAc support.

      See the release notes (tabgeohack.txt) included with the release for details of what changed with each version.

       

      Use tabgeohack version 1.0.13 for Tableau version 8.1 or earlier.

       

      Version 1.0.11 of shapetotab adds support for the MULTLINESTRING geometry type which occurs in some polyline files.

      Version 1.0.10 added an option to filter the contents of the shapefile, at export time.

      Version 1.0.9 added support for shape files containing point or polyline features as well as polygons.

      There were a few issues getting version 1.0.9 going with later versions of some of the components used, so version 1.0.8 is still available to fall back to if you have problems with the latest version.

       

      The download files with the latest versions of both utilities include installation and usage documentation.

       

      Latest versions:

      tabgeohack version 2.0.10 (Dropbox - TabGeoHackV2.zip )

      shapetotab version 1.0.11 (Dropbox - ShapeToTab.zip )

       

      Prior Versions:

      tabgeohack version 2.0.6 (Dropbox - TabGeoHackV2_v_2_0_6.zip )

      tabgeohack version 1.0.13 (Dropbox - TabGeoHack.zip )

      shapetotab version 1.0.8 (Dropbox - ShapeToTabV108.zip )

       

      Geospatial Data Abstraction Library:

      GDAL 1.9.0 (Dropbox - release-1600-gdal-1-9-0-mapserver-6-0-1.zip )

       

      [Edited 20150722 to include links to the Grow Your Own Filled Maps thread]

      [Edited 20170330 to fix broken Dropbox links]

        • 1. Re: Map Utility Downloads
          Richard Leeke

          Version 1.0.11 of shapetotab adds support for the MULTILINESTRING geometry type which occurs in some PolyLine shape files.

          • 2. Re: Map Utility Downloads
            Richard Leeke

            Version 2.0.5 of tabgeohack should work with Tableau 9.0.

            • 3. Re: Map Utility Downloads
              Kevin Brand

              Richard,

               

              Thanks for all the great utilities.  I am trying to figure out if I can take a AutoCad shape file of a floor layout and mimic what you have done with the tsunami map.  Since this is not a geographic "map" would I be following the same steps as indicated in the Shape to Tab instructions?

               

              Thanks for your help,

               

              Kevin

              • 4. Re: Map Utility Downloads
                Richard Leeke

                I've never actually looked at the AutoCad shape file format, but what you say sounds right. You just need to end up with a file with a set of x,y coordinates for each shape, along with the point order, to allow you to draw polygons in Tableau. Basically you want a structure similar to the output from shapetotab, but with your x and y coordinates in place of lon and lat.

                • 5. Re: Map Utility Downloads
                  Jeff Strauss

                  thank you, thank you!  The last time I used tabgeohack was last April when I was still on 8.1, now I have 8.3 installed and was getting an error.

                   

                   

                  Do you have a recommendation as to which version will work with 8.3?

                  • 6. Re: Map Utility Downloads
                    Richard Leeke

                    2.0.5 should work with anything from 8.2 onwards. Tell me if you hit problems.

                     

                    (I clarified the notes at the top to make clear it isn't for 9.0 only.)

                    • 7. Re: Map Utility Downloads
                      Jeff Strauss

                      thanks.  I have downloaded it and it's working.  I want to purge the standard geography of county, zipcode, areacode, and CMSA.  I tried doing it with a test file for Taiwan.  See attached.  I'm getting an uninitialized error.  Am I doing something wrong in the yml?

                       

                      I also posted on clearly and simply, but couldn't find how to attach the yml doc.

                       

                      C:\customgeo>tabgeohack --shapes taiwan.yml

                      Generating shapes...

                          TWN_City... added 22 rows with a total of 54719 points (min: 12, avg: 2487,

                      max: 12717)

                      Overall totals: 22 rows, 54719 points

                      Purging unwanted geocoding data...

                      Use of uninitialized value $total_deleted in concatenation (.) or string at tabg

                      eohack.pl line 297.

                      Total rows deleted:

                      Compressing geocoding D/B...done

                      Saving a copy of the unprocessed custom geocoding data at:

                          C:\customGeo\Gen_output\Local Data Copy (no geometry)

                      Saving a copy of the processed custom geocoding data at:

                          C:\customGeo\Gen_output\Local Data Copy (with geometry)

                      Done in 22 seconds

                      • 8. Re: Map Utility Downloads
                        Richard Leeke

                        I'll try to take a look at the weekend. Did it actually purge the data you wanted to purge? Easiest way to tell may just be to look at the size of the resulting GEOCODING.FDB file.

                        • 9. Re: Map Utility Downloads
                          Jeff Strauss

                          The fdb file size didnt change.

                          • 10. Re: Map Utility Downloads
                            Richard Leeke

                            I had a quick look and I'm surprised nobody has hit this before - nothing has changed in this area since I first wrote it.

                             

                            Firstly the reason for that "Use of uninitialized value $total_deleted" message was that no rows were deleted from any tables and I hadn't set the counter to zero before I started processing, so it gave a warning when I tried to print the answer. I've fixed that so it will be right next time I release it - but the error is completely harmless so I won't bother doing a new release just for that.

                             

                            The reason nothing was deleted is down to the way I designed it to work. The various geographic roles form a hierarchy, with Country at the top, like this:

                             

                            role_hierarchy:

                              - role: Country

                                children:

                                  - role: State

                                    children:

                                      - role: City

                                      - role: County

                                  - role: ZipCode

                                  - role: AreaCode

                                  - role: CMSA

                             

                            The way that the purging works is that you specify the roles that you want to purge and it purges everything at that level apart from any explicit exceptions that you want to keep. I did it that way because normally you are only interested in particular localised areas at some level, so it is much easier to say "purge all countries except Taiwan" than to list all of the countries that you do want to purge.

                             

                            The geocoding database enforces referential integrity, so if you delete a country, all of the other roles for that country will be deleted, and so on down the tree. If you don't specify the lower level roles explicitly, only the children of the higher level roles atht are being purged will be purged. However you may want to keep a high level role, but purge some of the more detailed roles, in which case you can specify the lower level ones.

                             

                            But where that breaks down slightly is that the lower level purging entries only apply to any exceptions that have been explicitly retained at the higher level.

                             

                            In your case you have commented out the purging rule for country - which means that no countries will be purged. As no countries are being purged it doesn't look any further down the tree, hence nothing at all is purged.

                             

                            I'm not quite sure what you were hoping to do. I'm guessing you wanted to keep all countries, states and cities and delete all counties, zip codes are codes and CMSAs. If so, the only way I can see to do that is to include the delete rules for country, state and city but list every single country, state and city as exceptions so they don't get purged.

                             

                            On the other hand, as you seem to be focused on Taiwan data it may be that you actually want to delete everything except  top level Taiwan data. If that's the case, you could say this:

                             

                            purge_roles_exceptions:

                                # All countries except Taiwan are purged.

                                #Country:

                                #    -   Taiwan

                                # State is not listed, states for all countries except Taiwan will be purged explicitly

                                #State:

                                # City is not listed, cities for all countries except Taiwan will be purged explicitly

                                # City:

                                # County, ZipCode, AreaCode and CMSA are listed with no exceptions, so even Taiwanese

                                # entries will be purged

                                County:

                                ZipCode:

                                AreaCode:

                                CMSA:

                             

                            I suspect you were probably trying for the first case. I don't think it has ever come up before, If that is what you need I'll have to have a think what I would need to change to make that possible. No promises.

                            1 of 1 people found this helpful
                            • 11. Re: Map Utility Downloads
                              Jeff Strauss

                              the very thorough explanation is awesome and it makes total sense.  I will take the direction of specifying the countries that we care about including in the analysis and then purge the unneeded roles and see how this goes.  Have a great weekend!

                              • 12. Re: Map Utility Downloads
                                Jeff Strauss

                                I have it working now where it's keeping 7 countries and purging the rest and then purging county, congress, areacode, and CMSA for even these countries.

                                 

                                1. I think the default geographies still show up inside Tableau Desktop.  Expected behavior?


                                2. Is it possible to purge zipcodes that do not belong to the US or Canada?

                                 

                                --------------------------------------------------------------------------------------------------------------------------------------------------------------------

                                role_hierarchy:

                                    -   role: Country

                                        children:

                                            -   role: State

                                                children:

                                                    -   role: City

                                                    -   role: County

                                                    -   role: Congress

                                            -   role: ZipCode

                                            -   role: AreaCode

                                            -   role: CMSA

                                 

                                purge_synonyms: true

                                 

                                purge_roles_exceptions:

                                    # All countries except the ones listed below are purged.

                                    Country:

                                        -   Austria

                                        -   Canada

                                        -   France

                                        -   Germany

                                        -   Switzerland

                                        -   United Kingdom

                                        -   United States

                                       

                                    County:

                                    Congress:

                                    AreaCode:

                                    CMSA:

                                • 13. Re: Map Utility Downloads
                                  Richard Leeke

                                  Yes, you just need to add a ZipCode purge rule with an exception for US and Canada, like this:

                                   

                                  purge_roles_exceptions:

                                      # All countries except the ones listed below are purged.

                                      Country:

                                          -   Austria

                                          -   Canada

                                          -   France

                                          -   Germany

                                          -   Switzerland

                                          -   United Kingdom

                                          -   United States

                                        

                                      County:

                                      Congress:

                                      ZipCode:

                                          -   Canada

                                          -   United States

                                      AreaCode:

                                      CMSA:

                                  1 of 1 people found this helpful
                                  • 14. Re: Map Utility Downloads
                                    Jeff Strauss

                                    I implemented the above hierarchy and it purged all zipcodes because I think none of the zips are equal to Canada or United States.  It's the parent country that is Canada or United States.

                                    1 of 1 people found this helpful
                                    1 2 3 Previous Next