Hello Javier and Brent,
I've been investigating this as well.
Summary:
Problem 1 -
Curiously when I attempt a SHAPE-ZIP query on localhost with a filter clause
on a datasource made up of LineString geometry the return is an empty file,
but in only some cases involving a smaller BBox. (using TestWfsPost) Same
Query with a larger Bbox works fine?
The same Query on an identical online server appears to work correctly?
(both online and remote services localhost) which would seem to indicate a
permission problem with the local server.
I see that the empty result localhost Queries do create a valid shape file
set in the Tomcat temp directory. However, the CREATOR/OWNER has full
control permissions for the Tomcat temp folder. If permissions were a
problem the larger Bbox should not work either?
Testing Environment for localhost and online server:
GeoServer 1.3.2 war, PostGIS 1.1.2, Tomcat 5.5.12, Windows 2003 server
Case 1 - Bbox filter against http://localhost:80/geoserver/wfs: returns an
empty file.
Notes:
Identical query except for <gml:coordinates>-125.0,23.0
-65.0,53.0</gml:coordinates> works fine.
outputFormat "GML2" results in a valid xml result.
No warnings or errors in log but an empty zip file.
Valid shp file set is created in the Tomcat temp subdirectory
Problem appears related to size of BBox
<?xml version='1.0' encoding='UTF-16' standalone='yes'?>
<wfs:GetFeature service="WFS" version="1.0.0"
outputFormat="SHAPE-ZIP"
xmlns:geo="http://web-maps.com/geo"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
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="geo:interstate">
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4269">
<gml:coordinates>-91.53543472290039,37.17322826385498
-89.1732292175293,39.53543281555176</gml:coordinates>
</gml:Box>
</ogc:BBOX>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Problem 2 -
Switching to a Query of a Polygon datasource results in a
"java.io.IOException: Unable to write : java.math.BigDecimal" for Shape
Dbase Header
- localhost and online - polygon data
<?xml version='1.0' encoding='UTF-16' standalone='yes'?>
<wfs:GetFeature service="WFS" version="1.0.0"
outputFormat="SHAPE-ZIP"
xmlns:geo="http://web-maps.com/geo"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
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="geo:state">
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4269">
<gml:coordinates>-91.53543472290039,37.17322826385498
-89.1732292175293,39.53543281555176</gml:coordinates>
</gml:Box>
</ogc:BBOX>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Gives this exception:
<?xml version="1.0" ?>
<ServiceExceptionReport
version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc
http://localhost:80/geoserver/schemas//wfs/1.0.0/OGC-exception.xsd">
<ServiceException>
java.io.IOException: Unable to write : java.math.BigDecimal
</ServiceException>
</ServiceExceptionReport>
Log file entry:
45645285 [INFO] org.vfny.geoserver.servlets.AbstractService -
java.io.IOException: Unable to write : java.math.BigDecimal
at
org.geotools.data.shapefile.ShapefileDataStore.createDbaseHeader(ShapefileDa
taStore.java:1046)
at
org.geotools.data.shapefile.ShapefileDataStore.createSchema(ShapefileDataSto
re.java:769)
at
org.vfny.geoserver.wfs.responses.ShapeFeatureResponseDelegate.writeOut(Shape
FeatureResponseDelegate.java:301)
at
.
.
.
Thanks
Randy George
-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Brent
Owens
Sent: Thursday, July 13, 2006 9:40 AM
To: Javier de la Torre
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Problems with SHAPE-ZIP outputformat
It seems like geoserver either doesn't have permission to access the
temporary files, or just can't find them (the previous I suspect most).
But errors should be thrown for either. Can you make sure that the temp
folder is not write/read protected and geoserver can access it?
As for the file extensions, it might be possible to add them in.
Although I will need to find out where the naming takes place. The
mime-type of the output is set however, so programs can find out what
type of file it is.
Brent Owens
(The Open Planning Project)
Javier de la Torre wrote:
Hi all,
I continue investigating output formats. Now I am trying to make the
shapefile work.When I do a WFS request I get some result in GML. I tried to include
the outputformat=SHAPE-ZIP and I get back an exmpty file called wfs
with the correct mime-type. I take a look at the logs and everything
seems fine:---------------
Jul 13, 2006 11:15:26 AM org.geotools.data.jdbc.ConnectionPool
getConnection
FINE: Getting available connection.
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader
warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader
warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader
warn
WARNING: FieldName num_records is longer than 10 characters,
truncating to num_record
Jul 13, 2006 11:15:26 AM org.geotools.data.shapefile.dbf.DbaseFileHeader
warn
WARNING: FieldName num_providers is longer than 10 characters,
truncating to num_provid
Jul 13, 2006 11:15:26 AM
org.geotools.data.jdbc.ConnectionPool$ConnectionListManager
connectionClosed
FINE: Connection closed - adding to available connections.
Jul 13, 2006 11:15:26 AM org.vfny.geoserver.servlets.AbstractService
doService
INFO: Service handled
-------------And when I look at the tomcat temporary folder the shapefiles are
there and are correct!But why do I get the empty file then? Is there a problem when zipping
this? In the case of KMZ geoserver manages to zip fine.And by the way, is there any way in geoserver that the files that you
get when requesting an outputformat like PDF or shapefile or KML does
not have just the wms or wfs name without extension? I am going to
create a little script to take care of this but I was wondering if
there is any other way.Thanks in advance.
Javier.
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
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