[GRASSLIST:4921] Re: Problems with importing polar data

Morten Hulden morten at ngb.se
Sun Nov 10 01:02:44 EST 2002


On Sat, 9 Nov 2002, Eric G. Miller wrote:

> On Sat, Nov 09, 2002 at 09:56:25PM +0100, Morten Hulden wrote:
> > 
> > On Sat, 9 Nov 2002, Morten Hulden wrote:
> > 
> > > If proj does not have built-in default values for k0, x0 and y0 for this
> > > projection then src/libes/geo_init.c needs patching in order to add
> > > k-factor, false easting and northing.
> > 
> > I checked by running external proj with -V: Looks like proj really uses
> > k_0=0.9994, x_0=2000000 and y_0=2000000 as default values for UPS
> > projection.

...

> I'd think patching geo_init.c to set all the defaults and not ask except for
> lat_0 and south.  I would just ask for south and then set lat_0
> appropriately, but g.setproj is too scary for words... Still requires
> user to know to use 90/-90 and n/y for south?, respectively...

also found out proj ignores lat_0 value in ups projection. so simplified
patch below. no need to ask for latitude at all and no need to touch the 
too-ugly-for-words g.setproj.

the patch is purely cosmetic to make PROJ_INFO display real values used by
proj - ups projection should work correctly as is, even if values 
PROJ_INFO are misleading.

better take this discussion over to developers' list.  


--- geo_init.c  2002-06-16 17:29:25.000000000 +0200
+++ geo_init.c_new      2002-11-10 06:57:09.000000000 +0100
@@ -1150,11 +1150,16 @@

        TABLE[UPS][LON0].ask = 1;
        TABLE[UPS][LON0].def_exists = 1;
-       TABLE[UPS][LON0].deflt = 20.0;
+       TABLE[UPS][LON0].deflt = 0.0;

-       TABLE[UPS][LAT0].ask = 1;
-       TABLE[UPS][LAT0].def_exists = 1;
-       TABLE[UPS][LAT0].deflt = 55.0;
+       TABLE[UPS][KFACT].def_exists = 1;
+       TABLE[UPS][KFACT].deflt = 0.9994;
+
+       TABLE[UPS][X0].def_exists = 1;
+       TABLE[UPS][X0].deflt = 2000000.0;
+
+       TABLE[UPS][Y0].def_exists = 1;
+       TABLE[UPS][Y0].deflt = 2000000.0;

        TABLE[UPS][SOUTH].ask = 1;





More information about the grass-user mailing list