Created
June 28, 2017 19:54
-
-
Save fitnr/f7695ad3ff1d97fdeb6c18fa36ee956d to your computer and use it in GitHub Desktop.
simple SQL clipping for four sections of US: Alaska, contiguous states, Hawaii, and Puerto Rico & the USVI.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM table WHERE ( | |
( | |
lat > 51 AND lat < 71.5 | |
AND (( | |
lon > -180 AND lon < -129 | |
) OR ( | |
lon > 172 AND lon < 180 | |
)) | |
) OR ( | |
lat > 24 AND lat < 49.5 | |
AND lon > -125 AND lon < -66.5 | |
) OR ( | |
lat > 18.5 AND lat < 29 | |
AND lon > -178 AND lon < -155 | |
) OR ( | |
lat > 17.5 AND lat < 19 | |
AND lon > -68 AND lon < -64 | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment