Exemple #1
0
        public IFeatureSet Reproject(ISpatialReference newProjection, out int reprojectedCount)
        {
            int count = 0;

            var sf = _shapefile.Reproject(newProjection.GetInternal(), ref count);

            reprojectedCount = count;

            return(WrapShapefile(sf));
        }
Exemple #2
0
        public bool CreateLayer(string layerName, GeometryType geometryType, ISpatialReference projection = null, string creationOptions = "")
        {
            var           shpType = GeometryHelper.GeometryType2ShpType(geometryType);
            GeoProjection gp      = null;

            if (projection != null)
            {
                gp = projection.GetInternal();
            }
            return(_datasource.CreateLayer(layerName, shpType, gp, creationOptions));
        }
Exemple #3
0
 public bool ReprojectInPlace(ISpatialReference newProjection, ref int reprojectedCount)
 {
     return(_shapefile.ReprojectInPlace(newProjection.GetInternal(), ref reprojectedCount));
 }
 public bool CopyFrom(ISpatialReference sourceProj)
 {
     return(_projection.CopyFrom(sourceProj.GetInternal()));
 }
 public bool StartTransform(ISpatialReference target)
 {
     return(_projection.StartTransform(target.GetInternal()));
 }
 public bool GetIsSameGeogCoordinateSystem(ISpatialReference proj)
 {
     return(_projection.IsSameGeogCS[proj.GetInternal()]);
 }
 public bool IsSameExt(ISpatialReference proj, IEnvelope bounds, int numSamplingPoints = 8)
 {
     return(_projection.IsSameExt[proj.GetInternal(), bounds.GetInternal(), numSamplingPoints]);
 }
 public bool IsSame(ISpatialReference proj)
 {
     return(_projection.IsSame[proj.GetInternal()]);
 }
Exemple #9
0
        public IFeatureSet ReprojectShapefile(IFeatureSet sf, ISpatialReference source, ISpatialReference target)
        {
            var result = _utils.ReprojectShapefile(sf.GetInternal(), source.GetInternal(), target.GetInternal());

            return(result != null ? new FeatureSet(result) : null);
        }