Ticket #142 (new enhancement)

Opened 8 years ago

Last modified 8 years ago

Proj4JS and Zoo Project API to access nzgd2kgrid0005.gsb file

Reported by: surf9 Owned by:
Priority: minor Milestone:
Component: Development platform Version:
Keywords: Cc:


Hi there

I am using zoo project WPS to allow re-projection. I'm aware Zoo project has an API with proj4js built-in. However, I haven't found yet how to pass it the following parameters:

+proj=nzmg +lat_0=-41.0000000000 +lon_0=173.0000000000 +x_0=2510000.0000000000 +y_0=6023150.0000000000 +a=6378388 +rf=297 +no_defs +nadgrids=nzgd2kgrid0005.gsb

I've instead added the official proj4js.js file and I am trying to re-project from NZMG to NZTM.

For source projection I used:

+proj=nzmg +lat_0=-41.0000000000 +lon_0=173.0000000000 +x_0=2510000.0000000000 +y_0=6023150.0000000000 +a=6378388 +rf=297 +no_defs +nadgrids=nzgd2kgrid0005.gsb

and destination projection I used:

+proj=tmerc +lat_0=0.0000000000 +lon_0=173.0000000000 +k_0=0.9996000000 +x_0=1600000.0000000000 +y_0=10000000.0000000000 +a=6378137 +rf=298.257222101 +no_defs +towgs84=0.000,0.000,0.000

I've added in the same directory as the proj4js.js file the nzgd2kgrid0005.gsb file.

Can proj4js.js using zoo project API use the nadgrids parameter to access the file locally without using a browser?

Does proj4js even support the nadgrids parameter?


Change History

Changed 8 years ago by djay

Unfortunately, the support for nadgrids was added to proj4js have not been included into the current ZOO-API version.

There is currently no way to load gsb files from the proj4js included in the ZOO-API.

We may investigate integrating it in the current version if you really need it and cannot switch to PROJ.4 using C language for instance for such a transoformation.

Now, I should admit that I wonder why we don't use PROJ.4 C-API and provide the relevant functions for reprojection in the ZOO-API. It would make the work easier and we are sure that everything will be in synch with your local PROJ.4 setup.

Note: See TracTickets for help on using tickets.


Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png