SQLTeam.com | Weblogs | Forums

Geographical data in ssis sqlserver

Hi all,

i need to analyse a GEOGRAPHICAL DATA like polygon, point,line ssis and sql server can resolved this??
my file data is in .SHP can convert them in csv?

Welcome

What type of analysis do you want to do with them

to clean my data(polygone,point,line) , and to create my datamarts and datawarhouse
I like to knoww How to use geometry datatype in SSIS
can i used ODATA source in ssis to import ùy file.shp

There's a difference between geography and geometry data. Your post title says "Geographical".

If you are dealing with earth coordinates, latitude and longitude, then you need to use the Geography data type in SQL Server. These values are mapped to a sphere.

If you're using x and y coordinates for graphing purposes, then use Geometry. These are mapped to a plane.

Both types support points, lines, polygons, etc.

1 Like

sorry yes ,
i used Geography data , the issue is how to imported them (file.shp )in SSIS
image

Unfortunately I don't have an answer for that. Depending on the input format, you might be able to map it to a table column of Geography type:

About halfway down that page there's discussion about OGC specifications. Other formats include Well-Known-Text (WKT) and Well-Known-Binary (WKB) formats. If your source data in CSV format does not represent the geo data in such a way, you can import it as plain text/varchar data into a staging table. You'd then add a step to transform that varchar data into Geography, using SQL statements.

You may also need to look at your Spatial Reference Identifer, if there is one in your data. The best advice I have is to read all of the associated links in the link above. I'm not an expert on importing Geography data from text files, but if you can construct raw data to look like a Geo type then you should be able to convert it.