Saturday 28 October 2017

Looking for web service to get State, County, and Place FIPS codes from an address


I have been searching for a few days to find a web service that will provide the State, County, and Place FIPS codes from an address input. Most of the services I've found only provide a State, County, and Census block code.



For example, for the address 4139 S 143rd Cir, Omaha, NE 68137 would return:


State: 31 County: 05 Place: 537000



Answer



It may be a two step process. Geocode the address, get the xy from the geocode result and then send the xy to a county web service with FIPS. You will want to intersect the point.


http://tigerweb.geo.census.gov/ArcGIS/rest/services/Census2010/State_County/MapServer/1/query?text=&geometry={"x":-122,"y": 41,"spatialReference":{"wkid":4326}}&geometryType=esriGeometryPoint&spatialRel=esriSpatialRelIntersects&returnGeometry=false&outFields=STATE,COUNTY&f=json


Returns:


{"displayFieldName":"BASENAME","fieldAliases":{"STATE":"STATE","COUNTY":"COUNTY"},"fields":[{"name":"STATE","type":"esriFieldTypeString","alias":"STATE","length":2},{"name":"COUNTY","type":"esriFieldTypeString","alias":"COUNTY","length":3}],"features":[{"attributes":{"STATE":"06","COUNTY":"089"}}]}


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...