I’m trying to figure out how to get the max and min values for lat and long points from a geometry data field. I’m guessing you have to first convert it to a string us STAsText but I’m not sure. Let me know if you have any better idea?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I took a different approach.
1. I converted the geometry field to a string
2. Parsed the string and converted it to XML
3. Stored it in a separate field
4. Ran an xml query off of that field.
The geom field in my case is storing areas for cities. In some cases the areas do not overlap, so actually have separate areas.
Here is the query I used to convert to XML.
Here is the query to get the max and min for lat and long