1

Topic: Difference STGeomFromText from STPointFromText

Kind time of days!
At once I apologize for probably incorrect questions - I the beginner.
There are some methods creating an element geography (STGeomFromText, STPointFromText...).
As write on sites, method STPointFromText creates elements geography from the text on input:
SELECT @geo1 = geometry:: STGeomFromText (' POINT (3 4) ', 0).
1. Here a question, we like as transfer not the text, and object of type POINT or for what we then write "POINT ()"?
2. And why we then use STGeomFromText, instead of STPointFromText?
3. And here still write that STPointFromText creates an element geography Point from the text on input. An element geography Point, it that any subtype of type geography? Than they differ?

2

Re: Difference STGeomFromText from STPointFromText

STPointFromText - accepts on an input only a point (WKT a line representing point);
STGeomFromText - can accept on an input not only a point.
Well, and plus returns the first geometry, and the second geography (which in addition have, we tell so, different "accuracy").

3

Re: Difference STGeomFromText from STPointFromText

The grandfather;
And methods STLineFromText, STMLineFromText, STPolyFromText too return type geometry?
For the type job geography it is always used STGeomFromText?
By means of STGeomFromText we can in a column with type geography write down objects both Point, and LINESTRING, and POLYGON?

4

Re: Difference STGeomFromText from STPointFromText

The grandfather;
Here https://docs.microsoft.com/ru-ru/sql/t- … -data-type write that STLineFromText returns type geography. I will not understand a principle.

5

Re: Difference STGeomFromText from STPointFromText

Space data can be two types geometry and geography.
Different methods accept the different data on an input and return different types.
Begin here from here

6

Re: Difference STGeomFromText from STPointFromText

The grandfather, thanks! It was useful.
And if we use function STBuffer () which unites all points on the given distance result of its application will be POINT, or something another?