My geoserver version:2.1.1

My problem is kml and csv file show some unexpected  name like
(application/vnd.google-earth.kml and text/csv (642 KB))when i export layer
but i need kml and CSV file in zip  format.


Here shape file format only working fine.

I need kml and csv file like

(e.g) layer name: population
export as kml: population.kml
export as csv: population.csv.

but i didn't get like this,how can i resolve this problem?.please help me.

I am mention my steps below what i did.

I have download OGR output format jar file from geoserver 
(geoserver-2.1.1-ogr-plugin.zip) and put into
C:\Tomcat7.0.19\webapps\geoserver\WEB-INF\lib location.

I am installed FWTools2.4.7

I put my xml file into  C:\Tomcat7.0.19\webapps\geoserver\data location.

My xml file is,
<OgrConfiguration>
   <ogr2ogrLocation>C:\Program
Files\FWTools2.4.7\bin\ogr2ogr.exe</ogr2ogrLocation>
  <gdalData>C:\Program Files\FWTools2.4.7\data</gdalData>
  <formats>
    <Format>
      <ogrFormat>MapInfo File</ogrFormat>
      <formatName>OGR-TAB</formatName>
      <fileExtension>.tab</fileExtension>
    </Format>
    <Format>
      <ogrFormat>MapInfo File</ogrFormat>
      <formatName>OGR-MIF</formatName>
      <fileExtension>.mif</fileExtension>
    
    </Format>
    <Format>
      <ogrFormat>CSV</ogrFormat>
      <formatName>OGR-CSV</formatName>
      <fileExtension>.csv</fileExtension>
     
    </Format>
    <Format>
      <ogrFormat>KML</ogrFormat>
      <formatName>OGR-KML</formatName>
      <fileExtension>.kml</fileExtension>
        
    </Format>
  </formats>
</OgrConfiguration>

I wrote code for export kml and csv in js file like.

For KML file:

window.open(selectedLayerURL+'?service=WFS&srs=EPSG:4326&version=1.0.0&request=GetFeature&typeName='+exportContextMenu+'&outputFormat=OGR-KML','_parent');

For CSV:

window.open(selectedLayerURL+'?service=WFS&srs=EPSG:4326&version=1.0.0&request=GetFeature&typeName='+exportContextMenu+'&outputFormat=OGR-CSV','_parent');

Please reply me,
thanks to all.

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Export-wms-layer-as-kml-and-csv-format-problem-tp4645187p4645187.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to