public RstReader(string filename) { _geoImage = IGeoImage.GeoOpen(filename); GeoImage g = _geoImage as GeoImage; _fullEnvelope = new Envelope(g.MinX, g.MinY, g.MaxX, g.MaxY); _coordType = g.IsProjected ? enumCoordinateType.Projection : enumCoordinateType.Geographic; _sref = SpatialReferenceFactory.GetSpatialReferenceByWKT(g.ProjectDescription, enumWKTSource.GDAL); _byteCountPerPixel = GetBandCount(_geoImage.DataType); }
public FeatureSplitterByProjection(string spatialRef) { ISpatialReference spRef = SpatialReferenceFactory.GetSpatialReferenceByWKT(spatialRef, enumWKTSource.EsriPrjFile); if (spRef != null) { _computer = new SplitRangesComputer(spRef); _isNeedSplit = _computer.ComputeValidGeoRange(out _centerLont, out _minLat, out _maxLat, out _minLon, out _maxLon); } }
public static MapArguments FromXElement(XElement ele) { if (ele == null) { return(null); } MapArguments arg = new MapArguments(); arg.BackColor = ColorHelper.StringToColor(ele.Attribute("backcolor").Value); if (ele.Element("FullExtent") != null) { arg.FullExtent = XElementToEnvelope(ele.Element("FullExtent")); } if (ele.Element("Extent") != null) { arg.Extent = XElementToEnvelope(ele.Element("Extent")); } if (ele.Attribute("smoothingmode") != null) { string sm = ele.Attribute("smoothingmode").Value; SmoothingMode smode = SmoothingMode.Default; foreach (SmoothingMode s in Enum.GetValues(typeof(SmoothingMode))) { if (s.ToString() == sm) { smode = s; break; } } arg.SmoothingMode = smode; } if (ele.Attribute("spatialreference") != null) { try { string sf = ele.Attribute("spatialreference").Value; arg._targetSpatialReference = SpatialReferenceFactory.GetSpatialReferenceByWKT(sf, enumWKTSource.EsriPrjFile); } catch (Exception ex) { Log.WriterException(ex); } } return(arg); }