2

Is there any database (Gov data or private) or web service that map Longitude and Latitude to US state?

I have the specific Longitude and Latitude of a location and would want to identify the state that this location is in. Then repeat this for thousands and millions of records.

whuber
  • 69,783
  • 15
  • 186
  • 281
RomeoQNgo
  • 21
  • 2

1 Answers1

2

Download the state boundary shapefiles from US Census bureau.

Load the polygon shapefiles into SQL using Shape2SQL.

If you don't already have a geography column on your points table, add it.

Do a spatial join using code similar to this.

Glorfindel
  • 1,096
  • 2
  • 9
  • 14
Kirk Kuykendall
  • 25,787
  • 8
  • 65
  • 153