GED2MAP Program Info (Genealogy)

Lately, the GED2MAP Program is where I’ve been spending my coding time. Follow the link and it will take you to the app in a new window/tab.

Data migration between systems and applications has always been my ‘niche’. I’ve had a chance to do a lot with IGES & STEP back when I was doing computer graphics in the automotive industry. I’ve also worked on projects cleaning up and migrating massive amounts of data between systems during my early telephony days. My family has been involved with genealogy research for years, so a program using the GEDCOM format felt as if it would be a good place to start.

This program is a proof of concept for a web front-end sitting on top of a back-end database. I wanted to write something using ASP.NET. Since I’ve aleady done a few Visual Basic programs, I went with VB code-behind. A few years ago I worked on a project out in California that tracked ‘call before you dig’ type tickets and took an interest in Geocoding, which made me think of Google Maps.

I wrote the GED2MAP Application, which allows a user to upload a GEDCOM file from their genealogy database and create a Google Map with markers for their ancestors.

It’s been tested on IE8/9 and Google Chrome. It doesn’t behave very well with Firefox.  Beyond that, I don’t think I’ll spend much more time in this code.  Like I said, it’s a proof of concept, and I’d like to move on to learning something new.

The Code

The front-end is ASP.NET with VB code-behind, and the database is MSSQL.  I used Microsoft Visual Web Developer 2010 Express for coding.

After uploading a GEDCOM file onto the server, the code parses the file to make sure it’s valid and to retrieve relative data.  Once all of the people and location have been read, they are inserted into the database (PEOPLE, PLACES tables) using a DataSet and TableAdapters.  The TableAdapters handle the load/update functions of the database.

After the database has been populated, new locations are Geocoded using the The Google Geocoding API to get the LAT/LONG for that location.  The coordinate results are returned from Google in JSON format and the PLACES table is updated with the coordinates, or flagged as having been checked but no results returned from the Geocoding.

Once the locations have been Geocoded, an HttpRequest is sent to retrieve the PEOPLE and PLACES info from the database for the USERID that is currently logged in .  The page that receives the  HttpRequest uses an SqlConnection /SqlCommand to directly query the database, and another JSON string of the results is built and returned.

The map is created using the Google Maps JavaScript API V3. Map markers are then generated for each person that the user currently has loaded in the database under their USERID.

I’ve pre-loaded the database with a GEDCOM file I stumbled across for Abraham Lincoln. If there is no current USERID, the demo data for Abe will be displayed.

When a user logs out, and then come back in, they don’t need to re-load their GEDCOM file again because their previously uploaded data is already stored in the database.

If different USERIDs have people that share a common location, Geocode requests are only performed for those locations that have not been previously resolved.

I picked a fairly complex app to write because I wanted it to cover a little bit of everything.  I’m pretty pleased with the way it turned out. If you need a programmer, please let me know. I might be your guy.