[postgis-users] cannt connect in mapserver

chodgson at refractions.net chodgson at refractions.net
Fri Jul 11 09:30:06 PDT 2003


Actually, I usually use shp2img to test my postgis connections, because that 
way I get to see the error message on my console, more quickly than flipping to 
my browser and reloading... unless this is broken with mapserver 4.0, shp2img 
does work with postgis connections.

Chris
Quoting Richard Greenwood <Rich at GreenwoodMap.com>:

> And one more thing - I am not sure that shp2img would work with a postgis
> connection. Can you test with just mapserver?
> 
> Rich
> 
> 
> At 11:43 AM 7/11/2003 +0800, you wrote:
> 
> >Richard:
> >
> >No. shp2img still doesn't work. it said
> >
> >[root at cbers mapserver-4.0b]# ./shp2img -m my.map -o
> >my2.png
> >msDrawMap(): Image handling error. Failed to draw
> >layer named 'test'.
> >
> >I think it fail for postgis doesn't give it the result
> >of select.
> >
> >Is this select statement acceptable in postgis?
> >Or should i ask the mapserver list for why mapserver
> >generated such a bad syntax statement?
> >
> >PS my mapserver is 4.0beta
> >
> >  --- Richard Greenwood <Rich at GreenwoodMap.com>
> >µÄÕýÎÄ£º> Is it creating a PNG output file? Postmaster
> >reports
> > > a lot of information
> > > that does not matter.
> > >
> > > Rich
> > >
> > >
> > > At 10:42 AM 7/11/2003 +0800, you wrote:
> > > >Richard:
> > > >
> > > >Thank you! I never notice the -i option before.
> > > >
> > > >But this time, postmaster output error information
> > > >when i execute shp2img.
> > > >Then i open the debug option -d 5
> > > >
> > > >the debug info list below:
> > > >
> > > >DEBUG:  ProcessUtility
> > > >DEBUG:  CommitTransactionCommand
> > > >DEBUG:  StartTransactionCommand
> > > >LOG:  query: DECLARE mycursor BINARY CURSOR FOR
> > > SELECT
> > >
> > >asbinary(force_collection(force_2d()),'NDR'),OID::text
> > > >from  WHERE  && 'BOX3D(-10 -10,10 10)'::BOX3D
> > > >ERROR:  parser: parse error at or near "WHERE" at
> > > >character 104
> > > >DEBUG:  AbortCurrentTransaction
> > > >DEBUG:  proc_exit(0)
> > > >DEBUG:  shmem_exit(0)
> > > >DEBUG:  exit(0)
> > > >DEBUG:  reaping dead processes
> > > >DEBUG:  child process (pid 2318) exited with exit
> > > code
> > > >0
> > > >DEBUG:  proc_exit(0)
> > > >DEBUG:  shmem_exit(0)
> > > >DEBUG:  exit(0)
> > > >DEBUG:  reaping dead processes
> > > >DEBUG:  child process (pid 2336) exited with exit
> > > code
> > > >0
> > > >
> > > >I think something missed between the "where" and
> > > "&&".
> > > >But what i do in mapserver map file just is
> > > >
> > > >MAP
> > > >   NAME APPLE
> > > >   STATUS ON
> > > >EXTENT  -10 -10 10 10
> > > >UNITS METERS
> > > >SIZE 100 100
> > > >IMAGETYPE PNG
> > > >
> > > >LAYER
> > > >CONNECTIONTYPE postgis
> > > >NAME "test"
> > > >CONNECTION "user=postgres password=postgres
> > > >dbname=chenfu host=localhost"
> > > >DATA "geom FROM test"
> > > >STATUS ON
> > > >TYPE LINE
> > > >END
> > > >
> > > >END # Map File
> > > >
> > > >
> > > >Do you have any idea of this error?
> > > >Thanks in advance!
> > > >
> > > >
> > > >=====
> > > >Remote Scensing Satellite Ground Station
> > > >Chinese Academy of Science
> > > >
> > >
> > >_________________________________________________________
> > > >Do You Yahoo!?
> > > >¹úÄÚµçÓÊÓû§·´À¬»øµ÷²éÀ­¿ªá¡Ä»
> > >
> > >http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.tech.yahoo.com/zhuanti/laji
> > /index.html
> > >
> > >
> > > Richard W. Greenwood, PLS
> > > Greenwood Mapping, Inc.
> > > Rich <at> GreenwoodMap <dot> com
> > > (307) 733-0203
> > > http://www.GreenwoodMap.com
> > >
> >
> >=====
> >Remote Scensing Satellite Ground Station
> >Chinese Academy of Science
> >
> >_________________________________________________________
> >Do You Yahoo!?
> >¹úÄÚµçÓÊÓû§·´À¬»øµ÷²éÀ­¿ªá¡Ä»
> >http://cn.rd.yahoo.com/mail_cn/tag/?
http://cn.tech.yahoo.com/zhuanti/laji/index.html
> >
> >_______________________________________________
> >postgis-users mailing list
> >postgis-users at postgis.refractions.net
> >http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 
> Richard W. Greenwood, PLS
> Greenwood Mapping, Inc.
> Rich <at> GreenwoodMap <dot> com
> (307) 733-0203
> http://www.GreenwoodMap.com
> 







More information about the postgis-users mailing list