Получение высоты блока растровых данных
#include <gis/gis_raw.h>int gis_data_raw_get_raster_block_height( const gis_data_raw_context_t raw_ctx, uint32_t index, uint32_t *block_height );
gishelper
Функция возвращает высоту блока данных в текущей выбранной растровой карте в разделяемой области памяти.
gis_core_connection_t connection;gis_core_request_parameters_t map;gis_data_raw_context_t raw_ctx;gis_core_link_init( &connection );gis_core_link_connect( &connection, 777 );gis_core_databuffer_attach( &connection );gis_core_request_parameters_init( &map );gis_core_databuffer_data_request( &connection, &map, 1 );gis_data_raw_ctx_alloc( &raw_ctx );gis_data_raw_ctx_import_databuffer( raw_ctx );gis_data_raw_select_first_map( raw_ctx );do {if ( GIS_IS_CORE_MAP_DATA_SOURCE_VECTOR( gis_data_raw_map_get_data_source( raw_ctx ) ) )continue;size_t block_number = 0;uint32_t block_height = 0;gis_data_raw_get_raster_block_count( raw_ctx, &block_number );if ( gis_data_raw_get_raster_block_height( raw_ctx, 0, &block_height ) != EOK ){gis_data_raw_ctx_free( &raw_ctx );gis_core_databuffer_detach();gis_core_link_destroy( &connection, true );printf( "Error\n" );return 1;}if ( block_height != 256 ){gis_data_raw_ctx_free( &raw_ctx );gis_core_databuffer_detach();gis_core_link_destroy( &connection, true );printf( "Incorrect height: %d\n", block_height );return 1;}} while ( gis_data_raw_select_next_map( raw_ctx ) == EOK);gis_data_raw_ctx_free( &raw_ctx );gis_core_databuffer_detach();gis_core_link_destroy( &connection, true );
ПК ЦКИ для ЗОСРВ «Нейтрино»
gis_data_raw_context_t, gis_data_raw_get_raster_block_count(), gis_data_raw_get_raster_block_width(), gis_data_raw_get_raster_width_in_blocks(), gis_data_raw_get_raster_height_in_blocks(), gis_data_raw_get_raster_width_in_elements(), gis_data_raw_get_raster_height_in_elements().
1.1.0
Предыдущий раздел: Описание API картографического фреймворка