1

I am editing a vector layer in ArcMap 10.1 in the attribute table the no data value for some of my fields is -1.7976931348623157e+308. I would like to replace that with 0.

I attempted to use the Find and Replace function in the Table Options using the following settings:

Find what: -1.7976931348623157e+308
Text Match: Whole field
Search: Down
Match Case: Unticked
Search Only Selected Field(s): Ticked
Replace with: 0

Clicking either Find Next or Replace All results in an error message:

Search error
An invalid SQL statement was used.
An invalid SQL statement was used. [Ground_Dissolve2]
An invalid SQL statement was used. [SELECT * FROM Ground_Dissolve2 WHERE (htMN = -1.79769313486232e+308)

What does this error message mean and how do I replace -1.7976931348623157e+308 with 0?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Sep 9, 2013 at 16:36

2 Answers 2

3

Try the following:

  • You can use a simple python function in Field Calculator to do this update. I'm not sure if you have any other values that may be less than zero, if so you can just change if value < 0: statement. See example below:

enter image description here

  • An alternative would be to do a select by attribute on all records that are < 0, then simply field calculate 0 for those selected records.
answered Sep 9, 2013 at 18:57
2
  • I get a syntax error on line 4 def changeVal(value): if value < 0: return 0 else: return value and changeVal( !htMN! ) where htMN is the field to be changed Commented Sep 10, 2013 at 9:14
  • It was something to do with the number of spaces before the text on each line Commented Sep 10, 2013 at 9:55
0

Have you tried this ? Would this help ? There is a toolbox that might help you ? Check this out From/to String toolbox

If this is not what you looking for then there are others on that website.

answered Sep 10, 2013 at 14:15
1
  • It looks like artwork copied this from that Geospatial Analyst website. Sorry for duplicate. Commented Sep 10, 2013 at 14:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.