示例#1
0
        public com.esri.ags.Feature featureToMapPoint(IFeature feat)
        {
            IGeometry m_geom = feat.Shape;

            m_geom.Project(m_PCSout as ISpatialReference);
            com.esri.ags.geometry.MapPoint mp = extractMapPoint(m_geom);
            Hashtable attributes = extractAttributes(feat);

            return(new com.esri.ags.Feature(mp, (object)attributes));
        }
示例#2
0
 private com.esri.ags.geometry.Polygon extractPolygon(IGeometry geom)
 {
     Polygon poly = (Polygon)geom;
     int count = poly.PointCount;
     com.esri.ags.geometry.MapPoint[] mp = new com.esri.ags.geometry.MapPoint[count];
     for (int i = 0; i < count; i++)
     {
         IPoint pt = poly.get_Point(i);
         mp[i] = new com.esri.ags.geometry.MapPoint(pt.X, pt.Y, m_sr);
     }
     com.esri.ags.geometry.Polygon pg = new com.esri.ags.geometry.Polygon();
     pg.rings = new com.esri.ags.geometry.MapPoint[1][];
     pg.rings[0] = mp;
     return pg;
 }
示例#3
0
        private com.esri.ags.geometry.Polygon extractPolygon(IGeometry geom)
        {
            Polygon poly  = (Polygon)geom;
            int     count = poly.PointCount;

            com.esri.ags.geometry.MapPoint[] mp = new com.esri.ags.geometry.MapPoint[count];
            for (int i = 0; i < count; i++)
            {
                IPoint pt = poly.get_Point(i);
                mp[i] = new com.esri.ags.geometry.MapPoint(pt.X, pt.Y, m_sr);
            }
            com.esri.ags.geometry.Polygon pg = new com.esri.ags.geometry.Polygon();
            pg.rings    = new com.esri.ags.geometry.MapPoint[1][];
            pg.rings[0] = mp;
            return(pg);
        }
示例#4
0
        private com.esri.ags.geometry.Polyline extractPolyline(IGeometry geom)
        {
            Polyline line  = (Polyline)geom;
            int      count = line.PointCount;

            com.esri.ags.geometry.MapPoint[] path = new com.esri.ags.geometry.MapPoint[count];
            for (int i = 0; i < count; i++)
            {
                IPoint pt = line.get_Point(i);
                path[i] = new com.esri.ags.geometry.MapPoint(pt.X, pt.Y, m_sr);
            }
            com.esri.ags.geometry.Polyline pl = new com.esri.ags.geometry.Polyline();
            pl.paths    = new com.esri.ags.geometry.MapPoint[1][];
            pl.paths[0] = path;
            return(pl);
        }
示例#5
0
 private com.esri.ags.geometry.Polyline extractPolyline(IGeometry geom)
 {
     Polyline line = (Polyline)geom;
     int count = line.PointCount;
     com.esri.ags.geometry.MapPoint[] path = new com.esri.ags.geometry.MapPoint[count];
     for (int i = 0; i < count; i++)
     {
         IPoint pt = line.get_Point(i);
         path[i] = new com.esri.ags.geometry.MapPoint(pt.X, pt.Y, m_sr);
     }
     com.esri.ags.geometry.Polyline pl = new com.esri.ags.geometry.Polyline();
     pl.paths = new com.esri.ags.geometry.MapPoint[1][];
     pl.paths[0] = path;
     return pl;
 }