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

Morten Hulden morten at ngb.se
Sat Nov 9 14:44:59 EST 2002


On Fri, 8 Nov 2002, Eric G. Miller wrote:

> On Fri, Nov 08, 2002 at 02:57:02PM -0800, Anton B. Ivanov wrote:
> > Hello GRASS gurus!
> 
> > PS. here's PROJ_INFO and PROJ_UNITS pair for my location. I work with
> > Martian data, so geoid is that of Mars and no datum has been specified.  
> 
> Mars?
> 
> > PROJ_INFO 
> >  ---------------------------------- 
> > name: Universal Polar
> > Stereographic 
> > proj: ups 
> > ellps: mars_iau2000 
> > a: 33961900.0000000000 
> > es:0.0117373700 
> > f: 169.8944472236 
> > lat_0: -55.0000000000 
> > lon_0: 0.0000000000
> > south: defined 
> > ------------------------------- 
> > PROJ_UNITS
> > ------------------------------- 
> > unit: degree 
> > units: degrees 
> > meters: 59272.9493611000
> 
> The above does not look correct, but I don't have experience with UPS.
> Anyway, the proj doc OF-90-284.ps says UPS has the following default
> parameters:
> 
> k: 0.9994 (scale factor)
> lat_0: 0
> x_0: 2000000 (meters)
> y_0: 2000000 (meters)
> lat_0: 90N (north) or 90S (south)
> south: ?
> 
> Units should be meters AFAIK. So,
> 
> unit: meter
> units: meters
> meters: 1.0
> 
> 
> g.setproj appears busted for this projection (can someone confirm?).

Yes.

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. Anyway, default values for lon_0 and
lat_0 should be fixed (though user can change the values when running
g.setproj). After patching g.setproj and m.proj should be recompiled.

Not sure if lat_0 really is necessary for this projection; the 'south' 
flag really should tell proj what it needs to know.



--- geo_init.c  2002-06-16 17:29:25.000000000 +0200
+++ geo_init.c_new      2002-11-09 20:40:03.000000000 +0100
@@ -1150,11 +1150,23 @@

        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][LAT0].deflt = 90.0;
+
+       TABLE[UPS][KFACT].ask = 1;
+       TABLE[UPS][KFACT].def_exists = 1;
+       TABLE[UPS][KFACT].deflt = 0.9994;
+
+       TABLE[UPS][X0].ask = 1;
+       TABLE[UPS][X0].def_exists = 1;
+       TABLE[UPS][X0].deflt = 2000000.0;
+
+       TABLE[UPS][Y0].ask = 1;
+       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