| 15 | [[BR]] |
| 16 | Here is how the general WKT mapping code works:[[BR]] |
| 17 | - read the WKT and try to detect the flavor[[BR]] |
| 18 | - decode the WKT sub elements: system, datum, ellipsoid, unit, ...[[BR]] |
| 19 | - generate a complete CS-Map definition based on all the gathered sub elements.[[BR]] |
| 20 | - validate the definition. At this stage if we succeed, we could stop because we have a valid system we can work with[[BR]] |
| 21 | - use this valid definition and with the help of the WKT mapping file try to map each sub element with a CS-Map element from its dictionary files: ellipsoid name, datum name, coordinate system name[[BR]] |
| 22 | - return either the definition generated from the WKT or the CS-Map definition with the names from the CS-Map dictionaries[[BR]] |
| 23 | [[BR]] |
| 24 | For those 84 that failed, it can be the syntax of the WKT that comes from PROJ4, a unit that CS-Map doesn't know about ...[[BR]] |
| 25 | If I randomly pick up a failed system like CH1903 which WKT is:[[BR]] |
| 26 | [[BR]] |
| 27 | PROJCS["unnamed",[[BR]] |
| 28 | GEOGCS["Bessel 1841",[[BR]] |
| 29 | DATUM["unknown",[[BR]] |
| 30 | SPHEROID["bessel",6377397.155,299.1528128]],[[BR]] |
| 31 | PRIMEM["Greenwich",0],[[BR]] |
| 32 | UNIT["degree",0.0174532925199433]],[[BR]] |
| 33 | PROJECTION["Hotine_Oblique_Mercator"],[[BR]] |
| 34 | PARAMETER["latitude_of_center",46.9524055555767],[[BR]] |
| 35 | PARAMETER["longitude_of_center",7.4395833333842],[[BR]] |
| 36 | PARAMETER["azimuth",90],[[BR]] |
| 37 | PARAMETER["rectified_grid_angle",90],[[BR]] |
| 38 | PARAMETER["scale_factor",1],[[BR]] |
| 39 | PARAMETER["false_easting",600000],[[BR]] |
| 40 | PARAMETER["false_northing",200000]][[BR]] |
| 41 | [[BR]] |
| 42 | there is no unit for the PROJCS system. That must be why CS-Map fails to just decode the string and extract its sub elements.[[BR]] |
| 43 | That means we are not even be at the stage of trying to generate a full definition or even to map it to a CS-Map name.[[BR]] |
| 44 | Another random system "panama" shows the same problem, no unit is available in the WKT for PROJCS.[[BR]] |
| 45 | So, it looks like the syntax of the failed WKTs is the reason of the failure.[[BR]] |