Reproject between datums with GridShift

Apr 11, 2011 at 10:16 PM

Is anyone using DotSpatial to convert between datums using GridShift?  For example, between NAD27 and NAD83 using NADCON or doing HARN (between NAD83 and NAD83 HARN)?  If you are using it, did you have to generate your own "Datums.xml" file?  The datums.xml built in has no datums of type "GridShift".  Am I missing something?



Apr 18, 2011 at 3:23 PM
Edited Apr 18, 2011 at 3:24 PM

Let me think.  My memory was that for doing grid shifts, you need two things.  Firstly, the software needs to be aware of the grid shift table.  I believe there is a list of tables that are stored in binary and added automatically.  You should be able to add a new table to that list.  There is code for creating a table from several file based formats that are used with proj4.  So if you have a new table, you would use the appropriate table reading class in order to load the content into memory and then it can be added to the list of datum shift tables.  The second part of the operation is that the ProjectionInfo class has a GeographicInfo, which in turn has a Datum.  On the Datum class, you will need to set the DatumType to GridShift, and you will have to specify the name of your table in the list.

It's been a while, so see if that gets you on the right track.  If not I can maybe dig up some specifics later.