proj4js / wkt-parser

parse all the wkt
Other
20 stars 15 forks source link

Fix axis calculation #20

Closed ahocevar closed 3 years ago

ahocevar commented 3 years ago

This pull request fixes the axis calculation. We have to check the second axis array entry for 'north', 'east', 'south', 'west', not the first. The previous version worked by chance when axis entries came in like

AXIS["Easting",EAST],AXIS["Northing",NORTH]

because 'east' is a substring of 'easting' and 'north' is a substring of 'northing'. But it failed in all other cases, like

AXIS["X",EAST],AXIS["Y",NORTH]

This pull request also makes the tests functional.