0

I have this line in python to compute First X coordinates into the Field Calculator from each polyline:

!Shape!.firstPoint.X

Then, when I inspected the attributes I see this rare thing:

Example

You may see that I have two fields (StartX and InicioX), both with the same Python code, one is a string field and the other a Float one. But the computed VALUE is wrong :(

You can clearly see that "spatially" the features are situated in different positions, but on its computed X Value are the same.

Could someone explain me that?

Does anybody know any other way to compute this X,Y start and end coordinates from lines?

Thanks for your time.

  • Remove the selection and repeat the operation. It may simply be a case of the number of decimals being shown, which can be changed for the field – user681 Jul 29 '14 at 9:29
  • Removed selection, started a new ArcMap session, tried to export to a new shapefile... But nothing changes. – juasmilla Jul 29 '14 at 9:50
  • Is the issue that they are all the same value? Your question is a bit unclear – GISKid Jul 29 '14 at 15:40
  • 2
    Have you run the Check Geometry or Repair Geometry tools? – nmpeterson Jul 29 '14 at 16:13
  • As @nmpeterson suggested, there was something wrong with the geometry, just needed to repair. Thanks! – juasmilla Jul 29 '14 at 16:17
3

Writing my comment as an answer:

It looks to me like there was an issue with the geometry of the shapefile, so running Repair Geometry should (and did) solve this problem.

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.