Select to view content in your preferred language

Automatically populating lat & long fields when a pt is captured in the field on GPS

2371
2
09-02-2010 06:50 AM
JasonWinoker
Emerging Contributor
Hi.  I am trying to figure out how to populate a field in an attribute table of a shapefile on a GPS using ArcPad 7.1.  When I capture a point, I want the X & Y (long & lat) fields to be populated with the coordinates automatically.  I know that the coordinates are imbedded in the file, and the fields can be populated by Calculate Geometry in ArcMap, but I want the fields of the shapefiles to automatically be (calculated and then) populated with the coordinates.

Any suggestions?  Or will I be stuck Calculating Geometry for the fields after I bring the files back to the office and put them onto my computer?

Jason
Tampa, FL
Tags (3)
0 Kudos
2 Replies
KhalidMehmood
Deactivated User
Hi.  I am trying to figure out how to populate a field in an attribute table of a shapefile on a GPS using ArcPad 7.1.  When I capture a point, I want the X & Y (long & lat) fields to be populated with the coordinates automatically.  I know that the coordinates are imbedded in the file, and the fields can be populated by Calculate Geometry in ArcMap, but I want the fields of the shapefiles to automatically be (calculated and then) populated with the coordinates.

Any suggestions?  Or will I be stuck Calculating Geometry for the fields after I bring the files back to the office and put them onto my computer?

Jason
Tampa, FL


There is a script on ArcScripts which may help you

http://arcscripts.esri.com/details.asp?dbid=16785
0 Kudos
by Anonymous User
Not applicable
Hi use this when initialising the form:

'---- If statement in the form initialisation to determine which coords to use
If Application.UserProperties ("AddPoint_ToolUsed")="addpoint" then
  objEFPageOneControls("EASTING").value = FormatNumber(Map.PointerX,2,-2,-2,0)'FormatNumber(Map.PointerX,2)
  objEFPageOneControls("NORTHING").value = FormatNumber(Map.PointerY,2,-2,-2,0)'FormatNumber(Map.PointerY,2)
  Application.UserProperties ("AddPoint_ToolUsed")=""
else
  objEFPageOneControls("EASTING").value = FormatNumber(GPS.X,2,-2,-2,0)'FormatNumber(GPS.X,2)
  objEFPageOneControls("NORTHING").value = FormatNumber(GPS.y,2,-2,-2,0)'FormatNumber(GPS.Y,2)
end if
0 Kudos