用XSLT把GML转SVG然后压缩,发布一个矢量的map
写的一个demo,3.8M的Provinces.gml(仅空间数据)发布成压缩过的SVG后327K。
这是load4.htm的代码
这是line.aspx的C#代码,需要ZIPLIB
this.Response.ContentType = “image/svg+xml”;
XslTransform xslt = new XslTransform();
xslt.Load(Server.MapPath(“Region.xsl”));
XPathDocument xpathdocument = new XPathDocument(Server.MapPath(“chinese.gml”));
GZipOutputStream CompressedOutput = new GZipOutputStream(Response.OutputStream, 100);
XmlTextWriter writer = new XmlTextWriter(CompressedOutput, Encoding.UTF8);
writer.Formatting=Formatting.Indented;
xslt.Transform(xpathdocument, null, writer, null);
CompressedOutput.Finish();
下面是截图,弹的的数字的当前的viewbox。(少了几个省是因为XSLT还没写完)
Related posts:
About this entry
You’re currently reading “用XSLT把GML转SVG然后压缩,发布一个矢量的map,” an entry on Geoinformatics
- Published:
- 1.22.06 / 11上午
Ajax ArcGIS Dreams Flex Geography Geoinformatics GeoRSS GIS Google Hardware Harvard History Jquery Linux Love Map MapServer NASA OGC OpenGIS OSGeo PHP Politics PostGIS PostgreSQL Python R Social Network SVG Ubuntu Web WebGIS Wordpress 中国 历史地理 宋朝 开源 新儒学 生活 遥感
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.














赵 博 (Bo Zhao),
参与或主持的项目
3 Comments
Jump to comment form | comments rss [?] | trackback uri [?]