亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? featureclass.java~92~

?? CreateMyFirstMap
?? JAVA~92~
字號(hào):
package myfirstmap;
import com.mapinfo.mapj.MapJ;
import com.mapinfo.unit.LinearUnit;
import com.mapinfo.util.DoublePoint;
import com.mapinfo.util.DoubleRect;
import com.mapinfo.dp.tab.TABDataProviderHelper;
import com.mapinfo.dp.tab.TABTableDescHelper;
import com.mapinfo.mapxtreme.client.MapXtremeDataProviderRef;
import com.mapinfo.mapj.AbstractLayer;
import com.mapinfo.mapj.Layers;
//import com.mapinfo.mapj.Layer;
import com.mapinfo.mapj.FeatureLayer;
import com.mapinfo.dp.TableInfo;
import java.util.List;
import java.util.ArrayList;
import com.mapinfo.dp.util.RewindableFeatureSet;
import com.mapinfo.dp.FeatureSet;
import com.mapinfo.dp.Feature;
import com.mapinfo.dp.Attribute;
import com.mapinfo.dp.Geometry;
import com.mapinfo.dp.PointGeometry;
import com.mapinfo.dp.VectorGeometry;
import com.mapinfo.dp.PointList;
import com.mapinfo.mapj.FeatureFactory;
import com.mapinfo.graphics.Rendition;
import  com.mapinfo.graphics.RenditionImpl;
import java.awt.Color;
import com.mapinfo.dp.annotation.AnnotationDataProvider;
import com.mapinfo.dp.annotation.AnnotationDataProviderHelper;
import com.mapinfo.dp.annotation.AnnotationTableDescHelper;
import com.mapinfo.dp.util.LocalDataProviderRef;
import com.mapinfo.dp.PrimaryKey;
import com.mapinfo.mapxtreme.client.MapXtremeImageRenderer;
import com.mapinfo.xmlprot.mxtj.ImageRequestComposer;
public class FeatureClass
{
  private   String mapxtremeURL="http://901-32:8083/mapxtreme47/mapxtreme";
  private   String mdfFilePath="E:\\MapInfo\\study\\mapmdf\\pla2.mdf";
  public FeatureClass()
  {
  }
  public  void getInfoFromFeature()
  {
   MapJ mapj=new MapJ();
   DoublePoint point=new DoublePoint(018.9608,34.2729);
   DoubleRect bound=new DoubleRect(point,0.31,0.21);
   mapj.setBounds(bound) ;
   LinearUnit unit=LinearUnit.kilometer ;
   mapj.setDistanceUnits(unit) ;
   mapj.setDeviceBounds(new DoubleRect(0,0,800,600)) ;
   //
  try
  {
    mapj.loadMapDefinition(mdfFilePath);
    Layers layers=mapj.getLayers() ;
    AbstractLayer abstractLayer=null;
    FeatureLayer featureLayer=null;
    String layerName;
    TableInfo tableInfo=null;
    List columns=new ArrayList();
    Attribute attribute=null;
    Geometry geom=null;
    PointGeometry pointGeom=null;
    int attributeCount=0;
    DoubleRect rect=null;
    DoublePoint dbPoint=null;
    PointList pointList=null;
    VectorGeometry vectorGeometry=null;
    int count=0;
    for(int i=0;i<layers.size() ;i++)
    {
      featureLayer=(FeatureLayer)layers.get(i) ;
      layerName=featureLayer.getName() ;
      tableInfo=featureLayer.getTableInfo() ;
      //必須清空,因?yàn)橄麓螆?zhí)行下一個(gè)表時(shí),如果它們的字段不一樣,那么在“FeatureSet fSet=featureLayer.searchAll(columns,null);”就會(huì)出現(xiàn)錯(cuò)誤
      count=0;
      columns.clear() ;
      for(int j=0;j<tableInfo.getColumnCount() ;j++)
      {
        String columnName=tableInfo.getColumnName(j) ;
        columns.add(columnName) ;
      }
      //perform a search to get the features(records) from the layer
      FeatureSet fSet=featureLayer.searchAll(columns,null);
      RewindableFeatureSet rfSet=new RewindableFeatureSet(fSet);
      //get the first attribute
      Feature feature=rfSet.getNextFeature() ;
      //the loop throuth all feature in the layer
      while(feature!=null)
      {
        /* get the first attribute (columnData) from the feature Note: If
        we want to re-use the Attribute object later on (after the
        getNextFeature loop), we would need to make a copy of the
        Attribute object, using the copy constructor.
        */
        attribute=feature.getAttribute(0) ;//it's error here
        //get a count of all attributes in the layer
        attributeCount=feature.getAttributeCount() ;
        //get a reference to the grographic information from the feature
        geom=feature.getGeometry() ;
        //if the geometry is a point
        if(geom.getType() ==Geometry.TYPE_POINT )
        {
          pointGeom=(PointGeometry)geom;
          // get the minimum bounding rectangle for the feature
          rect=pointGeom.getBounds() ;
          // get the x,y location where the feature’s label will be
          // anchored
          dbPoint=pointGeom.getLabelPoint(null);
        }else
        {
          vectorGeometry = (VectorGeometry) geom;

          rect = vectorGeometry.getBounds();
          dbPoint = vectorGeometry.getLabelPoint(null);
          double[] points;
          int offset=0;
          int numPoints;
           int pointListCount=vectorGeometry.getPointListCount() ;
          for (int ii=0;ii<vectorGeometry.getPointListCount();++ii)
          {
            // Get the next Point List
            pointList = vectorGeometry.getNextPointList();
            // determine the number of Points in the point group
             numPoints = pointList.getPointCount();
            // Create the point array large enough to hold all the
            // points
            points = new double[numPoints];
            // Call getNextPoints which will put the points into the
            // array
            pointList.getNextPoints(points, offset, numPoints/2);
           }//end this for above
        }//end else
       count++;
        if((count>332)&&(layerName.equals("Line") ))
       {
         System.out.println(">99") ;
       }
       feature=rfSet.getNextFeature() ;
      }//end while
      //rewind the featureSet for the future use
      rfSet.rewind() ;
    }//end the most outer for
  }catch(java.io.IOException  ioe)
  {
    System.out.println("get a "+ioe.getClass() +"\nwith message "+ioe.getMessage() ) ;
    ioe.printStackTrace() ;
  }catch(Exception e)
  {
    System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;
    e.printStackTrace() ;
  }
}//end this function

public void createVariousFeature()
{
  MapJ mapj=new MapJ();
  DoublePoint point=new DoublePoint(108.9608,34.2729);
  DoubleRect bound=new DoubleRect(point ,0.31,0.21);
  mapj.setBounds(bound) ;
  LinearUnit unit=LinearUnit.kilometer ;
  mapj.setDistanceUnits(unit) ;
  mapj.setDeviceBounds(new DoubleRect(0,0,800,600)) ;
  try
  {
  //  mapj.loadMapDefinition(mdfFilePath);
    FeatureFactory feaFac=mapj.getFeatureFactory() ;
    //set attribute object
    Attribute[] attributes=new Attribute[4];
    attributes[0]=new Attribute("feature1");
    attributes[1]=new Attribute("ellpise");
    attributes[2]=new Attribute("point");
    attributes[3]=new Attribute("polyline");
    //set up the rendition object
    //this will not work for a tab files. for tab files we must use
    //com.mapinfo.tab.TABStyleFactory to create an appropirate rendition object
    Rendition rend=RenditionImpl.getDefaultRendition() ;
    //for circle ,specify the edge color and fill color
    rend.setValue(Rendition.STROKE ,Color.cyan );
    rend.setValue(Rendition.FILL ,Color.green );
    // For points, specify the symbol size, font, and color
    rend.setValue(Rendition.SYMBOL_STRING, "@");
    rend.setValue(Rendition.FONT_SIZE, 16);
    rend.setValue(Rendition.FONT_FAMILY, "MapInfo Shields");
    rend.setValue(Rendition.SYMBOL_FOREGROUND, Color.blue);
// For lines, specify the line color and width
    rend.setValue(Rendition.STROKE, Color.green);
    rend.setValue(Rendition.STROKE_WIDTH, 4);
// For ellipses, specify the fill color and opacity
    rend.setValue(Rendition.FILL, Color.blue);
    rend.setValue(Rendition.FILL_OPACITY, new Float(0.40));

    //create circular region
    int circleType=1;
     double circleRadius=2;
    int circleResolution=12;
    //for elliptical region
    //create a integer variable to set the coordsys system of the region.o set for map coordsys,1 set for screen coordsys
    int ellipseType=1;
    //create a variable to set the rotation angle of the ellipse in radiant
    double xRadius=1.0;
    double yRadius=0.25;
    //create a integer variable to specify the number of point to describe the ellipse. if 0,the default 12 will be used
    int ellipseResolution=12;
    //create an annotation layer for storing the feature we are creating
    AnnotationTableDescHelper annotationTDHelper=new AnnotationTableDescHelper("Annotations");
    AnnotationDataProviderHelper annotationDPHelper=new AnnotationDataProviderHelper();
    LocalDataProviderRef localDPRef=new LocalDataProviderRef(annotationDPHelper);
    FeatureLayer annotationLayer=(FeatureLayer)mapj.getLayers() .insertLayer(localDPRef,annotationTDHelper,0,"Annotations");
    //PrimaryKey is taken as an argument by all the create methods and
//cannot be null
    Feature retFeature;
    PrimaryKey pkey = new PrimaryKey(attributes[0]);
    //set the center point for the circle
    DoublePoint centerPoint=new DoublePoint(108.9608,34.2729);
    // Create a Circular Region
    retFeature = feaFac.createCircularRegion(circleType,//type
                                             /*
if the Type is 0, MapJ creates a region whose points are all the same geographic distance from the
 center. Due to the curvature of the earth, and due to the way that coordinate systems and
 map projections work, such a circle might appear lop-sided, rather than circular.
If the type parameter is 1, MapJ creates a region that appears circular on the screen.
However, different points on the circle might not be the same geographic distance from the center
of the circle.
type - An integer representing the type of coordinate system to use in creation of the circle.
Use 0 for map coords and 1 for screen coords.
*/
centerPoint,// The center of the circle given as a DoublePoint.
circleRadius,//the radius of the circle
LinearUnit.mile,//the linear unit of the distance
circleResolution,// The number of points describing the circle. If 0 it will use default of 12.
rend,//The rendition associated with this feature, may be null.
null, //The rendition associated with the label for this feature, may be null.
null,//attributes,//Attributes that are associated with this feature, may be null.
pkey//the PrimaryKey of the new Feature, may be null.
);
    //add the new feature to the annotation layer
    PrimaryKey pkey2=annotationLayer.addFeature(retFeature) ;
//create the ellipse region
DoublePoint    ellipseCenter=new DoublePoint(108.9608,34.3729);
retFeature=feaFac.createEllipticalRegion(ellipseType,ellipseCenter,0,xRadius,yRadius,
   LinearUnit.mile  , ellipseResolution,rend,null,null,new PrimaryKey(attributes[1]));
  annotationLayer.addFeature(retFeature) ;
//creae point
retFeature=feaFac.createPoint(new DoublePoint(108.8,34.2729),rend,null,new PrimaryKey(attributes[2]));
  annotationLayer.addFeature(retFeature) ;
//create ployline
  // Create PolyLine using a 2 x 6 double matrix
// Row 1 contains 3 points(x,y,x,y,x,y) and 2 line segments.
// Row 2 contains 3 points(x,y,x,y,x,y) and 2 line segments.
double pts[][] = { {108.8608,34.2720, 108.8908,34.2720,108.9208,34.270},
      {108.8908,34.2680, 108.8608,34.2680,108.8408,34.2720} };
retFeature = feaFac.createPolyLine(pts, rend, null, null, new PrimaryKey(attributes[3]));
  annotationLayer.addFeature(retFeature) ;
     //
     MapXtremeImageRenderer render=new MapXtremeImageRenderer(mapxtremeURL);
     ImageRequestComposer imageRC=ImageRequestComposer.create(mapj,256,Color.white ,"image/png");
     render.render(imageRC) ;
     render.toFile("E:\\MapInfo\\study\\png\\created.png") ;
  }catch(Exception e)
  {
    System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;
    e.printStackTrace() ;
  }
}
public void searchFeature()
{
  MapJ mapj=new MapJ();
  DoublePoint centerPoint=new DoublePoint(108.9608,34.2729);
  DoubleRect bound=new DoubleRect(centerPoint,0.31,0.21);
  mapj.setBounds(bound) ;
  mapj.setDeviceBounds(new DoubleRect(0,0,800,600)) ;
  Layers layers=null;
  FeatureLayer featureLayer;
  FeatureSet featureSet=null;
  double searchRadius=2;
  List resList=new ArrayList();
  RewindableFeatureSet rfSet=null;
  Feature feature=null;
  try
  {
    mapj.loadMapDefinition(mdfFilePath);
    layers=mapj.getLayers() ;
    int count=0;
    String layerName;
    for(int i=0;i<layers.size() ;i++)
    {
      featureLayer=(FeatureLayer)layers.get(i) ;
      layerName=featureLayer.getName() ;
      feature=null;
//      featureSet=featureLayer.searchWithinRadius(resList,centerPoint,searchRadius,LinearUnit.kilometer ,null);
  //  DoubleRect rect=new DoubleRect(108.9608,34.2729,108.9908,34.3729);
  //    featureSet=featureLayer.searchWithinRectangle(resList,rect,null);
   //   featureSet=featureLayer.searchAtPoint(resList,centerPoint,null) ;
      Attribute attLength=new Attribute(1022);
      String searchCol="length";
      if(layerName.equals("line") )
      {
      featureSet=featureLayer.searchByAttribute(resList,searchCol,attLength,null);
      rfSet=new RewindableFeatureSet(featureSet);
      feature=rfSet.getNextFeature() ;
      }
      while(feature!=null)
      {
        count++;
        feature=rfSet.getNextFeature() ;

      }
      System.out.println("there are "+count+" in "+layerName+" layer ") ;
    }
  }catch(java.io.IOException  ioe)
  {
    System.out.println("get a  "+ioe.getClass() +"\nwith message "+ioe.getMessage() ) ;
  }catch(Exception e)
  {
    System.out.println("get a "+e.getClass() +"\nwith message "+e.getMessage() ) ;
  }
}
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美丰满少妇xxxbbb| 亚洲桃色在线一区| 亚洲欧美成人一区二区三区| 亚洲国产乱码最新视频| 欧美日本一区二区| 欧美精品在线一区二区三区| 久久97超碰色| 99久久er热在这里只有精品15| 欧美羞羞免费网站| 精品视频1区2区3区| 99久久国产综合色|国产精品| 精品视频资源站| 午夜欧美在线一二页| 国产亚洲欧美色| 91首页免费视频| 欧美老年两性高潮| 国产成人在线色| 夜夜嗨av一区二区三区中文字幕 | 丰满亚洲少妇av| 亚洲一级二级在线| 国产亚洲人成网站| 欧美日韩色一区| 国产精品一区久久久久| 国产精品毛片无遮挡高清| 欧美日韩国产综合久久 | 日本vs亚洲vs韩国一区三区二区 | 日本不卡的三区四区五区| 国产精品久久久久久一区二区三区 | 日韩欧美中文字幕精品| 成人精品一区二区三区四区 | 亚洲精品免费电影| 日韩欧美一区二区久久婷婷| 色老头久久综合| 成人永久看片免费视频天堂| 视频在线观看一区二区三区| 亚洲人成网站色在线观看 | 7777精品伊人久久久大香线蕉超级流畅| 国产成a人无v码亚洲福利| 日本vs亚洲vs韩国一区三区二区| 一区二区三区不卡视频| 中文字幕第一区第二区| 欧美videos中文字幕| 日韩一区二区高清| 欧洲另类一二三四区| 成人av午夜影院| 国产在线视频不卡二| 日本中文在线一区| 一区二区三区自拍| 中文字幕亚洲成人| 中文字幕精品一区| 91精品欧美一区二区三区综合在| 久久机这里只有精品| 久久久亚洲高清| 欧洲人成人精品| 国产一区在线观看麻豆| 夜夜揉揉日日人人青青一国产精品| 91精品国产aⅴ一区二区| 91色九色蝌蚪| 精品一区二区三区免费观看| 亚洲欧美日韩电影| 在线不卡欧美精品一区二区三区| 久久精品国产色蜜蜜麻豆| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 丁香啪啪综合成人亚洲小说| 亚洲高清在线视频| 亚洲va欧美va人人爽| 麻豆freexxxx性91精品| 中文字幕不卡在线播放| 91国偷自产一区二区开放时间 | 国产在线精品视频| 欧美午夜精品理论片a级按摩| 亚洲天堂精品视频| 蜜臀av一区二区在线免费观看| 亚洲欧美综合另类在线卡通| 亚洲欧美经典视频| 亚洲一区在线观看网站| 五月婷婷久久综合| 麻豆高清免费国产一区| 国产一区二区三区观看| 日韩欧美中文字幕一区| 欧美丰满高潮xxxx喷水动漫| 欧美日韩国产免费一区二区| 欧美日韩国产综合视频在线观看 | 亚洲美女在线一区| 欧美精品一区二区久久婷婷| 欧美国产视频在线| 麻豆一区二区在线| 欧美国产精品劲爆| 欧美性生交片4| 国产精品一区在线观看你懂的| www.爱久久.com| 日韩一区二区在线观看视频播放| 国产精品久久久久影院亚瑟| 日日骚欧美日韩| 99re66热这里只有精品3直播| 欧美日韩国产精选| 国产精品久久三| 美女一区二区久久| 91福利精品视频| 国产精品女主播在线观看| 男人的天堂久久精品| 一本一道综合狠狠老| 国产亚洲欧美色| 麻豆91在线播放| 欧美色手机在线观看| 欧美高清在线精品一区| 久久精品国产亚洲aⅴ| 欧美午夜电影网| 国产精品美女久久久久aⅴ国产馆| 另类小说欧美激情| 欧美优质美女网站| √…a在线天堂一区| 国产福利精品一区二区| 日韩免费电影网站| 丁香婷婷综合五月| 精品国免费一区二区三区| 性感美女极品91精品| 在线视频综合导航| 亚洲欧洲一区二区在线播放| 国产精品一区三区| 精品国精品自拍自在线| 日韩二区三区在线观看| 欧美日韩高清影院| 亚洲大片精品永久免费| 欧美性受极品xxxx喷水| 亚洲黄色小视频| 91小视频在线免费看| 国产精品电影一区二区| a亚洲天堂av| 国产精品久线在线观看| 不卡欧美aaaaa| 中文字幕亚洲一区二区va在线| 成人午夜在线播放| 中文字幕第一区二区| 成人精品小蝌蚪| 精品剧情v国产在线观看在线| 丁香啪啪综合成人亚洲小说| 中文字幕高清一区| 欧美吻胸吃奶大尺度电影| 久久99国产精品免费| 亚洲欧洲日本在线| 欧美电影免费观看高清完整版在线| 久久99精品久久久久久| 日韩一区有码在线| 欧美精品一区二区蜜臀亚洲| 国产综合色在线| 午夜欧美2019年伦理| 91久久精品网| 成人a免费在线看| 国产精品福利影院| 91精品国产全国免费观看| 懂色av一区二区在线播放| 一区二区三区成人| 久久综合九色综合欧美亚洲| 精品国产乱码久久久久久久| 欧美日韩视频专区在线播放| 欧美日韩国产免费一区二区 | 久久国产综合精品| 国产精品私房写真福利视频| 欧美综合在线视频| 国产欧美日韩另类一区| 免费成人性网站| 97成人超碰视| 日韩三级高清在线| 国内不卡的二区三区中文字幕 | 欧美一区二区三区的| 国产在线一区二区综合免费视频| 欧美激情在线看| 在线免费观看成人短视频| 免费一级片91| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | av日韩在线网站| 久久国产夜色精品鲁鲁99| 日本视频中文字幕一区二区三区| 天天综合网 天天综合色| 91国产视频在线观看| 亚洲精品视频免费观看| 欧美午夜不卡视频| 男人的天堂久久精品| 久久久精品欧美丰满| 国产成人综合亚洲网站| 欧美激情综合网| 91精品福利视频| 亚洲精品中文在线影院| 91豆麻精品91久久久久久| 蜜臀av国产精品久久久久| 久久免费精品国产久精品久久久久| 国产 日韩 欧美大片| 一区二区三区免费| 午夜影院久久久| 国产一二精品视频| 精品国产乱子伦一区| 美女在线观看视频一区二区| 91精品综合久久久久久| 日韩一级黄色片| 久久精品国产亚洲5555| 一区在线观看免费| 欧美精品黑人性xxxx| 国产成人精品免费网站| 亚洲综合视频网|