5

Right now I am doing address resolution with a ESRI file called Street_Addresses_US.loc which works. I have been given a shape file that contains streets that was compiled by the state. Is it theoretically possible that I could use this streets shapefile for address resolution? Or do shapefiles never contain the necessary data for address resolution?

By address resolution I mean put in an address get a lat / long. ArcEngine 10 C# VS2010.


ESRI support suggested converting a shapefile into a geodatabase file (.gdb) or (.mdb) so I went looking for that, and I'm going to post it here for the community


 public void ShapeFileToAccess()
    {
        //output
        IWorkspaceName pWorkspaceName = new WorkspaceNameClass() as IWorkspaceName;
        pWorkspaceName.WorkspaceFactoryProgID = "esriCore.AccessWorkspaceFactory"; 
        pWorkspaceName.PathName = "c:\\Data\\test.mdb"; //this is the output file that is created
        IFeatureClassName pFeatureClassName = new FeatureClassNameClass();
        IDatasetName pDataSetName = pFeatureClassName as IDatasetName;
        pDataSetName.WorkspaceName = pWorkspaceName;
        pDataSetName.Name = "test"; 

        //input
        IWorkspaceName pInShpWorkspaceName = new WorkspaceNameClass() as IWorkspaceName; 
        pInShpWorkspaceName.PathName = "c:\\Data\\Shapefiles"; 
        pInShpWorkspaceName.WorkspaceFactoryProgID = "esriCore.ShapefileWorkspaceFactory"; 
        //define the dataset 
        IFeatureClassName pFCName = new FeatureClassNameClass() as IFeatureClassName;
        IDatasetName pShpDatasetName = pFCName as IDatasetName;
        pShpDatasetName.Name = "Roads.shp"; //this is your input file 
        pShpDatasetName.WorkspaceName = pInShpWorkspaceName; 

        //convert 
        IFeatureDataConverter pShpToFc;
        pShpToFc = new FeatureDataConverterClass();
        pShpToFc.ConvertFeatureClass(pFCName, null, null, pFeatureClassName, null, null, "", 1000, 0); 
    }

2 Answers 2

6

It is possible that the attributes necessary are available in the shapefile to do a reverse address lookup, but it's not required. I've seen shapefiles that didn't have any data other than the shape, so there's no guarantee that enough data will be available for you to perform a lookup with the shapefile alone.

3
  • What steps / program would I use to determine if a particular shape file has the capability to do geocoding / address resolution?
    – patrick
    Commented Oct 6, 2010 at 21:06
  • 1
    As Brad mentioned in his answer, there are usually additional fields included in the shapefile that indicate further details about the feature, such as the Lmin and Lmax for street numbering. I have only personally worked with street center line layers or parcel layers that included a specific street number and street name (which makes it easy to do a quick SQL query to get the feature id and zoom to that feature), though I imagine there are numerous other methods used to get to a unique location without those details. Commented Oct 6, 2010 at 21:12
  • 1
    So, to actually answer your question, open up the shapefile in ArcMap or the DBF in Excel/Foxpro/dBase and look for those fields that would indicate a street name/number. If you see only numbers in the data, there's probably not enough information in that shapefile for you to do a reverse geocode. Commented Oct 6, 2010 at 21:50
6

the data you are looking for is the field names for street name, adress range right and adress range left. usually in seperate fields as ... Lmin, Lmax the direction the street was digitized determines the left and right side which puts the min values at the approriate end of the segment. It is very time consuming to re-engineer a shape file to have correct address data (finding all the little problems). Sometimes it is easier to start from scratch to collect the data in a format, with the accuracy standards, and local anomaly information needed (such as non-standard addressing, and non-standard naming conventions). Also it is probably much easier to find existing data that may only contain a few alignment problems and relatively few anomaly problems through open source or purchase license. such as openstreetmap.org or the esri data and maps. or even arcgisonline Hope this helps

Your Answer

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

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