Skip to content
Permalink
Browse files

Merge branch 'master' into sirs_db_manager

  • Loading branch information
Ailurupoda committed Jan 23, 2019
2 parents 00852f1 + 52df292 commit a80f3d01ee8697dae4df121f9dd22c9ee49a9d05
Showing 549 changed files with 38,057 additions and 8,243 deletions.
@@ -65,7 +65,7 @@ COPY .docker/qgis_resources/supervisor/supervisor.xvfb.conf /etc/supervisor/supe
# - deb installed
# - built from git
# needed to find PyQt wrapper provided by QGIS
ENV PYTHONPATH=/usr/share/qgis/python/:/usr/lib/python3/dist-packages/qgis:/usr/share/qgis/python/qgis
ENV PYTHONPATH=/usr/share/qgis/python/:/usr/share/qgis/python/plugins:/usr/lib/python3/dist-packages/qgis:/usr/share/qgis/python/qgis


WORKDIR /
@@ -32,6 +32,7 @@ matrix:
# QGIS TESTS ON BIONIC
##########################################################
- os: linux
name: building and testing on linux
if: type != cron
services: docker
env:
@@ -44,6 +45,7 @@ matrix:
# CODE LAYOUT
##########################################################
- os: linux
name: code layout
if: type != cron
env:
- TRAVIS_CONFIG=code_layout
@@ -93,6 +95,7 @@ matrix:
# BIONIC DOCKER BUILD ON CRON OR TAG
##########################################################
- os: linux
name: bionic docker build
if: repo = qgis/QGIS AND (tag IS PRESENT OR type = cron)
services: docker
env:
@@ -105,6 +108,7 @@ matrix:
# COSMIC DOCKER BUILD ON CRON OR TAG
##########################################################
- os: linux
name: cosmic docker build
if: repo = qgis/QGIS AND (tag IS PRESENT OR type = cron)
services: docker
env:
@@ -94,6 +94,7 @@ IF(WITH_APIDOC)
${CMAKE_SOURCE_DIR}/src/gui/raster
${CMAKE_SOURCE_DIR}/src/gui/symbology
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/mesh
${CMAKE_SOURCE_DIR}/src/analysis/interpolation
${CMAKE_SOURCE_DIR}/src/analysis/network
${CMAKE_SOURCE_DIR}/src/analysis/processing
@@ -31,7 +31,7 @@
<tr><td align="center"><img src="qrc:/images/flags/vi.svg" height="20"></td><td>Vietnamese</td><td><div title="finished:12244 unfinished:57 untranslated:6734" class="bartodo"><div class="bardone" style="width:64px">64.5</div></div></td><td>Phùng Văn Doanh, Bùi Hữu Mạnh, Nguyễn Văn Thanh, Nguyễn Hữu Phúc, Cao Minh Tu</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/ky.svg" height="20"></td><td>Kirghiz</td><td><div title="finished:11363 unfinished:53 untranslated:7619" class="bartodo"><div class="bardone" style="width:59px">59.8</div></div></td><td>Stéphane Henriod, Azamat Karypov, Salaidin Kamaldinov, Akylbek Chymyrov, Chinara Saparova, Almaz Abdiev, Nurlan Tokbaev, Tatygul Urmambetova, Adilet Bekturov, Nursultan Ismailov, Nurlan Zhusupov</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/ca.svg" height="20"></td><td>Catalan</td><td><div title="finished:11258 unfinished:51 untranslated:7726" class="bartodo"><div class="bardone" style="width:59px">59.3</div></div></td><td>Albert F, Pau Reguant Ridó, Xavier Roijals</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/zh.svg" height="20"></td><td>Chinese traditional</td><td><div title="finished:10778 unfinished:151 untranslated:8106" class="bartodo"><div class="bardone" style="width:57px">57.0</div></div></td><td>Calvin Ngei, Zhang Jun, Richard Xie, Dennis Raylin Chen</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/zh-Hant.svg" height="20"></td><td>Chinese traditional</td><td><div title="finished:10778 unfinished:151 untranslated:8106" class="bartodo"><div class="bardone" style="width:57px">57.0</div></div></td><td>Calvin Ngei, Zhang Jun, Richard Xie, Dennis Raylin Chen</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/hi.svg" height="20"></td><td>Hindi</td><td><div title="finished:9409 unfinished:75 untranslated:9551" class="bartodo"><div class="bardone" style="width:49px">49.6</div></div></td><td>Harish Kumar Solanki</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/sl.svg" height="20"></td><td>Slovenian</td><td><div title="finished:9233 unfinished:85 untranslated:9717" class="bartodo"><div class="bardone" style="width:48px">48.7</div></div></td><td>Jože Detečnik, Dejan Gregor, Jaka Kranjc</td></tr>
<tr><td align="center"><img src="qrc:/images/flags/tr.svg" height="20"></td><td>Turkish</td><td><div title="finished:8972 unfinished:62 untranslated:10001" class="bartodo"><div class="bardone" style="width:47px">47.3</div></div></td><td>Osman Yalçın YILMAZ, Omur Saygin</td></tr>
@@ -61,7 +61,6 @@ Moved Classes {#qgis_api_break_3_0_moved_classes}
-------------

<table>
<caption id="moved_classes">Moved classes</caption>
<tr><th>class<th>Module 2.X<th>Module 3.x
<tr><td>QgsMapLayerModel<td>gui<td>core
<tr><td>QgsMapLayerProxyModel<td>gui<td>core
@@ -72,7 +71,6 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
---------------

<table>
<caption id="renamed_classes">Renamed classes</caption>
<tr><th>API 2.x<th>API 3.X
<tr><td>QgisGui<td>QgsGuiUtils
<tr><td>QgsAbstractGeometryV2<td>QgsAbstractGeometry
@@ -230,15 +228,21 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
<tr><td>vertexData<td>QgsInterpolatorVertexData
</table>


Renamed Enum Values {#qgis_api_break_3_0_renamed_enum_values}
-------------------

<table>
<caption id="renamed_enum_values">Renamed enum values</caption>
<tr><th>class</th><th>API 2.x<th>API 3.X
<tr><td>QgsLayerTreeModelLegendNode<td>SymbolV2LegacyRuleKeyRole<td>SymbolLegacyRuleKeyRole
<tr><td>QgsVectorLayer<td>EditorWidgetV2<td>EditorWidget
</table>


Renamed Methods {#qgis_api_break_3_0_renamed_methods}
---------------

<table>
<caption id="renamed_methods">Renamed method names</caption>
<tr><th>class</th><th>API 2.x<th>API 3.X
<tr><td>QgsAnnotation<td>mapPositionFixed<td>hasFixedMapPosition
<tr><td>QgsApplication<td>defaultStyleV2Path<td>defaultStylePath
@@ -2430,6 +2434,7 @@ displayExpression instead. For the map tip use mapTipTemplate() instead.
- select() replaced by selectByRect()
- selectedFeaturesIds() replaced by selectedFeatureIds()
- selectedFeaturesIterator() was replaced by getSelectedFeatures()
- setDisplayField() has been removed, and its functionality split between setMapTipTemplate() and setDisplayExpression()
- setSelectedFeatures() replaced by selectByIds()
- applyNamedStyle() replaced by importNamedStyle()
- isReadOnly() use readOnly()
@@ -55,6 +55,7 @@ enum MDAL_Status
Err_IncompatibleDataset,
Err_IncompatibleDatasetGroup,
Err_MissingDriver,
Err_MissingDriverCapability,
// Warnings
Warn_UnsupportedElement,
Warn_InvalidElements,
@@ -101,6 +102,9 @@ MDAL_EXPORT DriverH MDAL_driverFromName( const char *name );
*/
MDAL_EXPORT bool MDAL_DR_meshLoadCapability( DriverH driver );

//! Returns whether driver has capability to write/edit dataset (groups)
MDAL_EXPORT bool MDAL_DR_writeDatasetsCapability( DriverH driver );

/**
* Returns name of MDAL driver
* not thread-safe and valid only till next call
@@ -163,6 +167,37 @@ MDAL_EXPORT int MDAL_M_datasetGroupCount( MeshH mesh );
//! Returns dataset group handle
MDAL_EXPORT DatasetGroupH MDAL_M_datasetGroup( MeshH mesh, int index );

/**
* Adds empty (new) dataset group to the mesh
* This increases dataset group count MDAL_M_datasetGroupCount() by 1
*
* The Dataset Group is opened in edit mode.
* To persist dataset group, call MDAL_G_closeEditMode();
*
* It is not possible to read and write to the same group
* at the same time. Finalize edits before reading.
*
* \param mesh mesh handle
* \param driver the driver to use for storing the data
* \param name dataset group name
* \param isOnVertices whether data is defined on vertices
* \param hasScalarData whether data is scalar (false = vector data)
* \param datasetGroupFile file to store the new dataset group
* \returns empty pointer if not possible to create group, otherwise handle to new group
*/
MDAL_EXPORT DatasetGroupH MDAL_M_addDatasetGroup( MeshH mesh,
const char *name,
bool isOnVertices,
bool hasScalarData,
DriverH driver,
const char *datasetGroupFile );

/**
* Returns name of MDAL driver
* not thread-safe and valid only till next call
*/
MDAL_EXPORT const char *MDAL_M_driverName( MeshH mesh );

///////////////////////////////////////////////////////////////////////////////////////
/// MESH VERTICES
///////////////////////////////////////////////////////////////////////////////////////
@@ -247,24 +282,73 @@ MDAL_EXPORT const char *MDAL_G_metadataKey( DatasetGroupH group, int index );
*/
MDAL_EXPORT const char *MDAL_G_metadataValue( DatasetGroupH group, int index );

/**
* Adds new metadata to the group
* Group must be in edit mode MDAL_G_isInEditMode()
*/
MDAL_EXPORT void MDAL_G_setMetadata( DatasetGroupH group, const char *key, const char *val );

/**
* Returns dataset group name
* not thread-safe and valid only till next call
*/
MDAL_EXPORT const char *MDAL_G_name( DatasetGroupH group );

/**
* Returns name of MDAL driver
* not thread-safe and valid only till next call
*/
MDAL_EXPORT const char *MDAL_G_driverName( DatasetGroupH group );

//! Whether dataset has scalar data associated
MDAL_EXPORT bool MDAL_G_hasScalarData( DatasetGroupH group );

//! Whether dataset is on vertices
MDAL_EXPORT bool MDAL_G_isOnVertices( DatasetGroupH group );

/**
* Returns the min and max values of the group
* Returns the minimum and maximum values of the group
* Returns NaN on error
*/
MDAL_EXPORT void MDAL_G_minimumMaximum( DatasetGroupH group, double *min, double *max );

/**
* Adds empty (new) dataset to the group
* This increases dataset group count MDAL_G_datasetCount() by 1
*
* The dataset is opened in edit mode.
* To persist dataset, call MDAL_G_closeEditMode() on parent group
*
* Minimum and maximum dataset values are automatically calculated
*
* \param group parent group handle
* \param time time for dataset
* \param values For scalar data on vertices, the size must be vertex count
* For scalar data on faces, the size must be faces count
* For vector data on vertices, the size must be vertex count * 2 (x1, y1, x2, y2, ..., xN, yN)
* For vector data on faces, the size must be faces count * 2 (x1, y1, x2, y2, ..., xN, yN)
* \param active if null pointer, all faces are active. Otherwise size must be equal to face count.
* \returns empty pointer if not possible to create dataset (e.g. group opened in read mode), otherwise handle to new dataset
*/
MDAL_EXPORT DatasetH MDAL_G_addDataset( DatasetGroupH group,
double time,
const double *values,
const int *active
);

//! Returns whether dataset group is in edit mode
MDAL_EXPORT bool MDAL_G_isInEditMode( DatasetGroupH group );

/**
* Close edit mode for group and all its datasets.
* This may effectively write the data to the files and/or
* reopen the file in read-only mode
*
* When closed, minimum and maximum dataset group values are automatically calculated
*/
MDAL_EXPORT void MDAL_G_closeEditMode( DatasetGroupH group );


///////////////////////////////////////////////////////////////////////////////////////
/// DATASETS
///////////////////////////////////////////////////////////////////////////////////////
@@ -307,7 +391,7 @@ enum MDAL_DataType
MDAL_EXPORT int MDAL_D_data( DatasetH dataset, int indexStart, int count, MDAL_DataType dataType, void *buffer );

/**
* Returns the min and max values of the dataset
* Returns the minimum and maximum values of the dataset
* Returns NaN on error
*/
MDAL_EXPORT void MDAL_D_minimumMaximum( DatasetH dataset, double *min, double *max );
@@ -17,13 +17,20 @@
#include "mdal.h"
#include "mdal_utils.hpp"

#define DRIVER_NAME "2DM"

MDAL::Mesh2dm::Mesh2dm( size_t verticesCount,
size_t facesCount,
size_t faceVerticesMaximumCount,
MDAL::BBox extent,
const std::string &uri,
const std::map<size_t, size_t> vertexIDtoIndex )
: MemoryMesh( verticesCount, facesCount, faceVerticesMaximumCount, extent, uri )
: MemoryMesh( DRIVER_NAME,
verticesCount,
facesCount,
faceVerticesMaximumCount,
extent,
uri )
, mVertexIDtoIndex( vertexIDtoIndex )
{
}
@@ -58,10 +65,10 @@ size_t MDAL::Mesh2dm::vertexIndex( size_t vertexID ) const


MDAL::Driver2dm::Driver2dm():
Driver( "2DM",
Driver( DRIVER_NAME,
"2DM Mesh File",
"*.2dm",
DriverType::CanReadMeshAndDatasets
Capability::ReadMesh
)
{
}
@@ -4,6 +4,8 @@
*/

#include "mdal_3di.hpp"
#include <netcdf.h>
#include <assert.h>

MDAL::Driver3Di::Driver3Di()
: DriverCF(
@@ -126,6 +128,7 @@ void MDAL::Driver3Di::addBedElevation( MDAL::Mesh *mesh )


std::shared_ptr<DatasetGroup> group = std::make_shared< DatasetGroup >(
name(),
mesh,
mesh->uri(),
"Bed Elevation"

0 comments on commit a80f3d0

Please sign in to comment.
You can’t perform that action at this time.