MapScript WMS

Tim Schaub noreply at GEOCARTIC.COM
Thu Aug 31 10:11:37 PDT 2006


Hello-

I'm interested in:
 1) receiving a GetMap request
 2) tweaking some things
 3) drawing the map and caching it server side
 4) serving the map to the client

Looks like there are (at least) two ways to accomplish this.  Can anyone
comment on the benefit of one over the other?

Method I-
  # create map, request, and tweak some parameters first
  mapscript.msIO_installStdoutToBuffer()
  map.OWSDispatch(request)
  content_type = mapscript.msIO_stripStdoutBufferContentType()
  content = mapscript.msIO_getStdoutBufferBytes()
  # then write to cache, send to client, etc

Method II-
  # create map, request, and tweak some parameters first
  map.loadWMSRequest('1.1.0', request)
  img = map.draw()
  # then write to cache, send to client, etc
  
Seems like the two are equivalent for GetMap requests.  The second looks a
bit nicer.  Is there a problem with msIO_stripStdoutBufferBytes in 4.9 that
would make method I unreliable?

Thanks for any tips,
Tim

> Yewondwossen Assefa
> Sent: Thursday, August 31, 2006 9:46 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
>
> There was also a problem with the ms_iogetStdoutBufferBytes and it is 
> now fixed in cvs.



More information about the MapServer-users mailing list