GeoSpatial – GIS File Formats


GIS file formats are the standards that are used to store the Geo-spatial data. These data formats are created by government entities, educational institution, geological information storage and service organization and etc.

There are many popular open source or proprietary formats available. Following are the most popular format which we are using in day today geography data.

  • Raster
  • Vector
  • Grid
  • Others

Raster

Raster data type consists of rows and columns of cells and each cell storing a single value. It uses color code RBG.  An external attribute table can be maintained each cell by rows. Raster data can stored in various formats such file-based structure of TIF, JPEG and etc. We can also use RDBMS to store this data as BLOB.

Vector

GIS data in vector format contains typical geometry shapes such as points, line, polygon and etc. to represents geological location or regions in the earth. Usually, vector data may also comes with the database that describes the attributes of the shapes. For instance, if we use point on a building the attribute database may have its address, phone number and etc. to provide additional details about that location.

To understand better about raster and vector, it is ideal to have a look at the below given image.

raster-vector-gis-i4Vector GIS has more flexible and simplicity to integrate in to the application. It is more developer friendly and simple to storage and use.

An Esri grid is a raster GIS file format used to represent elevation and it is developed by Esri.

There are two formats available now:

  1. A proprietary binary format
  2. A non-proprietary ASCII format

There are different organization and their software uses different formats to store GIS data. Below given list is taken from Wikipedia.

Raster:

Vector:

Other GIS data storage formats

Vector format, WKT and WKB are the useful GIS data storage and manipulation formats in SQL Server. We will learn about that in the next blog post.

SQL Server – Definition and Calculation for Spatial Data


In this blog post. I am just giving the introduction to the Geo Spatial data representation in general and for SQL Server.

Measurements

In the planar or flat-earth system, measurements of distances and areas are given in the same unit of measurement as coordinates. Using the geometry data type, the distance between (2, 2) and (5, 6) is 5 units, regardless of the units used.

In the ellipsoidal or round-earth system, coordinates are given in degrees of latitude and longitude. However, lengths and areas are usually measured in meters and square meters, though the measurement may depend on the spatial reference identifier (SRID) of the geography instance. The most common unit of measurement for the geography data type is meters

Geometry is a very complex data type. So, OGC-SFS defines two alternative standard notations to represent Geometry values:

  • The WKT (Well Known Text) notation is intended to be user-friendly (not really so user-friendly after all, but at least human readable).
  • The WKB (Well Known Binary) notation on the other side is more intended for precise and accurate import/export/exchange of Geometries between different platforms.

Well-Known Text Representation of Spatial Reference Systems

The definitions of the well-known text representations are modeled after the POSC/EPSG coordinate data.

Well-Known Binary Representation for Geometry

The WKB representation of a Geometry value is a continuous stream of bytes. It is obtained by serializing a geometric object as a sequence of numeric types drawn from the set {Unsigned Integer, Double} and then serializing each numeric type as a sequence of bytes using one of two well-defined, standard, binary representations for numeric types (NDR, XDR).

GML in SQL Server

The Geography Markup Language (GML) is the XML grammar defined by the Open Geospatial Consortium (OGC) to express geographical features. The geometry data type provides a method that generates a geometry instance from GML, an XML representation of geometric objects. SQL Server supports a subset of GML.

Full Globe in SQL Server

In SQL Server 2012, FullGlobe is a special type of Polygon that covers the entire globe. FullGlobe has an area, but no borders or vertices.

Spatial Reference Identifiers (SRID)

Spatial Reference System Identifier (SRID) is a unique value that is used to defined and identify a spatial coordinate system. This value id the most important value for any GIS application.

It can be created and implementation by any spatial vendors. But, we have the option to refer to those that are created and maintaining by authorities. Following are the most used SRID system.

Other similar referencing systems are

Because, we have to use proper coordinate system in our GIS application in order get accurate result with spatial data processing. For instance, we cannot use two different referencing systems to do any GIS calculations. In SQL Server, if you do so then it will return a null value.

SQL SERVER – Spatial shapes data


Shapes are the geometry objects that are used to draw an outline or it can be used as real geometry shape for calculation on top of maps (geography). There are 11 usable or instantiable shape objects available in SQL Server. But, we can use only 11 of them and the image shown here is used to quickly identify the instantiable objects mentioned in blue color. In general, child object type properties are inherited from the parent objects.

Spatial Data Hierarchy – Microsoft Image

SpatialDataHierarchyThese data types are splitting into two categories simple and collections.

Simple Types

  1. Point
  2. LineString
  3. CircularString
  4. CompoundCurve
  5. Polygon
  6. CurvePolygon

Collection Types

  1. MultiPoint
  2. MultiLineString
  3. MultiPolygon
  4. GeometryCollection

Geography Type

  1. FullGlobe

It is important to know that some of the methods are capable of handling only simple objects.  SQL Server follows the standards of OGC (Open Geospatial Consortium). The following links will give you detailed information about OGC standards and other GIS architecture details.

SQL Server – Spatial Data, an Introduction – Part 1


Spatial data is anything that has a geographical location associated with it.   Spatial data can be represented using points,lines, polygons and etc. Geographic Information System (GIS) is a system designed to collect, store, manage, view, and analyze spatial data, as well as associated attribute data.

GIS_PicMicrosoft SQL Server has got Spatial Data feature since the version 2008 and it is getting improvement with additional features that helps interacting with shapes in the maps. We ca use SQL Server spatial data to represents physical location by points or other shape of geometric objects.

SQL Server supports two spatial types and that are implemented as .NET common language runtime (CLR) data types.

  •  Geometry data type – It represents data in a Euclidean (flat) coordinate system

Geometry data type supports planar, or Euclidean (flat-earth), data. The geometry data type conforms to the Open Geospatial Consortium (OGC) Simple Features for SQL Specification version 1.1.0 and SQL MM (ISO/IEC 13249-3).

Euclideanmap

  •  Geography type represents data in a round-earth coordinate system.

It stores ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates.

Ellipsoid

This is just an introduction about spatial data in SQL Server. We will be learning about the geometry shapes and geography data and its usage in the upcoming blog posts.

Spatial Data


SQL Server has introduced Spatial Datatype (Geometry, Geography) in the SQL Server 2008 release. They are enhancing the feature to store , view and edit spatial data in SQL Server database.

MapPoint is the tool used to view and edit spatial data from the MSSQL Server database.

for more information about Mappoint visit below Microsoft site.
http://www.microsoft.com/mappoint/en-us/default.aspx