I have a SQL Server table of vector data (containing latitude, longitude, UComp and VComp columns), that I am trying to add as a layer to QGIS.

Here is a sample of the data in the SQL Server data table:

enter image description here

And the table design:

enter image description here

I have successfully connected to my database from QGIS and also created the geometry columns table.

What data should I be adding to the [f_geometry_column], [coord_dimension] and [geometry_type] columns in the geometry_columns table?

  • Please edit the question to include your images as images, not URLs (folks are more likely to look at them that way). – Vince Aug 14 '14 at 3:59
  • f_geometry_column = name of the column whit geometry data, coord_dimension = value of dimension of gemetry (2d = 2, 3d = 3) and geometry_type = type of geometry (POLYGON, POINT, LINESTRIG, etc) check this compsci.wm.edu/SciClone/documentation/software/geo/gdal-1.9.0/… – phipex Aug 29 '14 at 18:24
  • You have two competing things going on - on one hand you are storing a lat/lon as decimal values. Nothing wrong with that as such, but... on the other hand you are creating a geometry_columns table which is intended to indicate what table column is being used to store data as (instead) a 'geometry'/'geography' data type. A 'geometry'/'geography' data type is different... not simply a numerical data column being used to store geographical information. In sql server create a new column specifically for this - and the data type should be 'geometry' or 'geography' depending on some other details. – Rostranimin Oct 26 '16 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.