NoiseMap Forums

NoiseMap Software => Hints and Tips => Topic started by: admin on July 02, 2014, 12:46:32 PM

Title: Shapefile with digital mapping. How do I convert just the Buildings to NM?
Post by: admin on July 02, 2014, 12:46:32 PM
I assume you loaded the Shapefile and when you tried to ‘convert layer’, NoiseMap tried to convert everything into buildings?  Of course, this doesn’t work.  You don’t want to convert roads or garden walls into buildings, so how do you separate the various elements of the digital map?

A Shapefile can contain any number of different sorts of objects, but if it has been properly assembled, then each object will have a ‘Feature Code’ that identifies the sort of object that it is. Feature codes may or may not be standardised, but this doesn’t really matter. 

First, you need to inspect the database element of the Shapefile.  This is essentially a large table with many columns and one row for each object in the file.  In NoiseMap, open the Shapefile. The ‘Define Shapefile Mapping’ dialog will open and you will see the list of column names in the Shapefile.  Many of these will not be meaningful, but look for one called something like ‘FeatureCode’ and in the Parameter box, select ‘Use As Layers’.  This will cause the features to be split into separate layers according to their Feature Code.  But it won’t tell you which code is used for what type of feature. Look for another column that is called Description or similar and select it. Under Object Type select All Object types and under Parameter, select Description.  You can have more than one object selected as a description, so if several columns look hopeful, select each of them as a description.

Once the Shapefile has loaded, you will see the map on the screen.  To work out which feature code is used for a Building, click on a building outline and open the Selected Object Properties box. Open the mapped object data at the bottom of the window and you will see that the values of the mapped columns are displayed.  This will let you make a list of the feature codes of interest.

Armed with this information you are ready to convert layers.  Go to View>Convert Layer and choose the type of object you want to convert a layer into.  For Buildings, you select Outlines. Click Next and under Outline Type, select Building. Choose how you want to get the heights.  Then under Layer to Convert, select the layer of interest.  You can select more than one layer, but be very careful only to select those of interest, as trying to convert an inappropriate layer into Buildings will cause problems, as NoiseMap has to go through many contortions to ensure that building outlines are properly connected into a ‘closed polygon’.  If they are not really building outlines, then the process could take hours and would come out with nonsense.

If you really want to play with the contents of a Shapefile, you can open the database element (file type .dbf) in Excel and look at the whole thing.  You could even add or combine columns, such as adding traffic flows to roads.  Unfortunately, Microsoft decided to remove the ability for Excel to save in dbf format from recent versions of Excel.  So if you want to do this, you will need to get a dbf add-in.  Some good ones are available, but be very careful to get this from a reliable source as many freebie add-ins come with a malware payload, as I have learned to my cost!