Having some issues using Proj4 API's in TG to convert lat/longs to X,Y coordinates. If there's a better way to do this, please push me in the right direction, I"m a NOOB.
Code is like this:
Proj4Projection proj4 = new Proj4Projection();
proj4.InternalProjectionParametersString = "+proj=longlat +no_defs";
proj4.ExternalProjectionParametersString = "+proj=lcc +datum=NAD83 +lon_0=-98 +lat_1=36d46 +lat_2=35d34 +lat_0=35 +x_0=600000 +y_0=0 +to_meter=0.3048006096012192 +no_defs";
Vertex v = proj4.ConvertToExternalProjection(lon, lat);
I have tried changing the culture to Invariant temporarily, but then the conversion API's return null strings on these.
I have set up an environment variable PROJ_LIB to point to the PROJ_LIB folder which is in the folder that contains my program binary as previously suggested, with the relative nadgrid files unzipped into there.
I get an exception on proj4.Open() code which says:
"Initialize Ellps Failed!"
Would appreciate some assistance getting this worked out. I am essentially attempting to convert lat/longs to X,Y in International Feet.
Thanks in advance for any help.