Skip to content

How to add new projection?  #371

@stephanbehm

Description

@stephanbehm

Hello everyone,

I am in the process of translating the "General Oblique Transformation"* from PROJ to proj4js and already finished a first version. Currently I am struggling with the integration and testing part. It seems that the projection is not loaded. After running "npm run test" my tests fail and manually running a simple projections result in the following output:

C:\Git\proj4js-testbed> node --trace-uncaught app.js

C:\Git\proj4js-testbed\node_modules\proj4\dist\proj4-src.js:1433
          throw error;
          ^
+proj=ob_tran +o_proj=moll +o_lon_p=40 +o_lat_p=50 +lon_0=60
Thrown at:
    at Projection.callback (C:\Git\proj4js-testbed\node_modules\proj4\dist\proj4-src.js:1433:11)
    at Projection (C:\Git\proj4js-testbed\node_modules\proj4\dist\proj4-src.js:1443:9)
    at Projection (C:\Git\proj4js-testbed\node_modules\proj4\dist\proj4-src.js:1429:16)
    at checkProj (C:\Git\proj4js-testbed\node_modules\proj4\dist\proj4-src.js:1993:14)
    at proj4$1 (C:\Git\proj4js-testbed\node_modules\proj4\dist\proj4-src.js:1997:18)
    at C:\Git\proj4js-testbed\app.js:5:14
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Module._load (internal/modules/cjs/loader.js:769:14)

For me this seems like the projection file is not found, but maybe I am wrong.

Steps:

I forked the whole library, see here for the complete code: https://github.com/StephanBehm/proj4js

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions