Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sorry if this isn't strictly a GIS question. I want to know if there's a public database of US streets and US States that I can simply connect to (e.g. JDBC) and run SQL queries. For example, I want to find all the streets named "California" in the state of California. I've read about Gisgraphy and OpenStreetMaps and Geonames, but I don't see how to do the kind of query I'm talking about.

share|improve this question
Which database you want to use? If it is OK to use Postgres and PostGIS, then you can use osm2postgis for this. You can then easily connect your database using JDBC driver – thelastray Mar 7 '13 at 4:56
I may be wrong but you can try through WMS and sql query through wms (…) – Sunil Mar 7 '13 at 5:13

I very much doubt there is any such thing - SQL database servers aren't really suitable for this kind of public-facing surface. For example, Denial of Service attacks are usually pretty trivial to construct if you allow arbitrary SQL.

There are other APIs (e.g. the overpass API and nominatim) for OpenStreetMap, but not SQL.

share|improve this answer

If by public database you mean public server, I agree with BradHards. You still can donwload the USA .osm file and use it for free (it is a "collaborative effort", which makes it quite public). Then you extract the data to a postgis/postgresql database and you can send as many requests as you want!

Pay attention to the fact that osm2psql (or the equivalent you will use) may have particular options for geocoding...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.