MasterMap Road and Building Polygons

By Jorge Garcia de Bustos

Posted in Technology Blog on October 23rd 2010 12:52

One of the main enhancements in our GGP 2009 desktop GIS release is the ability to create overlays that read and write geospatial data stored in Oracle Locator, SQL Server 2008 and PostGIS datasets. When I use the word “dataset” I am not only referring to tables, but also to database views.

Database administrators have traditionally used views as a way of filtering the contents of a table, returning only the records that verify certain conditions. Using GGP 2009, we can use views to show only certain kinds of features in a large geospatial table, such as MasterMap road and building polygons, ignoring everything else.

Our MasterMap Loader application creates several tables to store the different components of MM geospatial data. From these tables, TOPOGRAPHICAREA stores the polygon data. If we use the GGP menu option to inspect MasterMap features, we’ll see that all building polygons share some data attributes:

  • The FEATURECODE column has values 10021 for proper buildings and 10062 for glasshouses
  • The MAKE column has value ‘Manmade’

Likewise, all road polygons share some common attributes:

  • The FEATURECODE column has values 10172
  • The DESCRIPTIVEGROUP is ‘Road Or Track’
  • The MAKE column has value ‘Manmade’

These common attributes dictate the visual styles when MasterMap is rendered. All these conditions can be confirmed consulting the OS MasterMap Topography Layer user guide, available as a PDF document from the Ordnance Survey website.

With this information, a user with the right database privileges can now create the views VEW_MASTERMAP_BUILDINGS and VEW_MASTERMAP_ROADS, which will expose only the polygons that match the conditions listed above:

CREATE VIEW VEW_MASTERMAP_BUILDINGS (
FID, FEATURECODE, VERSION, VERSIONDATE, THEME, CALCULATEDAREAVALUE,
CHANGEDATE, REASONFORCHANGE, DESCRIPTIVEGROUP, DESCRIPTIVETERM,
MAKE, PHYSICALLEVEL, PHYSICALPRESENCE, POLYGON, LOADDATE, MI_PRINX
)
AS SELECT
FID, FEATURECODE, VERSION, VERSIONDATE, THEME, CALCULATEDAREAVALUE,
CHANGEDATE, REASONFORCHANGE, DESCRIPTIVEGROUP, DESCRIPTIVETERM,
MAKE, PHYSICALLEVEL, PHYSICALPRESENCE, POLYGON, LOADDATE, MI_PRINX
FROM TOPOGRAPHICAREA WHERE
FEATURECODE IN (10021, 10062)
AND MAKE = 'Manmade';

CREATE VIEW VEW_MASTERMAP_ROADS (
FID, FEATURECODE, VERSION, VERSIONDATE, THEME, CALCULATEDAREAVALUE,
CHANGEDATE, REASONFORCHANGE, DESCRIPTIVEGROUP, DESCRIPTIVETERM,
MAKE, PHYSICALLEVEL, PHYSICALPRESENCE, POLYGON, LOADDATE, MI_PRINX
)
AS SELECT
FID, FEATURECODE, VERSION, VERSIONDATE, THEME, CALCULATEDAREAVALUE,
CHANGEDATE, REASONFORCHANGE, DESCRIPTIVEGROUP, DESCRIPTIVETERM,
MAKE, PHYSICALLEVEL, PHYSICALPRESENCE, POLYGON, LOADDATE, MI_PRINX
FROM TOPOGRAPHICAREA WHERE
FEATURECODE = 10172
AND DESCRIPTIVEGROUP = 'Road Or Track'
AND MAKE = 'Manmade';

Once the views are ready, we can create two new overlays that connect to each view, and render them using GGP:

Read more: ,

You must be logged in to post a comment.

css.php