Package chunmap.model.crs

Examples of chunmap.model.crs.CoordinateRef


    super.addButton();
   
    UiUtil.addButton(frame,map,"墨卡托投影",new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent arg0) {
        CoordinateRef target = new CoordinateRef();
              target.setProjection(new Mercator());

              ReProjOp.changeMapCRS(map.getLayerCollection(), target);

              map.fullView();
              map.refreshMap();
View Full Code Here


import chunmap.view.layer.VectorLayer;

public class ReProjOp {
  public static void changeCRS(FeatureCollection fc,CoordinateRef target)
    {
        CoordinateRef source = fc.getMetadata().getCrs();
        final ReProjection rp = new ReProjection(target, source);

        fc.each(new VisitAction(){
      @Override
      public void execute(Feature f) {
View Full Code Here

    String path1="D:\\Temp\\mapdata\\cntry02\\cntry02.shp";
    VectorLayer layer =  LayerFactory.openShapeFile(path1,1);
    layer.setDefaultStyle(new Symbol[]{new GeneralSymbol(),new LabelSymbol()});
   
    //reproj
    CoordinateRef target = new CoordinateRef();
        target.setProjection(new Mercator());
    ReProjOp.changeCRS(layer.getFeatures(), target);
   
    return layer;
  }
View Full Code Here

    style.setNeedArea(false);
    style.setStroke(new BasicStroke(3));
    layer1.setDefaultStyle(new Symbol[]{new GeneralSymbol(style)});
   
    //reproj
    CoordinateRef target = new CoordinateRef();
        target.setProjection(new Mercator());
    ReProjOp.changeCRS(layer1.getFeatures(), target);
   
        map.getLayerCollection().add(layer1);
  }
View Full Code Here

TOP

Related Classes of chunmap.model.crs.CoordinateRef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.