Revision 1382

View differences:

org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.io/src/main/java/org/gvsig/raster/wmts/io/WMTSProvider.java
748 748
		
749 749
		boolean proj = p.isProjected();
750 750
		
751
		double psX = tileMatrix.getWidthMtsTile(proj) / tileMatrix.getTileWidth();
752
		double psY = tileMatrix.getHeightMtsTile(proj) / tileMatrix.getTileHeight();
751
		double psX = tileMatrix.getWidthWCTile(proj) / tileMatrix.getTileWidth();
752
		double psY = tileMatrix.getHeightWCTile(proj) / tileMatrix.getTileHeight();
753 753
		
754 754
		double ulx = viewCenter.getX() - ((w / 2) * psX);
755 755
		double uly = viewCenter.getY() - ((h / 2) * psY);
......
783 783
		
784 784
		for (int i = 0; i < getZoomLevels(); i++) {
785 785
			WMTSTileMatrix tileMatrix = getTileMatrixByLevel(i);
786
			list[i] = math.adjustDouble(tileMatrix.getWidthMtsTile(p.isProjected()) / tileMatrix.getTileWidth());
786
			list[i] = math.adjustDouble(tileMatrix.getWidthWCTile(p.isProjected()) / tileMatrix.getTileWidth());
787 787
		}
788 788
		return list;
789 789
	}
......
1126 1126
	private double getScale(Rectangle2D r, int width) {
1127 1127
		WMTSDataParameters p = (WMTSDataParameters)param;
1128 1128
		if(!p.isProjected()) {
1129
			return (1000 * r.getWidth() * MTS_X_GRADO) / (width * 0.28);
1129
			return (r.getWidth() * MTS_X_GRADO) / (width * 0.00028);
1130 1130
		} else
1131
			return (1000 * r.getWidth()) / (width * 0.28);
1131
			return (r.getWidth()) / (width * 0.00028);
1132 1132
	}
1133 1133
	
1134 1134
	/**

Also available in: Unified diff