How to validated geography polygon in SQL server 2008?

后端 未结 2 1543
[愿得一人]
[愿得一人] 2021-01-15 19:03

In the SQL Server 2012 there is methods to validate geography \'.IsValidDetailed()\' and to change orientation \'.ReorientObject (geography)\'.

I am working with SQ

2条回答
  •  生来不讨喜
    2021-01-15 19:17

    I found solution, SQL Server Saptial Tools

    http://sqlspatialtools.codeplex.com/

    Followings are the methods solved my problem.

    IsValidGeographyFromText(string inputWKT, int srid)

    Check if an input WKT can represent a valid geography. This function requires that the WTK coordinate values are longitude/latitude values, in that order and that a valid geography SRID value is supplied. This function will not throw an exception even in edge conditions (i.e. longitude/latitude coordinates are reversed to latitude/longitude).

    SqlGeography MakeValidGeographyFromText(string inputWKT, int srid)

    Convert an input WKT to a valid geography instance. This function requires that the WKT coordinate values are longitude/latitude values, in that order and that a valid geography SRID value is supplied.

提交回复
热议问题