[Mapserver-users] java connector

Terry Hannant thannant at metadev.com.au
Fri May 23 02:01:18 EDT 2003


Steve

Glad to hear Java/Mapserv is on the radar, I'm sure it is a crowded
radar :-)


Don't suppose there is a sort of roadmap of your intended direction? 

We have one servlet based app in production and now looking at others so
interested to make sure our approach aren't wildly divergent to future
directions as well as ensuring that our work is useful to other
MapServer developers

What would you say are the areas of deficiency of the current
MapScript/SWIG/Java implementation? May be able to contribute effort in
addressing these as we develop our own applications



Terry Hannant
MetaDev Pty Ltd


-----Original Message-----
From: Steve Lime [mailto:steve.lime at dnr.state.mn.us] 
Sent: Wednesday, 21 May 2003 1:35 PM
To: thannant at metadev.com.au; pedro-b-salazar at ptinovacao.pt
Cc: mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] java connector

Hi Folks: This is an important topic and one that should get lot's of
attention post user group meeting. It's at the top of my to-do list if
some funding could be found. Ideally MapScript SWIG/JNI/Java will
provide the main means of interaction. I've also kicked around the idea
of a GeoTools/MapServer integration using MapScript. It will be awhile
until this can be used in a production environment.

That said, there are work arounds. I've built a simple java wrapper
(implemented as a bean) for the standard CGI application. Basically you
build up queries to the CGI, post them via streams and get at the
results using MapServer templates. In our case the template ammounts to
a text file consisting of name=value pairs. This file is yanked into a
Java hash and returned as output from the bean. The calling application
can do with the results what it wishes.

Low-tech, but it works nicely.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Pedro Salazar <pedro-b-salazar at ptinovacao.pt> 05/20/03 11:12 AM >>>
Hi,

> Our current solution is a simple process.Exec wrapper around mapserv. 
> 

I put my perl scripts inside the "cgi-bin" Apache HTTP server directory
and I invoke them through a HTTP connection. It may be not so fast as
invoke them directly but it's more flexible that way - and HTTP is a
very light protocol.

> We also did some tweaking to mapserv.c to make calling it from Java a
> bit easier so you could say we cheated a bit. We also removed a lot
the
> map file parsing code as it was not very thread safe.
> 

I'm not clear about the gain of performance but for now I prefer to not
touch the original mapserv.c.

> What value does the perl script you are calling give you over calling
> Mapserv directly?
> 

I don't know if I understood well what you asked, but my perl scripts
work also with query string parameters as the mapserv do, and they can
give me an extent text to be parsed or just images...

> We looked at JNI and saw that it would be very easily achievable for
the
> general case but did not warrant the effort for our specific use.  
> 
> A nice JNI interface would be sweet to develop if there were enough
> hands around.
> 

I think the same about using JNI, but right now I don't have time for
that adventure :-) It would be interesting indeed and a big improvement
for mapserver.

Pedro.
-- 
PS
pedro-b-salazar at ptinovacao.pt
PGP:0E129E31D803BC61

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users






More information about the mapserver-users mailing list