Sunday, July 22, 2012

How to Share your geo data on your website in 5 minutes...

In this post we will walk you through the steps to upload your spatial data using MapProvision and publish this data on your website in the MapProvision Viewer.

The MapProvision Viewer can be embedded on your website and gives your website visitors the ability to select thematic overlay layers to display your data on Google Maps and to analyze the data using animation and charting.

Here are the steps to publish your spatial data on your website, blog or intranet and store your data in your own personal Google Fusion Table owned by your Google account.

  1. Launch the MapProvision Manager from the www.mapprovision.com website.



  1. You will be prompted to log in to your Google account which will be used to store your data uploads.

    If you do not have a Google account you can click sign up to create your Google account.

    Once you have logged in to your Google account if it is your first time using the Manager you will be prompted to authorize the MapProvision application to access your Google Fusion Tables on your behalf. The OAuth authorization screen is shown below.



    When you click Grant Access an OAuth token is given to the MapProvision application which securely stores it. The token will never leave the secure MapProvision application and it will not be shared with any third parties. You can revoke the OAuth token at any time by navigation to your Google Accounts page.
  1. After granting access you will be redirected to the MapProvision Manager. A Freemium account will be created for you containing an example Data Collection called Examples containing datasets and image layers that you can experiment with.

  2. The next step is to create a new Data Collection to contain the data that you are going to upload. A Data Collection is set of data sets that has its own unique link that can be published to your website or viewed as a stand alone web page. It also contains options for how you want the Map to appear such as location, zoom level and how the layers will be displayed in the layer tree presented to the user. To create a new data collection open up the Manage Data Collections tree on the left and select: *New Data Collection.
  1. This will show a form asking for the name of your Data Collection. Give it a name and click Save.


  1. The Manage Data Collection tree on the left will refresh and you can re-open it to see your newly created data collection in the tree. Clicking on Manage <your newly create data collection name>, will show the Manage tab to start managing your data collection.

  2. The first thing we want to do is upload some spatial data. You can use your own but in this walk through we will be uploading a data file containing flood modeling data and infrastructure information about the Boston Metropolitan area.

    You can download the file used in this example by clicking here.
  1. Click the 'Add Data Set' button. This will launch the add data set wizard. Enter the dataset name, description, and creator name

  1. Then click the Layers tab to select your layers. For this data set we want to select the Raster Grid and Density layers.
    Because we are selecting the Raster Grid layer which is a grid layer we need to select the aggregation function that will be used to represent all the values that occur within each grid on the map. For this data set we will chose Mean which will use an average of all the data points inside each grid cell.


  2. Next click the Import Data tab. This is the tab we will use to upload your data file.
    Select File from the Data Source drop down box. This will show the file upload tools.



  3. Click the Browse button to locate your spatial data file on your local hard drive. Select the Boston Flood Model file and click Open. This will start the file upload with the progress shown in the progress bar. Once this has finished you will see all the fields identified in the data file shown in the dual select box. The fields on the right are fields that have been identified as having a numeric value. If there are any fields shown that you do not want to be represented as spatial layers then you can move them to the left box by selecting then and using the left arrow.


  4. Once you are happy you can click Save which will then store your newly created dataset into your data collection.
  5. From just one data file that has multiple columns, we have created multiple spatial layers for each attribute in the data file and then a layer for each layer type and aggregation type that we selected.

    The following diagram shows how attributes are mapped to spatial layers in the data collection.


  6. Next we want to make changes to how the map will be presented for this data collection in the MapProvision viewer. To do this click the Options button. This will launch the Options form.

    Using the map's drag and zoom tools position the map so it is covering the Boston metropolitan area. Also we want to set the width of the layer tree to 270 so the layer tree can fit the names of all the layers without the user having to scroll. So put the value of 270 into the field called "Layer Tree Width". Once this is done click Save. From now on when this data collection is loaded in the viewer the map will be at the position that you have selected.


  7. Next we want to configure how our layers will be arranged in the viewer's layer tree. To do this click the Organize Folders button.

    This will launch the Organize Folders tool.

    For this data set we want the flood model attributes to be displayed as raster grid layers and the infrastructure attributes to be displayed as density layers. To do this open up the Raster Grid folder and drag the minimum, average, and maximum flood level layers to the the bottom of the tree so they are outside all the folders. Do the same with the density infrastructure layers so the tree looks like this.

    We also want to change the name of the individual layers from the default generated layer names. In this case we want to remove the "(Mean)" label from the end, as all our aggregated layers are of type Mean. To do this double click the layer label to put it into edit mode and delete the "(Mean)" from the end of the label.

    Now we can simply delete all the folders as we no longer require them as this data collection only has a few layers, and folders are not necessary to organize them. To delete the folders select them and right click and choose Remove. Once your layer tree looks like the following click save.


  8. That’s it now we can preview our newly created data collection. Click the Publish button to launch the data collection publish tool.


    Select “Stand Alone URL” from the drop down box. Copy the web address shown by selecting it and right clicking Copy. Open up a new browser tab and right click in the URL text box and select Paste and hit return. Your newly created data collection containing Boston Flood data is displayed.

    You can also embed it in your website by selecting “Show Full Screen Link” and copying and pasting the HTML code shown into your webpage which I have done here in this blog entry:

+ Full Screen

No comments:

Post a Comment