Reputation: 29
In ArcGis geological point represent in mssql database as hexa values
eg : 0x**7214**0000010C00000000004C0D4100000000004C0D41
I used mssql geospatial function as below
$query1="DECLARE @Point GEOMETRY
SET @Point = geometry::STGeomFromText('POINT (240000 240000)',0) INSERT INTO main (id, mname, pdata) VALUES (1,'update_1',@Point)";
but it retuns hexa values as 0x**0000**0000010C00000000004C0D4100000000004C0D41
first 4 characters are different from the required outcome , is there any otherway to get that ? I dont have much idea about geospatial function. String replace is not possible thanks.
I am expecting 0x72140000010C00000000004C0D4100000000004C0D41
Upvotes: 0
Views: 316
Reputation: 31193
I assume you're using SRID 5234, which is for Sri Lanka? In your STGeomFromText
you have 0 as the second parameter, which is the SRID. Set that to 5234 and you will get the correct output.
Upvotes: 1