Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a friend with a bit of a problem. He has 1000+ shape files mapping paddocks and being used for precision agriculture. He's recently discovered the base station positions used to create these maps were incorrect.

The base stations are being updated, which means each shape file needs an x and y offset applied to all features. The offsets vary but are typically small (~1-2 meters). The correction needs to be applied with sub-centimeter accuracy.

I've been brought on board to automate the process. I've written a C# application that can accurately calculate the offsets to apply to each file. What I'm looking for is something to apply these offsets for me. Either a C# library or an external command line application would be ideal. I could implement something myself but I don't want to re-invent the wheel.

Does anyone have a suggestion for achieving this?

I've read that I can use ogr2ogr and specify a different false easting/northing for the source srs, although I'm not sure if this will provide the accuracy I require. I also don't know what projection the files are using.

Any help would be greatly appreciated!

share|improve this question
How are the base stations being updated? Some algorithm or statistics being applied to the coordinates? Somebody going out with a GPS and collecting new coordinates? Or are the updates literally up 0.5 meters, left 0.38 meters? –  Baltok Mar 29 '12 at 17:48
Take a look at gis.stackexchange.com/questions/21256/… –  Mike T Mar 30 '12 at 0:51
While you are at it, convince your friend to stop managing 1000+ shapefiles, and start learning how to use a spatial database, such as PostGIS. –  Mike T Mar 30 '12 at 0:56
@RyanDalton - Yep, someone has surveyed each base station with a GPS to collect the new coordinates. I'm converting the difference in positions to an x any y offset in meters to apply at the paddock. –  malloc Mar 30 '12 at 9:40
malloc- I might have to agree with @MikeToews about storing all that data in a centralized spatial database. It seems like having all of the data located in one central source could be advantages not only for recordkeeping, but any kind of analysis of overall effectiveness. There is no reason you couldn't associate each "route" (a current shapefile) with a tractor ID, then export the shapefiles to the tractors as needed. It's likely a much more elegant (better?) long-term solution that can acheive the same short-term results. –  RyanDalton Mar 30 '12 at 16:06
show 2 more comments

2 Answers

You can probably apply the offsets using OGR (GDLA) for C# (http://trac.osgeo.org/gdal/wiki/GdalOgrInCsharp)

You'd have to write a C# script that loads the shapefile, gets the x and y coordinates (ORGPoint class has this), offsets it using your algorithm and then set x and y coordinates (OGRPoint.setX and OGRPoint.setY i believe). Im not sure if you'd have to the output to a new shapefile or if you can just edit it and it will save the changes, try testing it on a single shapefile first.

share|improve this answer
add comment

This recent post "how-to-easily-shift-all-features-in-a-vector-dataset" is very similiar to your question. You might find it useful.

shift all features

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.