View Full Version : USGS Data and Map_Polyfill

11-04-2008, 09:07 AM
Is there a way to query the USGS_DB for county, state, etc. boundaries for use in MAP_POLYFILL?

11-05-2008, 10:13 AM
Hi SpinMan,
I have to do some research into this, but are if you're just trying to fill a state or county on the USGS map, you can do this directly from the map procedure.

MAP, /Exact, Center=[-98, 37], Zoom=8, Projection=15, $
Data='usgs_db', Select={,state:'ID', county:-1}, $
Color=5, /Noerase, /Filled

Here I'm selecting the state, and use the /Filled keyword. Note county has to be set to -1 when filling a state.

If you're trying to fill multiple states/counties call the map procedure multiple times.

Let me know if this is why you needed the data for polyfill.


11-05-2008, 10:30 AM
As a for instance, i'd like to color how each county voted yesterday. With the commands you show (good stuff, btw), the entire state is filled. Yes, this is the type of thing I'm looking for.

11-06-2008, 10:40 AM
Hi, Try this code out:

MAP, Range=[-81,39,-75,43], Data='usgs_db', $
Select={,state:'PA', county:-1}, $
/Axes, /Gridlines, Gridstyle=2, Gridlong=5, Gridlat=1

MAP, Range=[-81,39,-75,43], Data='usgs_db', $
Select={,state:'PA', county:1}, $
/Axes, /Gridlines, Gridstyle=2, Gridlong=5, Gridlat=1, /Filled, /NoErase

Offhand, I'm not entirely clear as to how the numbering of counties goes... I read in the MAP routine documentation about the FIPS code. This may mean more to you than me :)

11-06-2008, 12:38 PM
Thanks for your help. With your hint, I went onto the USGS site


and got the list of the FIPS codes for all the counties. You form a 2xN array for the counties you want to color where each row is [[state],[county]].