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

Eric G. Miller egm2 at jps.net
Sat Nov 9 23:03:53 EST 2002


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.
> 
> So patching geo_init.c is strictly not necessary and would only result in
> a PROJ_INFO that reflects the values that proj would use anyway.
> 
> But when running g.setproj it's important to give latitude=90 or -90. 55N 
> for this projection does not make sense.

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...

Index: geo_init.c
===================================================================
RCS file: /grassrepository/grass/src/libes/gis/geo_init.c,v
retrieving revision 1.6
diff -r1.6 geo_init.c
1284c1284,1292
< 	TABLE[UPS][LON0].ask = 1;
---
>         TABLE[UPS][KFACT].def_exists = 1;
>         TABLE[UPS][KFACT].deflt = 0.9994;
> 
>         TABLE[UPS][X0].def_exists = 1;
>         TABLE[UPS][X0].deflt = 2000000;
> 
>         TABLE[UPS][Y0].def_exists = 1;
>         TABLE[UPS][Y0].deflt = 2000000;
>         
1286c1294
< 	TABLE[UPS][LON0].deflt = 20.0;
---
> 	TABLE[UPS][LON0].deflt = 0.0;
1290c1298
< 	TABLE[UPS][LAT0].deflt = 55.0;
---
> 	TABLE[UPS][LAT0].deflt = 90.0;

-- 
static const char signature[] = 
	"Copyright (c) 2002 Eric G. Miller <egm2 at jps.net>";




More information about the grass-user mailing list