My city has an open data section listing crimes and accidents amongst other things. They include approximate time, type of crime, etc. The way they formatted the location Looks something like this "42XX street, city, state, zip", how would I geocode an address that doesn't have a a complete street number? If at all possible. I'm looking to incorporate census tract data as well so I need good spatial accuracy.

  • You mean the "street number" (actually called a "primary number") has literal Xs in it? I have a potential answer for you, I just want to be clear.
    – Matt
    Apr 3, 2013 at 23:06
  • The spatial accuracy of census tracts is a LOT more generalized than the approximate crime locations -- even block groups are a lot larger.
    – Erica
    Apr 4, 2013 at 0:24
  • 4
    You should be able to just replace the XX with 50 in most circumstances and have whatever geocoding service return a point near the middle of the street segment (won't work always - but not necessarily any better options). It would be odd to have accident addresses disseminated like this, they are almost always given at the nearest intersection.
    – Andy W
    Apr 4, 2013 at 0:43
  • Yes, the primary literally has X's in it. I would think they would also just give the nearest intersection, but that's not the case.
    – figsology
    Apr 4, 2013 at 1:36
  • The most precise way might be to look in the USCB's ZCTA files of the TIGER data. They have the coordinates of streets, and I believe primary number ranges too, as well as which side of the street the numbers fall on. You could then do some interpolation... automating that with GIS software though... hmmm, not sure.
    – Matt
    Apr 4, 2013 at 4:36

1 Answer 1


Lets say that you want to geocode the following address:

42xx Ashland Ave Baltimore MD 21205

One method would be to add the previously mentioned "50" to get 4250. Geocoding this will get you pretty close.

Another method, since you know that it will definitely be between 4200 and 4299, would be to attempt validating each address. Yes, all 100 of them. The outcome of this method would be the following:


Those are currently the only valid address on Ashland Ave in Baltimore between 4200 and 4299. Running that through a geocoder could give you an exact lat/lon pair for the addresses.

So, it just depends on what you would like to end up with. If just an approximate lat/lon will work, stick with the first method. If you want to be more precise by determining the potential valid addresses, go with method two.

A quick google search for "address validation" will give you a number of address validation services. I work for one called SmartyStreets.

  • Just to add to this answer, I think you have to solutions, convert those addresses to block ranges and geocode that way, so you will aggregate those stats by block, or return return all results for that block range.
    – Jamie
    May 9, 2013 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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