Morning everyone,

This is still an issue.

I've narrowed this down some more. It is quite easy to reproduce using the
latest nightly build, standard data, 32 bits (or 64)

1) Set up ogr2ogr using these instructions:
http://docs.geoserver.org/latest/en/user/extensions/ogr.html

2) Create an OGR2OGR.XML file with just a zipped and unzipped KML in the
default data directory that looks like this:

<OgrConfiguration>
  <ogr2ogrLocation>C:\Program Files
(x86)\FWTools2.4.7\bin\ogr2ogr.exe</ogr2ogrLocation>
  <gdalData>C:\Program Files (x86)\FWTools2.4.7\data</gdalData>
  <formats>
    <Format>
      <ogrFormat>KML</ogrFormat>
      <formatName>OGR-KML-ZIP</formatName>
      <fileExtension>.zip</fileExtension>
      <mimeType>application/zip</mimeType>
    </Format>
    <Format>
      <ogrFormat>KML</ogrFormat>
      <formatName>OGR-KML</formatName>
      <fileExtension>.kml</fileExtension>
      <singleFile>true</singleFile>
      <mimeType>application/vnd.google-earth.kml</mimeType>
    </Format>
  </formats>
</OgrConfiguration>

3) Start GeoServer. From the Demo Requests - wfs - select the
"WFS_getFeatureBetween-1.1.xml" sample request.

4) Modify it slightly to read

<wfs:GetFeature service="WFS" outputFormat="OGR-KML-ZIP" version="1.1.0"

The resulting zip file should be corrupt.
If you try outputFormat="OGR-KML", it works fine.

Note that the usual outputFormat="shape-zip" also works fine, the zip
problem just seems to be inside the OGR2OGR extension.

Thanks for looking into this,

Roger


On Sun, Nov 14, 2010 at 3:52 PM, Roger Bedell <[email protected]>wrote:

> Hi again,
>
> This time, it seems the zip file coming back from the ogr2ogr output is
> unreadable. This is on a 64 bit Win2008 server, 64 bit JDK, latest nightly
> build.
>
> I tested this using this request against our server (you can try it too!):
>
> http://204.62.18.181:8080/geoserver/wfs
>
> <wfs:GetFeature service="WFS" version="1.1.0" outputFormat="OGR-KML-ZIP"
> xmlns:ogi="http://ogi.state.ok.us"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
> http://www.opengis.net/wfs  http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";
> xmlns:ogc="http://www.opengis.net/ogc"; xmlns:wfs="
> http://www.opengis.net/wfs"; xmlns:gml="http://www.opengis.net/gml";>
>   <wfs:Query typeName="ogi:sections" srsName="urn:x-ogc:def:crs:EPSG:2267"
> >
>     <ogc:Filter>
>       <ogc:Intersects>
>         <ogc:PropertyName>the_geom</ogc:PropertyName>
>         <gml:Polygon srsName="urn:x-ogc:def:crs:EPSG:4326" xmlns:gml="
> http://www.opengis.net/gml";>
>           <gml:exterior>
>             <gml:LinearRing>
>               <gml:posList> 36.129833547944 -97.739353179937
> 36.129833547944 -97.620220184329 36.188044089569 -97.620220184329
> 36.188044089569 -97.739353179937 36.129833547944 -97.739353179937</
> gml:posList>
>             </gml:LinearRing>
>           </gml:exterior>
>         </gml:Polygon>
>       </ogc:Intersects>
>     </ogc:Filter>
>   </wfs:Query>
>  </wfs:GetFeature>
>
> and again, this time using  outputFormat="OGR-KML".
>
> In the ogr2ogr.xml I have:
>
>     <Format>
>       <ogrFormat>KML</ogrFormat>
>       <formatName>OGR-KML-ZIP</formatName>
>       <fileExtension>.kml</fileExtension>
>     </Format>
>     <Format>
>       <ogrFormat>KML</ogrFormat>
>       <formatName>OGR-KML</formatName>
>       <fileExtension>.kml</fileExtension>
>       <singleFile>true</singleFile>
>     </Format>
>
> No errors in the log. Any ideas?
>
> Thanks!
> Roger
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to