Problem with NAD27

2 messages Options
Embed this post
Permalink
michogar

Problem with NAD27

Reply Threaded More More options
Print post
Permalink
Hi all,

I am working with proj4js and I have encoutered this problem. In the function deriveConstants, do this:

      if (this.nagrids == '@null') this.datumCode = 'none';
      if (this.datumCode && this.datumCode != 'none') {
        var datumDef = Proj4js.Datum[this.datumCode];
        if (datumDef) {
          this.datum_params = datumDef.towgs84.split(',');
          this.ellps = datumDef.ellipse;
          this.datumName = datumDef.datumName ? datumDef.datumName : this.datumCode;
        }
      }

but the NAD27 datum definitions is:

"NAD27": {nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat", ellipse: "clrk66", datumName: "North_American_Datum_1927"},

he do not have the towgs84 term like the NAD83 for example:

"NAD83": {towgs84: "0,0,0", ellipse: "GRS80", datumName: "North_American_Datum_1983"},

and when the function attemp to calculate the datum_params, he gives the error:

Error: datumDef.towgs84 is undefined
Archivo de origen: http://op915190.mma.es/WmsViewer/javascript/lib/proj4js/lib/proj4js.js
Línea: 680

Thanks to all.


--
# michogar
# Analista Programador SIG
# GNU/Linux Counter 462666

Una visión personal:
http://michogar.blogspot.com

El día a día:
http://twitter.com/michogar



_______________________________________________
MetaCRS mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/metacrs
Mike Adair

Re: Problem with NAD27

Reply Threaded More More options
Print post
Permalink
Micho,

Proj4js currently only supports the 3 and 7 parameter datum
transformations (i.e. using the towgs84 parameter) and as such the NAD27
Datum definition should probably be removed from Proj4js.  The issue is
that the grid files specified by the @ parameters are very large and
would be difficult to handle on the client side in a reasonable way.

Mike

Micho Gar wrote:

> Hi all,
>
> I am working with proj4js and I have encoutered this problem. In the
> function deriveConstants, do this:
>
>       if (this.nagrids == '@null') this.datumCode = 'none';
>       if (this.datumCode && this.datumCode != 'none') {
>         var datumDef = Proj4js.Datum[this.datumCode];
>         if (datumDef) {
>           this.datum_params = datumDef.towgs84.split(',');
>           this.ellps = datumDef.ellipse;
>           this.datumName = datumDef.datumName ? datumDef.datumName :
> this.datumCode;
>         }
>       }
>
> but the NAD27 datum definitions is:
>
> "NAD27": {nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
> ellipse: "clrk66", datumName: "North_American_Datum_1927"},
>
> he do not have the towgs84 term like the NAD83 for example:
>
> "NAD83": {towgs84: "0,0,0", ellipse: "GRS80", datumName:
> "North_American_Datum_1983"},
>
> and when the function attemp to calculate the datum_params, he gives
> the error:
>
> Error: datumDef.towgs84 is undefined
> Archivo de origen:
> http://op915190.mma.es/WmsViewer/javascript/lib/proj4js/lib/proj4js.js
> Línea: 680
>
> Thanks to all.
>
>
> --
> # michogar
> # Analista Programador SIG
> # GNU/Linux Counter 462666
>
> Una visión personal:
> http://michogar.blogspot.com
>
> El día a día:
> http://twitter.com/michogar
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> MetaCRS mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/metacrs
>  

--
   Michael Adair
   Senior Software Architect
   DM Solutions Group Inc.

   Office: (613) 565-5056 x26
   [hidden email]
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca


_______________________________________________
MetaCRS mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/metacrs