Discussion:
[Geoserver-users] Export wms layer as kml and csv format problem
mano3688
13 years ago
Permalink
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.
mano3688
13 years ago
Permalink
Please reply me..

Thanks ,

Mano G

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Export-wms-layer-as-kml-and-csv-format-problem-tp4645187p4647451.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Andrea Aime
13 years ago
Permalink
Post by mano3688
Please reply me..
Please read the user posting guide:
http://geoserver.org/display/GEOS/GeoServer+user+list+posting+guidelines

Support here is provided on a voluntary basis as people have time to answer you,
if you need priority support (guaranteed response time) it is
available as a commercial
service, see here:
http://geoserver.org/display/GEOS/Commercial+Support

Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
Loading...