I'm trying to update latitude and longitude data per individual station for a lab I'm working for.

Here's some code I have that's supposed to assign any all bay stations of a certain name the appropriate GPS coordinates.

Whenever I try to run it arcMap simply says there was an error processing the data.

Field Calculator

  • 3
    Right off the cuff your python structure is malformed. Read up about proper indentation. – Thomas Oct 6 '15 at 16:09
  • 2
    Also, include the actual error message as that will usually help determine what the issue is. – Evil Genius Oct 6 '15 at 16:14

long is a reserved word (a type) in python so I used in_long instead.

code block:

def update_nones(in_long,bay_statio):
    if bay_statio==0:
        return -84.9250031
        return in_long



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.