Product: MapInfo AnySite Desktop
Version: 9.0, 8.8.1
Platform: Not Platform Related
AnySite Desktop and a method to create multiple rings on a server-based point layer and shade with data from the parent point table.
User has a table in SQL server with x, y coordinate columns and a "Score" column, with values from 1 to 5.
Goal is to create a 9 mile ring for every point and then shade these rings using the "Score" field found in the point table.
How can this be accomplished?
Here is what we would suggest:
This looks long and scary, but it took longer to type this up and the actually do the process.
In this example we are using data from an MDB instead of an MSSQL data base – but it should be pretty much the same.
Also – in regards to the dynamics of the source data – if the score changes, we will see that change reflected in the map. However, the rings will not be auto generated if the coordinates change. However, in the steps provided below – the 9 mile rings could be quickly regenerated and then a new table could be saved over the old, resulting in an updated circle layer.
Step 1. Create a server layer to the data through the configurator.
Tools >> Database Manager >>Add
I believe that we already know how to accomplish this, If not I have attached a white paper that walks through the process with a little more detail.
Step 2. In the configurator set a connection to the data as a sever layer -- be sure to set the ID values since this will play a part in the final linking process.
Layers >> Server >> new
You will also want to be sure to do all the other things involved with adding a point layer. Making it a point layer, checking reporting on and searching on, etc….
Step 3. For right now I would add the layer to a Brand New Map Preference Just to make this first step easier.
In the configurator I would go to Maps >> standard >> New
I would even call the map preference “delet me later” so that I know to get rid of it – I always misspell the delet so it screams out at me.
I would then just add the Utah_data as the only layer on the map.
I would keep the configurator open, but then I would launch AnySite.
Than go to layer control and change the map preference to the “delet me later” map preference.
Then go to Map >> view entire layer >> and select the Utah data layer.
The map should zoom out to the entire point layer.
Use the multi site tool to draw 9 mile rings around all the dots.
This might take a little while depending on the number of dots that are there. When I did it – it took about 5 minutes – I do have a bit of a powerful system so have faith that it is working.
As a side note, sometimes I have replaced this step with creating the rings within MapInfo Pro using the update column command in the mapbasic window. Update table [table name] set obj = createcircle(lat,long,9) -- this actually goes fast, but does require leaving the AS world.
In AnySite, use the File >> Save Layer
Select the multi_site analysis layer and give it a location and name. Don’t click on the Include Site Information checkbox.
The save might take some time as well.
Also an important thing to note is that if you are attempting to replace an table that already exists you will get a prompt to append the data rather than replace the data. Don’t select the append option.
On my system it took about ½ hour to save the layer – so have faith that it is working
To help out I attached the resultant ring layer so that you don’t have to wait as long.
When the layer is saved you can remove the layer from the map
Edit >>Remove Study Area….
The Best thing to do is actually close AnySite for the next few steps
There will need to be an index built for the Rings table after it is created. The index can be built easily through the configurator through.
Tools >> Modify Mapinfo Tab file…
You should be able to navigate to the rings table – open the table and create an index for the Name Column by highlighting the field and checking the index checkbox.
If you get an error message like below – that means that you need to do the index.
Retune to the configurator and add this new table as a layer.
Layers >> New
Important thing to do here is to be sure that you check the link to server data check box in the Type section.
You will want to make sure to go to the address button and set up the Name column as the ID column for the table.
In the configurator create a linked layer between the Data on the Server and the Rings table that was just created.
Layers >> Linked >> New
Click on the Edit button to specify the server source – which will be the Data containing the Score value – in the case the Utah data.
Set the Download popdown to the Utah_Rings layer.
Click on the Address button to specify the column in the data that will be used as the column that the facilitate the link between the two data sets.
Important side note….the boundary table that is being linked to has to have the ID column as the first column in the data. No exceptions. The way we create this table and save it just happens to create the table in the structure we need it to be. If you are ever bringing in a table from a different source, be sure that the unique identifier field is the first field and has and index built on it.
Be sure to do all the layer stuff here – go to type and specify it as a region layer and go to styles and set up a border and fill (I would use none)
So we will now have a layer that has the data linked from the SQL server to the rings.
Step 9. Getting the data to have colors – there are two things that can be done here.
Option 1. Use the Thematic shading feature to color the ring layer.
Note: we don’t have to add the ring table as a layer to any of the maps if we don’t want to.
In the Configurator go to Thematics >> Range Shades >> New
Give the thematic a name.
Select the Linked layer as the data source
Select the Variable popdown to the Score field.
The format is optional since the Score values are small
Template and Method popdowns offer some choices – they will be discussed next
Click on the O.K. button and the Thematic will now be available the next time you click on the Thematic button in AnySite.
The thematic may not be what we want to we will need to create a new Thematic template to meet our needs.
In the configurator go to Thematics >> Range Templates >> New
Here you will Name the template and create the ranges and assign the colors.
Note that the ranges are 1-to-1, 2-to-2, etc… That is to make sure that the single score values are in their correct categories. The legend Text allows you to put in the desired label for the score.
At this point it would be valuable to see if the previous GIS person had already created a template for the thematic and they you could use that one to save you some time.
When template is created click on the O.K.
Return to the Thematics >> Range Shades section of the Configurator.
Highlight the Ring Score Thematic and click on the Edit button.
Set the Template popdown to the Ring Thematic template we created.
Set the Method to Custom Ranges to lock in the values we provided.
Return to AnySite.
Click on the Thematic button.
Click on the Thematic and the map will be updated with the new thematic colors and ranges.
The edit thematic properties can be used to adjust the colors – but it would be best to see if the previous GIS tech had actually created something to use.
Option 2: Set the ring layer to be shown as individual values on the map.
In the Configurator go to Layers >> linked.
Click on the Ring layer and click on the Edit button.
Click on the Individual Styles check box.
Click on the Styles button and the interface will now be changed:
Set the Style Base On popdown to Score and the scores found in the data will be listed.
Now you can assign a unique color to each of the scores found in the data. You may also set up a specific name to show in the legend to reflect a more informative label to the score than just the number. You can also re order the values if needed.
This layer will now need to be added to the desired map through the configurator
Maps >> locate and highlight the desired map preference >> Edit
Click on the Add button, or first click on the layer you want to insert the new layer above then click on the Add button, and select the new layer to be added to the map.
If needed you can click on the layer and use the Up and Down buttons to move the layer to the desired location.
When done you should be able to click on the O.K. button re-launch AnySite and see the new layer displayed.
You may need to play with the color schemes in the individual values to get the desired look. This can be done with the Edit Layer Properties feature in the layer control side panel.