SpatialReference constructor
Creates a spatial reference based on WKID for the horizontal coordinate system and vertical coordinate system.
The method creates a spatial reference that has both horizontal and vertical coordinate systems. When the vertical WKID is 0, the method is equivalent to calling SpatialReference.new, and does not define a vertical coordinate system part.
Parameters:
wkid
— The well-known ID of the horizontal coordinate system. Must be a positive value.verticalWkid
— The well-known ID of the vertical coordinate system. Must be a non negative value.
Implementation
factory SpatialReference({
required int wkid,
int verticalWkid = 0,
}) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_SpatialReference_createVerticalWKID(
wkid,
verticalWkid,
errorHandler,
);
});
return SpatialReference._withHandle(handle);
}