Creating maps using Generic Merge Tool

The generic merge tool assists in the creation of custom grouped regions using any geojson shapefile; it is similar to the zip code merge tool, except that it may be used on any geographical map.

Vitara Generic grouping tool

Based on a data file containing grouping information, the generic grouping tool merges individual regions on a map to generate a single region.

To access the tool, follow this link:

VitaraMaps - Tool for grouping features

The below is screenshot is from generic grouping tool web page.

map generic merge tool 1

Example of generic aggregation:

In our example, we will generate CBSA regions using a geojson collection of US counties.

The US County level geojson file is included in the VitaraMaps package and can be found in the plugins /VitaraMaps/custom/shapes/us-all-admin2.geo.json directory.

Please follow the steps below to construct CBSA groups that have been merged from us-all-admin2.geo.json

Step 1:

To merge using the generic tool you need to convert your geojson file into topojson file format. Open https://mapshaper.org/ to convert geojson file into topojson file. Below screenshot shows mapshaper webpage.

map generic merge tool 2

Step 2:

Click on select button and browse to the geojson file saved from your local machine. Now the webpage displays your uploaded geojson file as a map.

map generic merge tool 3

Step 3:

Now click export button which is on top left corner of the webpage.

map generic merge tool 5

Step 4:

Select required layer and file format as “topojson” and click export button as shown in below screenshot, a topojson file will be downloaded.

map generic merge tool 6

Step 5:

Now switch to generic tool webpage and upload the topojson file as shown in below screenshot.

map generic merge tool 7

Step 6:

Now we need to get the topojson object name from the downloaded topojson file. How to view json files in jsonviewer.stack.hu is described in the Customizing Map Chart.

map generic merge tool 8

Step 7:

Enter the TopoJson Object Name fetched from json.

map generic merge tool 9

Step 8:

For the example we will use CBSA and fips codes grouping info in a csv file format.Upload the csv file into data field in our generic tool webpage as shown in below screenshot.

map generic merge tool 10

map generic merge tool 11

Step 9:

Now for Group By field add the column name on which grouping is done, in our case its CBSA column from the csv file.

map generic merge tool 12

Step 10:

The next two fields are Data Prop and Shape Prop, which are mapping fields that map a feature from a shapefile to a row from a data file. So, in our situation, Data Prop is the column name from our csv file that is FIPS, and Shape Prop is the column name from our topojson file that is fips (please see screenshot below; how to check shape prop is also mentioned in zip code merge example).

map generic merge tool 13

Step 11:

Fill the data and click on Export button to merge and download the merged geojson file which can be used to create a new maplayer.

map generic merge tool 14

Step 12:

Once the geojson file is downloaded please refer to creating new map layer documentation to create a map layer using this geojson as a shapefile.

map generic merge tool 15

Below screenshot shows the merged output map file.

map generic merge tool 16