DataSet.Crs Property
Gets or sets the coordinate reference system of the DataSet.
Syntax
public Crs Crs { get; set; }
Property Value
Default: Differs depending on type. See the table below.
The coordinate reference system of the dataset.
This property can only be modified before the dataset has been initialized. Attempting to modify it after initialization will cause an exception to be thrown.
Default values
Class | Default value |
---|---|
AixmDataSet | Not used. Only writable before initialization. |
ArincDataSet | Not used. Only writable before initialization. |
CatalogDataSet | null Only writable before initialization. |
CatalogLoadDataSetSet | Crs.Wgs84LongLat Only writable before initialization. |
CM93RasterDataSet | Not used. Only writable before initialization. |
CM93VectorDataSet | Not used. Only writable before initialization. |
CmrgDataSet | Not used. Only writable before initialization. |
CoverageDataSet | Crs.Wgs84LongLat Only writable before initialization. |
CustomDataSetProxy | Not used. Only writable before initialization. |
DataSetSet | Crs.Wgs84LongLat Only writable before initialization. |
DemDataSet | Crs.Wgs84LongLat Only writable before initialization. |
DensityDataSet | Crs.Wgs84LongLat Only writable before initialization. |
DfadDataSet | Not used. Only writable before initialization. |
DirectoryDataSet | Crs.Wgs84LongLat Only writable before initialization. |
DtedDataSet | Not used. Only writable before initialization. |
DwgDxfDataSet | Crs.Wgs84LongLat Only writable before initialization. |
EcwDataSet | null Only writable before initialization. |
GdalDataSet | null Only writable before initialization. |
GribDataSet | null Only writable before initialization. |
GridAsciiDataSet | Crs.Wgs84LongLat Only writable before initialization. |
GroupDataSet | Crs.Wgs84LongLat Only writable before initialization. |
HdrDataSet | Crs.Wgs84LongLat Only writable before initialization. |
ImageDataSet | null Only writable before initialization. |
Jpeg2000DataSet | null Only writable before initialization. |
MapPackageDataSet | null Only writable before initialization. |
MemoryDataSet | Crs.Wgs84LongLat Only writable before initialization. |
MifDataSet | null Only writable before initialization. |
MrSidDataSet | null Only writable before initialization. |
MvtDataSet | Not used. Only writable before initialization. |
MySqlDataSet | Crs.Wgs84LongLat Only writable before initialization. |
OgcWcsDataSet | Not used. Only writable before initialization. |
OgcWfsDataSet | Not used. Only writable before initialization. |
OgrDataSet | null Only writable before initialization. |
OracleDataSet | Crs.Wgs84LongLat Only writable before initialization. |
PostgreSqlDataSet | Crs.Wgs84LongLat Only writable before initialization. |
RaveGeoDataSet | null Only writable before initialization. |
RpfDataSet | Not used. Only writable before initialization. |
S57DataSet | Not used. Only writable before initialization. |
ShapefileDataSet | null Only writable before initialization. |
SqlServerDataSet | Crs.Wgs84LongLat Only writable before initialization. |
VpfDataSet | Not used. Only writable before initialization. |
Remarks
This property may be set in several different ways.
For some datasets, the coordinate reference system is implied by the data format. DTED data for instance is always defined in WGS84 longitude/latitude so the dataset automatically sets this property. These datasets do not expose the crs property at all in Carmenta Studio.
Some datasets can automatically deduce the coordinate reference system from the data itself. These will expose the property in Carmenta Studio, but with an empty default value. If the property is not specified, the dataset will try to set the property automatically, but you can override this behavior by explicitly setting the property in the configuration or in application code.
A CustomDataSetProxy will retrieve its coordinate reference system from its custom dataset implementation.
For all other datasets, the coordinate reference system will have a default value, typically Crs.Wgs84LongLat, but it can be overridden by explicitly specifying the property in the configuration file or in application code.
Please see Letting a DataSet read its CRS from data files for more information.
Note that this property specifies the coordinate reference system used by other properties and methods, like Bounds and GetDataCoverage, and that normally the datasets also generate features with this coordinate reference system. However this is not always true. For instance, some datasets like GdalDataSet or ShapefileDataSet reading coordinate reference system from files may find files with different coordinate reference systems. In this case the dataset selects one of these for initializing the Crs property, but it may still generate features in different coordinate reference systems. This shouldn't cause any problems though, eventually the features will always be reprojected to the coordinate reference system used in the view.
Platforms
Windows, Linux, Android