I was hoping to get some more information about the new Geospatial stuff in Alpha. I've been geocoding addresses on my development machine and was going to push all the information to my production machine, but I've run into some problems.
I am saving a latitude, longitude and location that Alpha creates from the GeogCreateLocation function. I went to export these three fields as Update statements (I wrote a quick php snippet to do this). Here is what I got when I exported the rows
The problem I'm having is that the hex value of location seems to be pulling out as a string.So I decided to just recreate the location value using the lat and the long. Here is where my discrepancy occurs.This is the data for row 394064:
Using the information from http://wiki.alphasoftware.com/MySQL-...+in+Version+11 I came up with this mysql statement and the following result:
Here's my question, Why are those two hex values different?
The information from PointFromText http://dev.mysql.com/doc/refman/5.6/..._pointfromtext suggests that the Spatial Reference ID (:SRID in the Alpha wiki) is involved in making the location value.Using the mysql functions x() and y() turn out the same latitude and longitude coordinates for BOTH hex values, so either one works for me. But It would be great if someone could chime in on the differences.
I am saving a latitude, longitude and location that Alpha creates from the GeogCreateLocation function. I went to export these three fields as Update statements (I wrote a quick php snippet to do this). Here is what I got when I exported the rows
Code:
[COLOR=#000000]UPDATE tm_prospects SET location = ��C�t�T��7����;@, latitude = '27.851204', longitude = '-82.632141' WHERE ProspectsID = 394064;[/COLOR]
Code:
ProspectsID latitude longitude location 394064 27.851204 -82.632141 0x0000000001010000009AA443F174A854C0C537B984E8D93B40
Code:
select PointFromText(CONCAT('POINT(',CAST(-82.632141 AS CHAR(32)), ' ',CAST(27.851204 AS CHAR(32)),')')) as location location 0x0000000001010000007D5D86FF74A854C071395E81E8D93B40
The information from PointFromText http://dev.mysql.com/doc/refman/5.6/..._pointfromtext suggests that the Spatial Reference ID (:SRID in the Alpha wiki) is involved in making the location value.Using the mysql functions x() and y() turn out the same latitude and longitude coordinates for BOTH hex values, so either one works for me. But It would be great if someone could chime in on the differences.
Comment