Sunday, February 12, 2017

Alternate approach to build Geographic Information Systems (GIS) Applications


GIS based Web Applications are very powerful and used extensively to make significant business decisions. Building a GIS based Web Application can be a challenge as it involves many client and server side technologies. In recent days, open source GIS has become very popular. Since some shops have already invested in Microsoft SQL Server, this can be used effectively for building powerful GIS solutions along with open source GIS tools.
Microsoft SQL Server supports various spatial functions. Detailed documentation can be found here.
SQL Server supports two spatial data types: the geometry data type and the geography data type.
  • The geometry type represents data in a Euclidean (flat) coordinate system.
  • The geography type represents data in a round-earth coordinate system.
Pick the right type based on your business needs. Write simple C# code to manipulate the data stored in SQL Server. You can export the stored SQL spatial data to GeoJSON files using tools like GeoJSON.NET. You can also use QGIS to connect directly to SQL Server and export the data to GeoJSON format. At the end we need GeoJSON format files which can be loaded and viewed in Google Maps using Google Maps JavaScript API.




The SRID (Spatial Reference System Identifier) value 4326 works well all across from SQL Server to Google Maps. For more details check here. In SQL Server Spatial, there are functions to check envelope angle and reorient the polygon if necessary.
Google Maps JavaScript API will allow you to load GeoJSON files and details can be found here. Google Maps JavaScript API also has an excellent Geometry Library which has several functions like a  given point falls inside a polygon or on the edge, etc.,
To summarize, a powerful GIS Web application can be built using SQL Server, QGIS, and Google Maps API.

All Blogs so far ...