0

I just started using Data Reviewer and went to compare two feature classes. A polygon of Parcels and a feature class of Points of addresses. I want to compare the address to ensure the address number is the same where they are on top of each other. The problem is that the Address field in the Parcels Feature Class is a string whereas the Address Feature class is an integer. I need to be able to convert the Addresses field in the points feature class to String just for this check.

Let me know if you need anymore information.

Edit 1: For the parcels feature class i have the address column with values such as 1164, 1160, Null, 1-19/1-26/3-1 , -/-, -/0/- (those are all the types total of 1062 values)

Then there is Address_number in the points feature class which is a long. filled with: Null and 1,3,542,6785,1234 etc. (all the types.).

  • 1
    How can an address such as "150 James St" be an integer? :) An example of address from the string field and from the int field, please! – Alex Tereshenkov May 14 '15 at 15:51
  • 1
    Examples from both tables would help. You appear to be specifically talking about the house number component of the address. It's unclear if you have a single field for the complete address in one but it's broken up in the other, or if it's broken up in both and you simply have an issue of the house number field in one table is string and in the other it's an int. That could be a CAST or just creating a new field and field calcing it to a numeric. If you have the whole address as a single string, you're heading down the parse road: gis.stackexchange.com/questions/146446 – Chris W May 14 '15 at 21:12
  • I added the extra information. to the main question, it looks like I need to convert the integer to a string. What would be the quickest way to do that? Using Model builder? Is there a tool that would allow me to do it? – Sharm May 15 '15 at 14:58
1

You could easily convert strings into integers if you have a source-target matrix with all the cases for strings you have. I have hard times finding a suitable integer for "-/-" and "-/0/-" cases. You could use Field Calculator in ArcMap for that. Look into the Code samples–math section of the Help page.

def Reclass(Address):
  if (Address == "/0/"):
    return 0
  elif (Address > "./7./):
    return 77
...

If it is a lot of work for you, you could start with a simple approach first. Just create a new integer field and then Calculate this field to be the string field you have. All those values that can be treated as integers will be written, those that contain any non-numeric values will be disregarded (you will be left with nulls for those rows).

  • I will try that next week at work. It looks like it will work. Just need to ensure that i can convert the the string to an int without breaking anything. I could just do the same and convert the int to a string no? – Sharm May 15 '15 at 19:05
  • You can do the same thing and calculate your string field to be with the values from the int field. – Alex Tereshenkov May 16 '15 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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