Tag Info

New answers tagged

0

You can use Geohashing (Geohasing) You have to create a geohash for every POI in your table. And then based on the precision that you choose you can use LEFT(your_geohash_column,'c1','c3','c4','c5','c6',c7','c8') Where the c's are the 8 neighbors from the center calculated by your desired precision. Keep in mind that you are limiting the results with the ...


1

Here's a variation on how I have tackled this in the past. I have added a grp and seq columns to the @Geo to demonstrate how to build multiple lines and get the order of the points in the line correct. The seq could alternatively be datetime. DECLARE @Geo table(grp int, seq int, long float, lat float) INSERT INTTO @Geo( grp, seq, long, lat ) values ...


1

You can use dynamic SQL to build the string to feed into STGeomFromText(). I don't think you'll be able to do it relationally (though, to be fair, this is not my expertise). This will get you going until (if) something better comes along. declare @Geo table(long float, lat float) insert into @Geo( long, lat ) values ( -121.527200, 45.712113 ...


0

To answer at least some of this: Area codes do cross state boundaries in rare cases. There is a tiny bit of the Oregon 541 area code that is shared with California: https://en.wikipedia.org/wiki/Area_codes_541_and_458 Zip codes do very rarely cross state boundaries, or have really odd zip code assignments compared to their geographical assignments. One ...



Top 50 recent answers are included