Mercurial > mxd2map
view src/java/de/intevation/mxd/FeatureLayerReader.java @ 25:cbd67b1100d8
Initial commit of the first prototype.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 08 Apr 2011 11:47:59 +0200 |
parents | |
children |
line wrap: on
line source
//package de.intevation.mxd.layer; import java.io.IOException; import org.apache.log4j.Logger; import com.esri.arcgis.carto.ILayer; import com.esri.arcgis.carto.FeatureLayer; import com.esri.arcgis.geometry.ISpatialReference; import com.esri.arcgis.geometry.ProjectedCoordinateSystem; import com.esri.arcgis.geometry.IProjection; import com.esri.arcgis.geometry.Projection; import com.esri.arcgis.display.ISymbol; import com.esri.arcgis.display.SimpleMarkerSymbol; /** * Reads Layer information.. * * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> */ public class FeatureLayerReader implements ILayerReader{ private static final Logger logger = Logger.getLogger(FeatureLayerReader.class); private ILayer layer; //Constructor public FeatureLayerReader(ILayer layer){ this.layer = layer; } //Methods /** * Reads the Layer content. */ public boolean read() throws IOException{ logger.debug("read()"); if(layer instanceof FeatureLayer){ FeatureLayer fl = (FeatureLayer)layer; System.out.println("--------------------"); System.out.println("Layer information:"); System.out.println("Layername\t\t = " + fl.getName()); System.out.println("Min-/Maxscale\t = " + fl.getMinimumScale() + "/" + fl.getMaximumScale()); ISymbol symbol = fl.getSelectionSymbol(); if(symbol instanceof SimpleMarkerSymbol) System.out.println("Symboltype\t\t = " + ((SimpleMarkerSymbol)symbol).getNameString()); System.out.println("Status\t\t = " + fl.isVisible()); System.out.println("Definition Query\t = " + fl.getDefinitionExpression()); System.out.println(""); return true; } else{ System.out.println("Layer type unknown! " + layer.getClass().toString()); } return false; } public void getLayer() throws IOException{ logger.debug("getLayer() -> not implemented jet."); return; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :