Is it possible to get the census block, block group, and tract information for a nominatim query? I know I can get the long/lat and then map back into the census hierarchy but it would be sweet to do both in one step if its possible.

asked 05 Nov '13, 18:34

sbryfcz's gravatar image

accept rate: 0%

edited 05 Nov '13, 18:35

Can you please explain what 'census' means in your opinion? I don't know it from the Nominatim context :/

(21 Nov '13, 16:07) iii

Yeah. I'm not sure nominatim currently supports it. As you may (or may not be aware), the USA is divided into small groups for purposes of taking the census. There is a hierarchy of census tracts (largest) to census blocks (smallest) that break the USA up into groups. These tend to change much less frequently (and are better defined) than zipcodes. In addition, regular surveys are published for demographic data with these census boundaries. It would be great to get this data from the geocoder so that additional data (ex. Survey data, Demographics) can easily be appended for data analysis.

(21 Nov '13, 16:47) sbryfcz

AFAIK, this kind of census data was not uploaded into the OSM database, and before someone does it, I believe there should be some discussion on the question of if this kind of data is adequate for inclusion. My answer does not discuss this issue, however, even if the data is/was in the OSM database.

I am doing something similar for Brazilian census data - all of the territory is divided into "census sectors" ("Setores Censitários" in portuguese), and one given latitude/longitude falls inside exactly one sector. No sector crosses the boundary between two cities, therefore it is possible to establish some kind of hierarchy (sector - city - state - country).

I am solving the problem of returning the census data using a separate PostGIS schema, loaded with the sector's geometries provided by IBGE in Brazil, and after querying the Nominatim and getting the result's coordinates, I do a second query on the census schema using st_within() or similar functions to get the census sector and upper hierarchies. Then the web server compiles everything into nice JSON strings and sends to the client machine for display...

So far, it has been easier than initially thought, since IBGE provides the sectors in nice SHP/DWG files, easily loadable into a PostGIS database with some custom scripts. Your mileage may vary...

permanent link

answered 21 Nov '13, 20:54

MCPicoli's gravatar image

accept rate: 24%

I like this idea, and I think it may be more appropriate than putting it directly into the OSM schema. A lot of countries have this sort of structure and it seems like a generic approach. Care to share your scripts?

(21 Nov '13, 21:00) sbryfcz

Sorry, while the data (from OSM and IBGE) only requires attribution, the development is internal to my company (and still experimental), can't share the scripts at least until the product is finished and published.

(21 Nov '13, 21:04) MCPicoli

Completely understand. Thanks for the idea though.

(21 Nov '13, 21:20) sbryfcz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Nov '13, 18:34

question was seen: 1,653 times

last updated: 21 Nov '13, 21:20

powered by OSQA