[GRASS-dev] Creating location from values stp problem

Markus Neteler neteler at itc.it
Sun Oct 22 04:26:16 EDT 2006


Hi,

I *think* that I have fixed it (applied to CVS):


Index: proj-parms.table
===================================================================
RCS file: /grassrepository/grass6/general/g.setproj/proj-parms.table,v
retrieving revision 2.1
diff -u -r2.1 proj-parms.table
--- proj-parms.table	1 Oct 2006 21:18:05 -0000	2.1
+++ proj-parms.table	22 Oct 2006 08:19:18 -0000
@@ -48,6 +48,7 @@
 LCC:LAT0=ask,23.0;LAT1=ask,33.0;LAT2=ask,45.0;LON0=ask,-96.0;X0=ask,0.0;Y0=ask,0.0
 LEAC:LAT0=ask,55.0;LAT1=ask,0.0;LON0=ask,20.0;SOUTH=ask,nodfl
 LEE_OS:LAT0=noask,-10.0;LON0=noask,-165.0
+LL:LAT0=noask,0.0;LON0=noask,0.0
 LOXIM:LAT0=ask,0.0;LAT1=ask,45.0;LON0=ask,20.0
 LSAT:LAT0=ask,0.0;LON0=ask,20.0;SNUM=ask,1;SPATH=ask,1
 MBTFPP:LAT0=ask,0.0;LON0=ask,20.0
@@ -91,6 +92,7 @@
 SINU:LAT0=ask,0.0;LON0=ask,20.0
 SOMERC:KFACT=noask,1.0;LAT0=noask,46.952405556;LON0=noask,7.4395833333;X0=noask,600000.0;Y0=noask,200000.0
 STERE:KFACT=ask,1.0;LAT0=ask,0.0;LATTS=ask,0.0;LON0=ask,20.0
+STP:LAT0=noask,0.0;LON0=noask,0.0
 TCC:LAT0=ask,0.0;LON0=ask,20.0
 TCEA:KFACT=ask,1.0;LAT0=ask,0.0;LON0=ask,20.0
 TISSOT:LAT0=ask,0.0;LAT1=ask,-30.0;LAT2=ask,45.0;LON0=ask,20.0


Please test it (STP and LL).

I have also 'indent'ed main.c of g.setproj. A few compiler warnings are
still there.

Markus

On Sat, Oct 21, 2006 at 01:30:56PM -0500, Huidae Cho wrote:
> This problem occurs also with Lat-Long (LL), so I had to create a new
> location with "g.proj -c".  When "grass -text" creates a new LL
> location, it says that the user needs to run g.setproj to properly use
> any projection related modules, but it fails because LL is missing from
> proj-parms.table.  This is certainly not a good experience for new
> users.
> 
> Huidae
> 
> 
> On Sat, Oct 21, 2006 at 01:47:10PM +0200, Markus Neteler wrote:
> > Hi,
> > 
> > concerning the State Plane (STP) problem, here the error message:
> > 
> > g.setproj
> > 
> > Please specify projection name
> > Enter 'list' for the list of available projections
> > Hit RETURN to cancel request
> > >stp
> > ERROR: Projection stp is not specified in the table
> > 
> > Using a debugger, I found that (the new)
> > $GISBASE/etc/proj-parms.table
> > is analyzed by get_proj_parms() in lib/proj.c. Since STP
> > isn't listed there, it fails with
> > 
> >         if (!proj_parms)
> >             G_fatal_error("Projection %s is not specified in the table", proj_out);
> > 
> > The parameters to query for STP are
> > - geodetic datum (e.g. nad27)
> > - State FIPS
> > - County FIPS for selected state
> > - State Plane 1927 or 1983
> > - units (US survey Foot, Int. Foot, meter)
> > 
> > I don't know how to add that in $GISBASE/etc/proj-parms.table
> > nor if and why STP disappeared from GRASS 6.2/6.3.
> > The code seems to be in general/g.setproj/get_stp.c .
> > It seems that it just exits too early in general/g.setproj/main.c .
> > 
> > Markus
> > 
> > On Fri, Oct 20, 2006 at 02:05:23PM -0400, Helena Mitasova wrote:
> > > Here is another problem that we have found for starting a new  
> > > location and it applies
> > > to g.setproj and the creation of new location from projection values:
> > > 
> > > > when I enter stp (State Plane) for projection it gives an ERROR  
> > > >that says that stp is
> > > >not specified in the table (although it is listed and it used to  
> > > >work and in lib/gis/projections it is defined.)
> > > Was this removed? It used to ask for datum and FIPS codes. It is one  
> > > of the most common projections
> > > in US so it would be good to put it back. It works in GRASS61 from  
> > > february
> > > 
> > > Thanks Helena
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > grass-dev mailing list
> > > grass-dev at grass.itc.it
> > > http://grass.itc.it/mailman/listinfo/grass-dev
> > 
> > -- 
> > Markus Neteler  <neteler itc it>  http://mpa.itc.it/markus/
> > ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
> > MPBA - Predictive Models for Biol. & Environ. Data Analysis
> > Via Sommarive, 18        -       38050 Povo (Trento), Italy
> > 
> > _______________________________________________
> > grass-dev mailing list
> > grass-dev at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grass-dev
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev

-- 
Markus Neteler  <neteler itc it>  http://mpa.itc.it/markus/
ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18        -       38050 Povo (Trento), Italy




More information about the grass-dev mailing list