Global Mapper v25.0

Syntax for epsg_codes.txt

TeeGee
TeeGee Global Mapper UserTrusted User
edited September 2009 in Projection Questions
Hi,

I'm tryinf to add the New Caledonia RGNC91/Lambert Datum and Projection to Global Mapper.
I visited the site of EPSG Geodetic Parameter Registry ( www.epsg-registry.org ), and I found this :

ProjectedCRS [RGNC91-93 / Lambert New Caledonia]
Code: EPSG::3163
Name: RGNC91-93 / Lambert New Caledonia

Base Geodetic CRS [RGNC91-93]
Code: EPSG::4749
Name: RGNC91-93
Type: geographic 2D

Geodetic Datum [Reseau Geodesique de Nouvelle Caledonie 91-93]
Code: EPSG::6749
Name: Reseau Geodesique de Nouvelle Caledonie 91-93

Ellipsoid [GRS 1980]
Code: EPSG::7019
Name: GRS 1980
Shape: Ellipsoid
Semi-Major Axis: 6378137 metre
Inverse Flattening: 298.257222101 unity

Prime Meridian [Greenwich]

Ellipsoidal CS [Ellipsoidal 2D CS. Axes: latitude, longitude. Orientations: north, east. UoM: degree]
Code: EPSG::6422
Name: Ellipsoidal 2D CS. Axes: latitude, longitude. Orientations: north, east. UoM: degree

Conversion Metadata
Projection Conversion: geographic3D to geographic2D
Source Geodetic CRS: RGNC91-93

Conversion [Lambert New Caledonia]
Code: EPSG::19981
Name: Lambert New Caledonia

Parameter Values

Parameter Name: Latitude of false origin: 21° 30' S
Unit of Measure: sexagesimal DMS
Sign Reversible: No

Parameter Name: Longitude of false origin: 166° E
Unit of Measure: sexagesimal DMS
Sign Reversible: No

Parameter Name: Latitude of 1st standard parallel: 20° 40' S
Unit of Measure: sexagesimal DMS
Sign Reversible: No

Parameter Name: Latitude of 2nd standard parallel: 22° 20' S
Unit of Measure: sexagesimal DMS
Sign Reversible: No

Parameter Name: Easting at false origin: 400000
Unit of Measure: metre
Sign Reversible: No

Parameter Name: Northing at false origin: 300000
Unit of Measure: metre
Sign Reversible: No

Method [Lambert Conic Conformal (2SP)]
Code: EPSG::9802
Name: Lambert Conic Conformal (2SP)
Operation is Reversible: yes

Method Parameters

Parameter Name: Latitude of false origin
Sign Reversal: no

Parameter Name: Longitude of false origin
Sign Reversal: no

Parameter Name: Latitude of 1st standard parallel
Sign Reversal: no

Parameter Name: Latitude of 2nd standard parallel
Sign Reversal: no

Parameter Name: Easting at false origin
Sign Reversal: no

Parameter Name: Northing at false origin
Sign Reversal: no

Cartesian CS [Cartesian 2D CS. Axes: easting, northing (X,Y). Orientations: east, north. UoM: m.]


Well. How may I handle all this stuff to write a line understandable by Global Mapper in epsg_codes.txt ?
The Global Mapper user's manual says : "You can add your own EPSG code definitions (or modify built-in ones) by modifying the epsg_codes.txt file installed in your Global Mapper installation folder. The format is described in the file header".
I must say that the format described is not very clear for a beginner like me, and the examples given are rather confusing...:confused:

Thanks,
TeeGee

Comments

  • global_mapper
    global_mapper Administrator
    edited August 2009
    TeeGee,

    Here is the line you would use for that projection:

    3163,Lambert Conformal Conic,RGF-93,meters,FIRST STANDARD PARALLEL=-20.666666667,SECOND STANDARD PARALLEL=-22.333333333,CENTRAL MERIDIAN=166,ORIGIN LATITUDE=-21.5,FALSE EASTING (m)=400000,FALSE NORTHING (m)=300000

    Note that the RGNC91-93 datum was not built-in for Global Mapper so I replaced it with RGF-93. Both datums are identical. I am adding built-in support for this datum and projection now, so if you are on v11 just let me know and I can give you a new build with built-in support.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TeeGee
    TeeGee Global Mapper User Trusted User
    edited August 2009
    Hello Mike,

    thanks for your quick response.

    I thought it would be more convenient to use "Init from EPSG" rather than "Load from file", because I thought that to complete the file epsg_codes.txt would make the new coordinate system directly available in the list of systems supported by Global Mapper at the first use of "Init from EPSG"

    This is not the case, and as I use the V11, I accept with pleasure your proposal to give me a new build with RGNC91 support.

    Thanks again (and thanks to Google translation, because I'm not very comfortable writing in English !).

    TeeGee
  • global_mapper
    global_mapper Administrator
    edited August 2009
    TeeGee,

    I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TeeGee
    TeeGee Global Mapper User Trusted User
    edited August 2009
    Mike,

    I tried the new build and I found RGNC91-93 under Lambert Conformal Conic Projection, but I still have to input manually the Attributes values, wich is longer than selecting "Load from file" or "Init from EPSG". Is'nt it possible to access directly to the right values ?
    Incidentally, I have noticed that there are some big and surprising differences between the parameter values given by EPSG Geodetic Parameter Registry (see my first post) and the ones given by Spatial reference ( http://spatialreference.org/ref/epsg /3163/html/ ) wich seem to be the right ones.

    Thanks

    TeeGee
  • global_mapper
    global_mapper Administrator
    edited August 2009
    TeeGee,

    With the new build you can do 'Init From EPSG' with 3163 and you should get the parameters from spatialreference.org (this is what I typically use). Is the 'Init From EPSG' not working for you?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TeeGee
    TeeGee Global Mapper User Trusted User
    edited August 2009
    Mike,

    Before I got the new build, I saved a .prj file based on the data from spatialreference.org (assuming that the scale factor was 1, there where no indications about this). Then, "Load from file" was working fine, and works fine with the new build.

    Before I wrote my first post, I tried "Init from EPSG", but this did'nt work until I inserted in epsg_codes.txt the line you gave me in your post (#2). I have not modified epsg_codes.txt since, but anyway, "Init from EPSG" works fine too with the new build.

    My question is : is'nt it possible to get directly the good attribute values when you select "Lambert Conformal Conic" then "RGNC91-93" ?

    I understood that the difference I noticed between EPSG Geodetic Parameter Registry and Spatialreference.prg come from the fact that the first ones are in sexagesimal degrees and the second ones are in decimal degrees.

    Thanks,

    TeeGee
  • global_mapper
    global_mapper Administrator
    edited August 2009
    TeeGee,

    The particular set of parameters used by the EPSG 3163 projection are certainly not the only ones possible when using the Lambert Conformal Conic projection and the RGNC91-93 datum, so those couldn't be automatically set when selecting both of those. If this was a projection in very wide usage them what would be done is a new projection named 'Lambert New Caledonia' would be added that implicitly used that set of parameters. However, I don't think this particular system is in wide enough use to warrant its own special projection entry, so the current 'Init from EPSG' method will have to suffice.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TeeGee
    TeeGee Global Mapper User Trusted User
    edited August 2009
    TeeGee,

    The particular set of parameters used by the EPSG 3163 projection are certainly not the only ones possible when using the Lambert Conformal Conic projection and the RGNC91-93 datum, so those couldn't be automatically set when selecting both of those. If this was a projection in very wide usage them what would be done is a new projection named 'Lambert New Caledonia' would be added that implicitly used that set of parameters. However, I don't think this particular system is in wide enough use to warrant its own special projection entry, so the current 'Init from EPSG' method will have to suffice.

    support@globalmapper.com

    Mike,

    The EPSG 3163 projections, known as "RGNC91-93/LambertNC (Lambert sécante)" is, since 23/05/2006, the unique official system for the whole territory of New Caledonia (including its dependencies : islands and economic zone), and replaces all the systems previously used (IGN53, IGN56, IGN72, ST84, ST87 and Noumea 74). See http://www.dittt.gouv.nc/portal/page/portal/dittt/geodesie_et_nivellement/referentiels_geodesiques (the DITTT is the direction in charge of topography for the government of New Caledonia).

    So, I think this warrant à special projection entry in Global Mapper.:)

    Thanks,

    TeeGee
  • global_mapper
    global_mapper Administrator
    edited August 2009
    I realize that may be the primary projection used in New Caledonia, but there aren't many users in New Caledonia. If I were to start adding special built-in projections for every region in the word the size of New Caledonia Global Mapper would quickly have thousands of entries to wade through!

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TeeGee
    TeeGee Global Mapper User Trusted User
    edited August 2009
    I realize that may be the primary projection used in New Caledonia, but there aren't many users in New Caledonia. If I were to start adding special built-in projections for every region in the word the size of New Caledonia Global Mapper would quickly have thousands of entries to wade through!

    support@globalmapper.com

    Hmm, Hmm... So, why not suggest to spatialreference.org to add, in their list of formats for each reference, a format "Global Mapper .PRJ" (the .PRJ format given in spatialreference does'nt work with Global Mapper) ? But maybe would they say that there are'nt enough users of Global Mapper to justify this special entry...:D

    Or maybe Global Mapper could implement such a formatted database on his own site, feeded by the contribution of users ?

    Thanks,

    TeeGee
  • global_mapper
    global_mapper Administrator
    edited August 2009
    TeeGee,

    Actually Global Mapper can load the PRJ format used on SpatialReference.org. However the PRJ file they have for EPSG 3163 just has "D_" for the datum name rather than the actual datum name, so that one doesn't work. If you instead copy and paste the 'Human Readable OGC WKT' to a PRJ text file that will load fine. Here are the contents of the PRJ file I created from that entry that loads fine:

    PROJCS["RGNC91-93 / Lambert New Caledonia",
    GEOGCS["RGNC91-93",
    DATUM["Reseau_Geodesique_de_Nouvelle_Caledonie_91_93",
    SPHEROID["GRS 1980",6378137,298.257222101,
    AUTHORITY["EPSG","7019"]],
    TOWGS84[0,0,0,0,0,0,0],
    AUTHORITY["EPSG","6749"]],
    PRIMEM["Greenwich",0,
    AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.01745329251994328,
    AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4749"]],
    UNIT["metre",1,
    AUTHORITY["EPSG","9001"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",-20.66666666666667],
    PARAMETER["standard_parallel_2",-22.33333333333333],
    PARAMETER["latitude_of_origin",-21.5],
    PARAMETER["central_meridian",166],
    PARAMETER["false_easting",400000],
    PARAMETER["false_northing",300000],
    AUTHORITY["EPSG","3163"],
    AXIS["X",EAST],
    AXIS["Y",NORTH]]

    Note normally the PRJ file entry would work, it is just broken on spatialreference.org for that particular projection.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TeeGee
    TeeGee Global Mapper User Trusted User
    edited September 2009
    Hello Mike,

    following your previous post, I have loaded the .prj file for EPSG 3060 (IGN72 Grande Terre), edited it, changed the DATUM["D_IGN72_Grande_Terre" in DATUM["IGN72 Grande Terre", but when I tried "Load from file" for this projection, I got the warning "Unable to load a projection from the file".
    Then, I copied the content of the "Human Readable OGC WKT" into a .prj text file, but the result was the same. It seems that all the .prj files referring to the "International 1924" spheroid give the same result.
    What can I do ?

    Thanks,

    TeeGee
  • global_mapper
    global_mapper Administrator
    edited September 2009
    TeeGee,

    The problem isn't the spheroid. Global Mapper has to know about a datum name before it can load it. Since the IGN72 Grande Terre datum wasn't built-in and you didn't have a custom datum added with that name GM didn't know what to do with the datum. I have gone ahead and added the IGN72 Grande Terre datum so now your PRJ file and EPSG codes should load fine. I have placed a new build at http://www.globalmapper.com/global_mapper11.zip with the change for you to try. Simply download that file and extract the contents into your existing v11.xx installation folder to give it a try. If you are using the 64-bit version, there is a new build available at http://www.globalmapper.com/global_mapper11_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • TeeGee
    TeeGee Global Mapper User Trusted User
    edited September 2009
    Thanks Mike,

    I would'nt like to bother you each time I have to work with old maps, so I'm learning to add custom datums by myself, but I want to be sure that I do it the right way.

    For example, I want to add the datum ST71 Belep.

    I found this on the web :

    EPSG 2997 PROJCS["ST71 Belep / UTM zone 58S",GEOGCS["ST71 Belep",DATUM["ST71_Belep",SPHEROID["International
    1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7],AU
    THORITY["EPSG","6643"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHOR
    ITY["EPSG","9122"]],AUTHORITY["EPSG","4643"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],P
    ARAMETER["central_meridian",165],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["fal
    se_northing",10000000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","2997"]] +proj=utm +zone=58
    +south +ellps=intl +towgs84=-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7 +units=m +no_defs

    So, I completed the "Create new datum window like this :
    Datum name : ST71 Belep
    Prime meridian : 0.0
    Datum transformation method : 7 parameters
    Shifts to WGS84 :
    XShift : -480.26
    YShift : -438.32
    ZShift : -643.429
    Rotation to WGS84 :
    X : 16.3119
    Y : 20.1721
    Z : -4.0349
    Scale correction to WGS84 : -111.7

    Is it correct ?

    Thanks,

    TeeGee
  • global_mapper
    global_mapper Administrator
    edited September 2009
    TeeGee,

    Yes that looks correct. The only thing that is tricky is that sometimes you have to negate the Rotation XYZ values as two different standards are used throughout the world. If you can use what is in the +towgs84 parameter from the PROJ4 definition you should be ok. Also, make sure your datum name matches the datum name used in the PRJ file so that you can then load the projection from a PRJ file.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com