[postgis-users] alpha GT2 Web Map Server with PostGIS support

My Name pgjm at geography.leeds.ac.uk
Sat Nov 30 06:07:03 PST 2002


> 
> To James Macgill (and anyone else who is interested),
Hi, thanks for the feedback! 
> I have been testing the gt2wms with postGIS for the last few night but
> have not had any success. I can get it to return an image, but no
> features are displayed for postgis data sources (blank, white image
> returned). I am running tomcat 4.1.12-LE-jdk14 with sdk1.4.0_01. Here is
> a list of my questions/ observations. My html to call gt2wms is at the
> end.
> 
> 1)I needed to install the java advanced imaging api for gt2wms to run.
> Is this included in the java sdk 1.4.1?
No, the JAI is not included by default, so I should have listed it in the requirements for gt2wms.
> 2)the example index.html using a shapefile works fine
Glas to here it, though there has been a reported threading problem on some platforms that prevents all five maps showing at the same time.  A new version will be comming out soon with a crude sycnchronization to resolve this.  I'll try and find the exact point of confilct soon to.
> 3)I have needed to restart tomcat to get gt2wms to reload layers.xml. Is
> there an easier way?
No, there isn't.  I'm thinking of adding a vendor specific parem that will trigger a reload of the layers file.
> 4)I notice that the example mentions that the SLD <FeatureTypeName> must
> be 'feature' for shapefiles to work. Is this also true of postGIS data.
> (note that values other than 'feature' cause a blank, white image to be
> returned for shapefile data as well)
Yes, the type must be 'feature', so far only GML datasource generates features with types other than 'feature'.
> 5)yes, the bounding boxes have been adjusted for my data
> 6)if some of the postgis data source parameters (database and table) in
> layers.xml are left out, no errors are thrown by gt2wms. (error is
> thrown if all are removed). Are there any additional parameters needed
> to tell gt2wms the geometry column in the table?
Ah, as it stands no, I think the PostGIS datasource assumes the collumn is called 'geometry' (or is it 'gid'?)  I will check with Rob, the author of the PostGIS datasource module.
> 7)where is the source code for gt2wms available?
It will be included in the next release, however for now you can find it:
Under the XReference section of http://modules.geotools.org/wmsserver/
By browsing the CVS repository to http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/geotools/geotools2/geotools-src/wmsserver/
By downloading the gt2-src-snapshot-tar-gz from http://sourceforge.net/project/showfiles.php?group_id=4091 and looking in the geotools-src/wmsserver/src folder. 

To get an idea of what might be wrong could you open your loggin.properties file, (I think its in JAVA_HOME/jre, but I don't have java installed on the machine I'm sending this from...)  Change the loggin levels for . to FINER or FINEST and do the same for the console filter option, then restart tomcat.  The catalinia.out file should then contain a lot more infomration about what is going on.

I hope that between us we can track down the problem and move the status from alpha upto beta :)

All the best

James
> Rueben Schulz
> 
> 
> P.S. geotool2 is looking really great (especially SDL with filters). I
> am hoping to have time to look at it more in the new year, though this
> is a good introduction to geotools and sdl. (so many specifications to
> read so little time...)
> 
> <html>
>   <head>
>     <title>gt2wms and postGIS</title>
>   </head>
>   <body>
>     <h1>GeoTools 2 Web Map Server: PostGIS tests</h1>
> 
> USA test<br>
> <img
> src='servlet/gt2wms?request=getMap&layers=USA&bbox=-160,20,-60,60&width=400&height=200&srs=EPSG:-1&styles=green' width=400 height=200/>
> <a
> href="servlet/gt2wms?request=getMap&layers=USA&bbox=-160,20,-60,60&width=400&height=200&srs=EPSG:-1&styles=normal">Map URL</a><br>
> 
> poly test<br>
> <img
> src='servlet/gt2wms?request=getMap&layers=postgistest&bbox=-5,-5,3,3&width=400&height=200&srs=EPSG:-1&styles=green' width=400 height=200/>
> <a
> href="servlet/gt2wms?request=getMap&layers=postgistest&bbox=-0.5,-5,3,3&width=400&height=200&srs=EPSG:-1&styles=green"/>Map URL</a><br>
> 
> bc test<br>
> <img
> src='servlet/gt2wms?request=getMap&layers=postgistest2&bbox=-140,45,-120,60&width=400&height=200&srs=EPSG:-1&styles=green' width=400 height=200/>
> <a
> href="servlet/gt2wms?request=getMap&layers=postgistest2&bbox=-140,45,-120,60&width=400&height=200&srs=EPSG:-1&styles=normal"/>Map URL</a><br>
> 
> islanads test<br>
> <img
> src='servlet/gt2wms?request=getMap&layers=postgistest3&bbox=1175070,389420,1206600,425095&width=400&height=200&srs=EPSG:-1&styles=normal' width=400 height=200/>
> <a
> href="servlet/gt2wms?request=getMap&layers=postgistest3&bbox=1175070,389420,1206600,425095&width=400&height=200&srs=EPSG:-1&styles=normal"/>Map URL</a><br>
> 
>   </body>
> </html>
> 
> 
> On Fri, 2002-11-22 at 00:59, James Macgill wrote:
> > Hi all
> > 
> > This is a quick shout for some testers with PostGIS experience, I have just 
> > put a ready built copy of the GT2 wmsserver module onto the sourceforge 
> > file section for download.
> > 
> > The download consists of a single war (web archive) that you should be able 
> > to drop into your favorite servlet engine and start serving maps.
> > 
> > You can download it from:
> > http://prdownloads.sourceforge.net/geotools/wmsserver.war?download
> > 
> > The current code supports Shapefile and PostGIS datasources, the others 
> > (GML, MapInfo etc) should be easy to add so expect them soon.
> > 
> > Once you have the war file installed you should be able to open the index 
> > page with something like: http://localhost:8080/wmsserver/
> > And see a sample page with some maps in it and some instructions.
> > 
> > When unpacked you will find a number of files, the layers.xml is the main 
> > config file whilst the styles and maps folders contain the sample data that 
> > can be mapped out of the box.  You will find an example layer definition 
> > for a PostGIS layer in the layers.xml file, you should just need to plug 
> > values for your db into it.
> > 
> > The wmsserver module is experimental and will not remain within the GT2 
> > codebase long term as it falls outside the remit of 'toolkit' though it may 
> > become a project in its own right in the future.
> > 
> > Its a useful thing to put out however as, if you take a look at the source 
> > code, you will see examples of how datasources, rendering, filtering and 
> > styling work.  You can find the source code on CVS or on the 
> > gt2-src-snapshot.tar.gz nightly archive if you look in 
> > geotools2/geotools-src/wmsmodule/src
> > 
> > It would be great to hear from people who do manage install it and also any 
> > problems from people who can't.  It's not been tested against very many 
> > PostGIS databases yet so I'm particularly interested in feedback from 
> > members of this list.
> > 
> > All the best
> > 
> > James
> > 
> > 
> > -- 
> > James Macgill
> > Center for Computational Geography
> > Spell Checker (c) Creative Spelling inc (aka my dyslexic brain)
> > http://www.geotools.org  the open source java mapping toolkit.
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> 
> 
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 




More information about the postgis-users mailing list