Hi Andrea,
Please see below. Thanks very much.
Regards,
Lee Wai See
-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Andrea
Aime
Sent: Tuesday, February 13, 2007 7:29 PM
To: leewse@...440...
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Feature caching
leewse@...440... ha scritto:
Hi Andrea,
Thanks for your patience. Please see below.
leewse@...440... ha scritto:
leewse@...440... ha scritto:
...
As an easier alternative, you can install Geoserver alongside your app,
in the same container, no?
We currently have GeoServer and the webapp in a same Tomcat server. But
of
course the two are deployed as two separate applications, with its own
web.xml each. Is this what you are referring to - GeoServer and app in
the
same container?
Yes
* query your remote/master Geoserver with a GetFeature, and ask for a
compressed shapefile to be returned;
How do you ask for a compressed shapefile to be returned?
Ask for the SHAPE-ZIP format. Example:
<wfs:GetFeature service="WFS" version="1.0.0"
outputFormat="SHAPE-ZIP"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<wfs:Query typeName="topp:states">
<ogc:Filter>
<ogc:FeatureId fid="states.3"/>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Testing with your above query is fine. Bu when I tried using SHAPE-ZIP
output format with my feature type on the GeoServer demo page, but I got
this error:
org.vfny.geoserver.wfs.WfsException: java.io.IOException: Unable to
write
: java.math.BigDecimal
at
org.vfny.geoserver.wfs.WfsExceptionHandler.newServiceException(WfsExceptionH
andler.java:65)
at
Ouch, apparently the central datastore spits out BigDecimals, and
shapefile datastore is apparently not able to write them down.
This seems http://jira.codehaus.org/browse/GEOT-960, which has been
fixed quite some time ago, both geoserver 1.4.0 and 1.5.rc1 should have
the fix in. What is the Geoserver version you're using? Can't remember.
I am using 1.4.0. However, now peculiarly, I am not able to replicate this
exception. Instead I got another one as below. I tried using various
feature types of mine but all gave me the same exception. I cannot find
the wfsshp5 folder in my GeoServer deployment, much less the xxx.prj
files. What am I not doing correct here?
Frankly, I got no idea... 
You did cut the stack trace, I need the full version of it (there
should be a "Caused by" exception somewhere).
I did include the "Caused by" exception. Anyway, here it is again.
By the
way, this is the only exception I got for this problem.
Caused by: java.io.FileNotFoundException: C:\Program Files\Apache Software
Foundation\Tomcat 5.0\wfsshp5\street.prj (The system cannot find the file
specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at
org.vfny.geoserver.wfs.responses.ShapeFeatureResponseDelegate.encode(ShapeFe
atureResponseDelegate.java:256)
at
org.vfny.geoserver.wfs.responses.FeatureResponse.writeTo(FeatureResponse.jav
a:140)
at
org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:5
94)
... 39 more
Sorry for the confusion here. I think you did not misunderstand me. It was
just me not getting the correct picture. Please see below to make sure
that I am getting you right.
+-----------+ +----------------------------+
| CENTRAL | slow/public netwrk | REMOTE CLIENT BROWSER WITH |
| GEOSERVER |--------------------| OWN SHAPEFILE SNAPSHOT |---
| AND MY | +----------------------------+
| SINGLE | slow/public netwrk +----------------------------+
| WEBAPP |--------------------| REMOTE CLIENT BROWSER WITH |
+-----------+ | OWN SHAPEFILE SNAPSHOT |---
+----------------------------+
Nope, this won't work at all. The shapefile must be stored on the
same machine as Geoserver, otherwise Geoserver won't be able to access it.
What you can do is:
+-----------+ +----------------------------+
| CENTRAL | slow/public netwrk | REMOTE CLIENT BROWSER |
| GEOSERVER |--------------------| |---
| AND MY | +----------------------------+
| SINGLE | slow/public netwrk +----------------------------+
| WEBAPP |--------------------| REMOTE CLIENT BROWSER |
+-----------+ | |---
+----------------------------+
with your central geoserver keeping a shapefile snapshot for each client
on the server. This would give you a private snapshot for each client,
but no speedups whatsoever.
Pardon me for my ignorance, how can I "match"/"identify" a shapefile to its
corresponding client browser? And will each shapefile be a new feature type,
meaning to say if I have 10 clients, I will have 10 shapefiles and
correspondingly 10 new feature types?
Cheers
Andrea
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.39/685 - Release Date: 2/13/2007
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.411 / Virus Database: 268.17.39/685 - Release Date: 2/13/2007
[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---