Select to view content in your preferred language

Collecting Data with Editform at predefined points in a shapefile

663
1
04-26-2011 05:08 PM
CharlesHuxtable
Emerging Contributor
Hi,
I have an ArcPad Editform associated with a shapefile. I want to be able to import the GPS locations (points) into my shapefile and go to each pre-defined point and collect data using my Editform. I can't figure out how to do this. Can anyone help?
Tags (3)
0 Kudos
1 Reply
GarethWalters
Deactivated User
Do you only have ArcPad or can you utilise ArcGIS aswell? Can you provide any lines of data for us to have a look at?

As always there are many ways to skin a cat:

  • My first step would probably convert the file using ArcGIS - Create Featureclass from XY Event Table

  • If you only have ArcPad then a script could help you out. You would access the txt file through the CreateAppObject("File") method, and then you would have to read each line into the DBF

Console.clear

'Create Variables
dim MyFile, MyLine, MyArray, i, X, Y

'Create File Object
Set myFile = Application.CreateAppObject("File")
'Open the Text File
MyFile.Open "C:\Temp\Goofa.txt"

'Now loop through until you get to the end of the fiel
While not MyFile.EOF
'Set the vaiable of each line
MyLine = MyFile.ReadLine
'Set the Array Up by splitting the line of Text by a comma
MyArray = Split(MyLine, ",", -1, 1)

'Now look at each part of the text string to pull out the coordinates
For i = 0 to UBound(MyArray)
   'Console.print("i: " & i & " == " & MyArray(i))
   If i = 11 then          'These values refer to my data. Use the Console.print to find out which section you need for the coordinates.
    X = MyArray(i)
   End If
   If i = 12 then
    Y = MyArray(i)
   End If

Next

'Create the shapefile Point from the coordinates of each line without showing the EditForm
Call Map.AddFeatureXY(X, Y, False)
Wend

MsgBox "Done"

Not a complete answer yet but hopefully if you throw some more information at to this then we will get a solid result.

Cheers,

Gareth
0 Kudos