From: <jes...@us...> - 2009-12-03 14:37:03
|
Revision: 5562 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=5562&view=rev Author: jesseeichar Date: 2009-12-03 14:36:22 +0000 (Thu, 03 Dec 2009) Log Message: ----------- trim coordinates down to 6 Modified Paths: -------------- sandbox/geocat.ch/trunk/.classpath sandbox/geocat.ch/trunk/src/org/fao/geonet/util/XslUtil.java sandbox/geocat.ch/trunk/test/junit/src/org/fao/xsl/XslUtilTest.java Added Paths: ----------- sandbox/geocat.ch/trunk/web/geonetwork/xsl/trim-coords.xsl Modified: sandbox/geocat.ch/trunk/.classpath =================================================================== --- sandbox/geocat.ch/trunk/.classpath 2009-12-03 10:18:42 UTC (rev 5561) +++ sandbox/geocat.ch/trunk/.classpath 2009-12-03 14:36:22 UTC (rev 5562) @@ -6,7 +6,7 @@ <classpathentry kind="src" path="test/services_junit/src"/> <classpathentry kind="src" path="jeeves/src"/> <classpathentry kind="src" path="test/junit/src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry exported="true" kind="lib" path="jeeves/lib/avalon-framework-4.2.0.jar"/> <classpathentry exported="true" kind="lib" path="jeeves/lib/batik-all-1.6.jar"/> <classpathentry exported="true" kind="lib" path="jeeves/lib/commons-fileupload-1.2.1.jar"/> @@ -121,107 +121,107 @@ <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/xmlgraphics-commons-1.2.jar"/> <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/xsd-2.2.2.jar"/> <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/xsdlib-20050614.jar"/> - <classpathentry kind="lib" path="web/intermap/WEB-INF/lib/acme.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/antlr-2.7.2.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/aopalliance-1.0.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/batik-awt-util-1.6.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/batik-svggen-1.6.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/batik-transcoder-1.6.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/batik-util-1.6.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/commons-beanutils-1.7.0.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/commons-collections-3.1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/commons-digester-1.7.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/commons-fileupload-1.0.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/commons-httpclient-2.0.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/commons-lang-2.1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/commons-logging-1.0.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/commons-validator-1.1.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/concurrent-1.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/data-1.5.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/freemarker-2.3.8.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/hsqldb-1.8.0.1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/imageioext-asciigrid-1.0-rc1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/imageioext-customstreams-1.0-rc1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/iText-2.1.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/jai_codec-1.1.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/jai_core-1.1.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/jai_imageio-1.1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/jdom-1.0.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/jmimemagic-0.1.2.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/jstl-1.0.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/lucene-1.4.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/main-1.5.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/oro-2.0.8.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/platform-1.5.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/postgis-driver-1.0.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/postgresql-8.1-407.jdbc3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/spring-aop-1.2.5.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/spring-beans-1.2.5.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/spring-context-1.2.5.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/spring-core-1.2.5.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/spring-web-1.2.5.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/spring-webmvc-1.2.5.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/standard-1.0.6.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/struts-1.2.9.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/validation-1.5.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/vecmath-1.3.1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/velocity-1.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/velocity-dep-1.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/xalan-2.7.0.jar" sourcepath="/home/jeichar/3rdPartySrc/xalan-j_2_7_0/src"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/xml-apis-xerces-2.7.1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/xmlParserAPIs-2.0.2.jar"/> - <classpathentry kind="lib" path="jetty/ext/commons-el-1.0.jar"/> - <classpathentry kind="lib" path="jetty/ext/commons-logging-api.jar"/> - <classpathentry kind="lib" path="jetty/ext/jasper-compiler-5.5.15.jar"/> - <classpathentry kind="lib" path="jetty/ext/jasper-compiler-jdt-5.5.15.jar"/> - <classpathentry kind="lib" path="jetty/ext/jasper-runtime-5.5.15.jar"/> - <classpathentry kind="lib" path="jetty/ext/jcl104-over-slf4j-1.0.1.jar"/> - <classpathentry kind="lib" path="jetty/ext/jsp-api-2.0.jar"/> - <classpathentry kind="lib" path="jetty/ext/org.mortbay.jetty.plus.jar"/> - <classpathentry kind="lib" path="jetty/ext/slf4j-simple-1.0.1.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/wcs-1.5.3.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/gt-wfs-2.5.1.jar" sourcepath="/home/jeichar/Projects/geocat/src/geotools/modules/plugin/wfs/src/main/java"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/gt-wms-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/gt-xml-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/gt-xsd-ows-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/gt-xsd-wfs-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/net.opengis.ows-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/net.opengis.wfs-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/org.w3.xlink-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/xpp3-1.1.3.4.O.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/wfs-1.5.3.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/wms-1.5.3.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/gt-epsg-hsql-2.5.1.jar" sourcepath="/home/jeichar/dev/project/geocat/src/geotools/modules/plugin/epsg-hsql/src/main/java"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-api-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-arcgrid-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-coverage-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-cql-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-demo-property-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-geotiff-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-graph-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-gtopo30-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-image-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-imagemosaic-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-indexed-shapefile-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-main-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-postgis-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-referencing-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-render-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-shapefile-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geoserver/WEB-INF/lib/gt2-validation-2.3.4.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/google-collections-0.9.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/gt-epsg-wkt-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/jcommon-1.0.0.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/jfreechart-1.0.0.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/serializer-2.7.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/xalan-2.7.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/xml-apis-xerces-2.7.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/xmlunit-1.2.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/gt-cql-2.5.1.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/saxon9.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/print-lib-1.2-SNAPSHOT.jar"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/pvalsecc-0.9.1.jar"/> - <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> - <classpathentry kind="lib" path="web/geonetwork/WEB-INF/lib/jts-1.10.jar" sourcepath="/home/jesse/tmp/jts-1.10/src"/> + <classpathentry exported="true" kind="lib" path="web/intermap/WEB-INF/lib/acme.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/antlr-2.7.2.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/aopalliance-1.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/batik-awt-util-1.6.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/batik-svggen-1.6.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/batik-transcoder-1.6.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/batik-util-1.6.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/commons-beanutils-1.7.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/commons-collections-3.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/commons-digester-1.7.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/commons-fileupload-1.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/commons-httpclient-2.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/commons-lang-2.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/commons-logging-1.0.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/commons-validator-1.1.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/concurrent-1.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/data-1.5.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/freemarker-2.3.8.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/hsqldb-1.8.0.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/imageioext-asciigrid-1.0-rc1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/imageioext-customstreams-1.0-rc1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/iText-2.1.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/jai_codec-1.1.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/jai_core-1.1.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/jai_imageio-1.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/jdom-1.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/jmimemagic-0.1.2.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/jstl-1.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/lucene-1.4.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/main-1.5.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/oro-2.0.8.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/platform-1.5.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/postgis-driver-1.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/postgresql-8.1-407.jdbc3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/spring-aop-1.2.5.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/spring-beans-1.2.5.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/spring-context-1.2.5.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/spring-core-1.2.5.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/spring-web-1.2.5.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/spring-webmvc-1.2.5.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/standard-1.0.6.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/struts-1.2.9.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/validation-1.5.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/vecmath-1.3.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/velocity-1.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/velocity-dep-1.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/xalan-2.7.0.jar" sourcepath="/home/jeichar/3rdPartySrc/xalan-j_2_7_0/src"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/xml-apis-xerces-2.7.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/xmlParserAPIs-2.0.2.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/commons-el-1.0.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/commons-logging-api.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/jasper-compiler-5.5.15.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/jasper-compiler-jdt-5.5.15.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/jasper-runtime-5.5.15.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/jcl104-over-slf4j-1.0.1.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/jsp-api-2.0.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/org.mortbay.jetty.plus.jar"/> + <classpathentry exported="true" kind="lib" path="jetty/ext/slf4j-simple-1.0.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/wcs-1.5.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/gt-wfs-2.5.1.jar" sourcepath="/home/jeichar/Projects/geocat/src/geotools/modules/plugin/wfs/src/main/java"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/gt-wms-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/gt-xml-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/gt-xsd-ows-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/gt-xsd-wfs-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/net.opengis.ows-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/net.opengis.wfs-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/org.w3.xlink-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/xpp3-1.1.3.4.O.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/wfs-1.5.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/wms-1.5.3.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/gt-epsg-hsql-2.5.1.jar" sourcepath="/home/jeichar/dev/project/geocat/src/geotools/modules/plugin/epsg-hsql/src/main/java"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-api-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-arcgrid-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-coverage-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-cql-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-demo-property-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-geotiff-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-graph-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-gtopo30-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-image-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-imagemosaic-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-indexed-shapefile-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-main-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-postgis-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-referencing-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-render-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-shapefile-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geoserver/WEB-INF/lib/gt2-validation-2.3.4.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/google-collections-0.9.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/gt-epsg-wkt-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/jcommon-1.0.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/jfreechart-1.0.0.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/serializer-2.7.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/xalan-2.7.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/xml-apis-xerces-2.7.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/xmlunit-1.2.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/gt-cql-2.5.1.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/saxon9.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/print-lib-1.2-SNAPSHOT.jar"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/pvalsecc-0.9.1.jar"/> + <classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> + <classpathentry exported="true" kind="lib" path="web/geonetwork/WEB-INF/lib/jts-1.10.jar" sourcepath="/home/jesse/tmp/jts-1.10/src"/> <classpathentry kind="output" path="classes"/> </classpath> Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/util/XslUtil.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/util/XslUtil.java 2009-12-03 10:18:42 UTC (rev 5561) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/util/XslUtil.java 2009-12-03 14:36:22 UTC (rev 5562) @@ -1,10 +1,7 @@ package org.fao.geonet.util; import java.io.ByteArrayInputStream; -import java.io.IOException; import java.io.StringReader; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -16,7 +13,6 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; @@ -27,7 +23,6 @@ import javax.xml.transform.stream.StreamSource; import jeeves.utils.Log; -import jeeves.utils.Xml; import org.apache.commons.io.output.ByteArrayOutputStream; import org.fao.geonet.constants.Geonet; @@ -39,13 +34,11 @@ import org.geotools.xml.Encoder; import org.geotools.xml.Parser; import org.jdom.Namespace; -import org.w3c.dom.DOMException; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import org.w3c.dom.bootstrap.DOMImplementationRegistry; import org.w3c.dom.traversal.NodeIterator; import com.google.common.collect.ArrayListMultimap; @@ -196,29 +189,20 @@ public static String toWktCoords(Object coords, Object ts, Object cs) { String coordsString = coords.toString(); - char tsString; - if (ts == null || ts.toString().length() == 0) { - tsString = TS_DEFAULT; - } else { - tsString = ts.toString().charAt(0); - } - char csString; - if (cs == null || cs.toString().length() == 0) { - csString = CS_DEFAULT; - } else { - csString = cs.toString().charAt(0); - } + + CoordInfo info = new CoordInfo(ts, cs); - if (tsString == TS_WKT && csString == CS_WKT) { + if (info.ts == TS_WKT && info.cs == CS_WKT) { return coordsString; } - if (tsString == CS_WKT) { - tsString = ';'; - coordsString = coordsString.replace(CS_WKT, tsString); + if (info.ts == CS_WKT) { + info.ts = ';'; + coordsString = coordsString.replace(CS_WKT, info.ts); } - coordsString = coordsString.replace(csString, CS_WKT); - String result = coordsString.replace(tsString, TS_WKT); + + coordsString = coordsString.replace(info.cs, CS_WKT); + String result = coordsString.replace(info.ts, TS_WKT); char lastChar = result.charAt(result.length() - 1); if (result.charAt(result.length() - 1) == TS_WKT || lastChar == CS_WKT) { result = result.substring(0, result.length() - 1); @@ -254,7 +238,40 @@ return results.toString(); } - public static Object posListToGM03Coords(Object coords, Object dim) + public static String trimPosList(Object coords) { + String[] coordsString = coords.toString().split(" "); + + StringBuilder results = new StringBuilder(); + + for (int i = 0; i < coordsString.length; i++) { + if (i > 0) { + results.append(' '); + } + results.append(reduceDecimals(coordsString[i])); + } + + return results.toString(); + } + + private static String reduceDecimals(String number) { + int DECIMALS = 6; + try { + // verify this is a number + Double.parseDouble(number); + + String[] parts = number.split("\\."); + + if(parts.length > 1 && parts[1].length () > DECIMALS) { + return parts[0]+'.'+parts[1].substring (0, DECIMALS); + } else { + return number; + } + } catch (Exception e){ + return number; + } + } + + public static Object posListToGM03Coords(Object coords, Object dim) { String[] coordsString = coords.toString().split("\\s+"); @@ -531,7 +548,8 @@ return null; } - private static Polygon parsePolygon(Node next) throws Exception + @SuppressWarnings("unchecked") + private static Polygon parsePolygon(Node next) throws Exception { String writeXml = writeXml(next); @@ -608,4 +626,21 @@ { INCLUDE, EXCLUDE, NA } + + private static class CoordInfo { + public CoordInfo(Object tsRaw, Object csRaw) { + if (tsRaw == null || tsRaw.toString().length() == 0) { + ts = TS_DEFAULT; + } else { + ts = tsRaw.toString().charAt(0); + } + if (csRaw == null || csRaw.toString().length() == 0) { + cs = CS_DEFAULT; + } else { + cs = csRaw.toString().charAt(0); + } + } + public char ts; + public char cs; + } } Modified: sandbox/geocat.ch/trunk/test/junit/src/org/fao/xsl/XslUtilTest.java =================================================================== --- sandbox/geocat.ch/trunk/test/junit/src/org/fao/xsl/XslUtilTest.java 2009-12-03 10:18:42 UTC (rev 5561) +++ sandbox/geocat.ch/trunk/test/junit/src/org/fao/xsl/XslUtilTest.java 2009-12-03 14:36:22 UTC (rev 5562) @@ -17,4 +17,11 @@ assertEquals("2.5", XslUtil.expandScientific("2.5E0")); } + @Test + public void testTrim() throws Exception { + final String data = "9.554388227214988 47.227429422799325 9.55177303747616 47.223761312928346 9.558524927009797 47.224159032974136 9.568714326423056 47.2196699532557 9.584855495669517 47.20492815402061 9.580329376185912 47.19577137436106 9.572605606822618 47.19078600449766 9.573028357142288 47.17558945513593 9.564569767835167 47.17028420527933 9.579475126808317 47.171150405380835 9.596798715826692 47.16293511588421 9.605481185553527 47.1492923865341 9.614143305008204 47.14758103668585 9.621203014440818 47.15154142658616 9.625878864255304 47.145891556865365 9.622593874581305 47.14134687702446 9.62467794464066 47.132641827407035 9.635041264045803 47.12812493769189 9.620839875411871 47.1103087883032 9.634394794709424 47.10112395881238 9.633471865176878 47.08343265954178 9.623398325874577 47.082571919484174 9.61870029629155 47.0781620096246 9.61154502674488 47.07939549950689 9.61340848684568 47.06948889997308 9.60906485730699 47.06207541024225 9.582169819328978 47.05269625038509 9.55692975112104 47.04850933032742 9.551628591243894 47.0588355598477 9.539763211899613 47.06514158947552 9.51208393395024 47.05681155956954 9.50000618475596 47.05712105944623 9.499541614854131 47.0541482295661 9.49131816536049 47.05624554940342 9.484385025984087 47.04925277963224 9.48228353597144 47.056112589326666 9.475796346506117 47.051746019449894 9.472387436437717 47.06502194886433 9.513539513202083 47.085629738344096 9.519591062507237 47.09833084786932 9.508595032308762 47.13984863603497 9.49033171295671 47.16569425478833 9.48594882290298 47.181131744103446 9.489723392304073 47.19627083350568 9.504032770698023 47.22426799246752 9.52084265909696 47.24449824177717 9.530718877828498 47.27061970077713 9.566799276019418 47.24287507226918 9.554388227214988 47.227429422799325"; + String trimmed = XslUtil.trimPosList(data); + String[] coords = trimmed.split(" "); + assertEquals("9.554388", coords[0]); + } } Added: sandbox/geocat.ch/trunk/web/geonetwork/xsl/trim-coords.xsl =================================================================== --- sandbox/geocat.ch/trunk/web/geonetwork/xsl/trim-coords.xsl (rev 0) +++ sandbox/geocat.ch/trunk/web/geonetwork/xsl/trim-coords.xsl 2009-12-03 14:36:22 UTC (rev 5562) @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gmd="http://www.isotc211.org/2005/gmd" + xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmx="http://www.isotc211.org/2005/gmx" + xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:gml="http://www.opengis.net/gml" + xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:gts="http://www.isotc211.org/2005/gts" + xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:geonet="http://www.fao.org/geonetwork" + xmlns:xalan="http://xml.apache.org/xalan" xmlns:exslt="http://exslt.org/common" + xmlns:util="xalan://org.fao.geonet.util.XslUtil" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + <xsl:template match="gml:posList"> + <xsl:value-of select="util:trimPosList(string(.))"/> + </xsl:template> + + <xsl:template match="text()"/> + + <!-- standard copy template --> + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*"/> + <xsl:apply-templates/> + </xsl:copy> + </xsl:template> +</xsl:stylesheet> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |