diff --git a/DataViewer/DataSource.cpp b/DataViewer/DataSource.cpp
index 104177e7..e1b220c0 100644
--- a/DataViewer/DataSource.cpp
+++ b/DataViewer/DataSource.cpp
@@ -50,6 +50,7 @@ bool IDataSource::IsWritable(GdaConst::DataSourceType ds_type)
ds_type == GdaConst::ds_gpkg ||
ds_type == GdaConst::ds_mysql ||
ds_type == GdaConst::ds_oci ||
+ ds_type == GdaConst::ds_parquet ||
ds_type == GdaConst::ds_postgresql )
return true;
return false;
@@ -141,6 +142,8 @@ wxString IDataSource::GetDataTypeNameByExt(wxString ext)
ds_format = "Idrisi";
else if(ext.CmpNoCase("ods")==0)
ds_format = "ODS";
+ else if(ext.CmpNoCase("parquet")==0)
+ ds_format = "Parquet";
//else
// ds_format = "Unknown";
@@ -192,6 +195,7 @@ IDataSource* IDataSource::CreateDataSource(wxString data_type_name,
type == GdaConst::ds_gpkg ||
type == GdaConst::ds_xls ||
type == GdaConst::ds_xlsx ||
+ type == GdaConst::ds_parquet ||
type == GdaConst::ds_geo_json )
{
// using xxx to create DataSource instance
@@ -249,6 +253,7 @@ IDataSource* IDataSource::CreateDataSource(wxString ds_json)
type == GdaConst::ds_gpkg ||
type == GdaConst::ds_xls ||
type == GdaConst::ds_xlsx ||
+ type == GdaConst::ds_parquet ||
type == GdaConst::ds_geo_json )
{
json_spirit::Value json_ds_path;
diff --git a/DialogTools/DatasourceDlg.cpp b/DialogTools/DatasourceDlg.cpp
index 8f72aedb..41ebb384 100644
--- a/DialogTools/DatasourceDlg.cpp
+++ b/DialogTools/DatasourceDlg.cpp
@@ -52,6 +52,7 @@ void DatasourceDlg::Init()
ds_file_path = wxFileName("");
// create file type dataset pop-up menu dynamically
+ ds_names.Add("GeoParquet (*.parquet)|*.parquet");
ds_names.Add("ESRI Shapefile (*.shp)|*.shp");
ds_names.Add("ESRI File Geodatabase (*.gdb)|*.gdb");
ds_names.Add("GeoJSON (*.geojson;*.json)|*.geojson;*.json");
diff --git a/GdaConst.cpp b/GdaConst.cpp
index 41eab87f..a7f05631 100644
--- a/GdaConst.cpp
+++ b/GdaConst.cpp
@@ -773,6 +773,17 @@ void GdaConst::init()
datasrc_field_illegal_regex[ds_dbf] = db_field_name_illegal_regex;
datasrc_field_casesensitive[ds_dbf] = false;
+ datasrc_str_to_type["Parquet"] = ds_parquet;
+ datasrc_type_to_prefix[ds_parquet] = "";
+ datasrc_type_to_fullname[ds_parquet] = "Parquet";
+ // share the same with DBF
+ datasrc_table_lens[ds_parquet] = 128;
+ datasrc_field_lens[ds_parquet] = 10;
+ datasrc_field_warning[ds_parquet] = default_field_warning;
+ datasrc_field_regex[ds_parquet] = db_field_name_regex;
+ datasrc_field_illegal_regex[ds_parquet] = db_field_name_illegal_regex;
+ datasrc_field_casesensitive[ds_parquet] = false;
+
datasrc_str_to_type["ESRI Shapefile"] = ds_shapefile;
datasrc_type_to_prefix[ds_shapefile] = "";
datasrc_type_to_fullname[ds_shapefile] = "ESRI Shapefile";
diff --git a/GdaConst.h b/GdaConst.h
index 96f2c493..03dffc38 100644
--- a/GdaConst.h
+++ b/GdaConst.h
@@ -73,7 +73,8 @@ class GdaConst {
ds_esri_personal_gdb, ds_esri_arc_sde,
ds_csv, ds_dbf, ds_geo_json, ds_gml, ds_kml,
ds_mapinfo, ds_mysql, ds_ms_sql, ds_oci, ds_odbc, ds_postgresql,
- ds_shapefile, ds_sqlite, ds_gpkg, ds_wfs, ds_xls, ds_xlsx, ds_osm, ds_ods, ds_cartodb, ds_unknown };
+ ds_shapefile, ds_sqlite, ds_gpkg, ds_wfs, ds_xls, ds_xlsx, ds_osm,
+ ds_ods, ds_cartodb, ds_parquet, ds_unknown };
static std::map datasrc_str_to_type;
static std::map datasrc_type_to_str;