Hi,
I’m looking to add some newer proj4 systems to the existing ones. Eg. JGD2000 epsg 3100.
Can I just add these to the gdal csv entries or is it more involved than that?
Thanks,
Damian
Hi,
I’m looking to add some newer proj4 systems to the existing ones. Eg. JGD2000 epsg 3100.
Can I just add these to the gdal csv entries or is it more involved than that?
Thanks,
Damian
Hi Damian,
You can create and maintain your own table mapping EPSG codes to Proj.4 strings. Whenever you encounter a new EPSG code, simply convert it to its corresponding Proj.4 string and consistently use this format in the ThinkGeo component.
Thanks,
Ben
Hi Ben,
What I would like is for the Proj4Projection.GetEpsgParametersString(srid) to return the newer systems that have been added. I am assuming that you read these in by interrogating the gdal csv tables and hence if I update the csv table then I will have the new proj4 strings automatically in my code without having to release any new code.
Is it possible?
Thanks,
Damian
Hi Damian,
They are not from gdal csv tables. We maintain a epst-proj4 table ourselves which is embedded in ThinkGeo.Core. So I’m afraid you do need to add a custom table yourself to support it.
Thanks
Ben
Hi Ben,
Is it true then that v14 has the same version of your proj4 table as v10? Seems some of the projections I am being asked to include are fairly old. E.g. JGD2000 epsg 3100 has no proj4 string when I query it.
Regards,
Damian
Damian,
The proj4 string in the table have been updated a couple times in the last 2 years, but it’s been a while since we added new epsg numbers to the list. Thanks for the heads-up, I’ve added this to our list and we will make it happen in the future versions.
Thanks,
Ben
Hi Ben,
I look forward to the update.
Small follow-up here. Ref the helper functions Proj4Projection.ConvertProj4ToPrj and Proj4Projection.ConvertEpsgToPrj, are these also tables that you have internally maintained or are they functions that use the proj4 string to convert? Basically when I export shapefiles for these newly added proj4 projections, I’ll need the appropriate text for the .prj file.
Regards,
Damian
Hi Damian,
Proj4Projection.ConvertProj4ToPrj, which is renamed to Projection.ConvertProjStringToWkt in newer versions, uses proj4 string to convert without using any tables. So, it would just work if you had a valid proj4 string.
Proj4Projection.ConvertEpsgToPrj, which is renamed to Projection.ConvertEpsgToWkt, needs to check the internal table to convert epsg to Proj4String first. This is not the ideal method for you.
Thanks,
Ben