Version: 0.6.0
gpvector.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Toolbox)
3  * Purpose: vector dataset functions.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009,2011,2014 Dmitry Baryshnikov
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 
22 #pragma once
23 
24 #include "wxgis/geoprocessing/geoprocessing.h"
25 #include "wxgis/core/core.h"
26 #include "wxgis/datasource/featuredataset.h"
27 #include "wxgis/core/format.h"
28 #include "wxgis/catalog/gxfilters.h"
29 
30 typedef struct _st_field_map
31 {
32  unsigned nDstFieldNo;
33  unsigned nSrsFieldNo;
34  OGRFieldType eFieldType;
36 
38 {
39 public:
40  wxGISConfigOptionReset(CPLString sName, CPLString sSetValue, CPLString sResetValue)
41  {
42  m_sName = sName;
43  m_sSetValue = sSetValue;
44  m_sResetValue = sResetValue;
45  CPLSetConfigOption(m_sName, m_sSetValue);
46  }
48  {
49  CPLSetConfigOption(m_sName, m_sResetValue);
50  }
51 protected:
52  CPLString m_sName, m_sSetValue, m_sResetValue;
53 };
54 
62 WXDLLIMPEXP_GIS_GP bool CopyRows(wxGISFeatureDataset* const pSrcDataSet, wxGISFeatureDataset* const pDstDataSet, OGRwkbGeometryType eFilterGeomType = wkbUnknown, bool bToMulti = true, ITrackCancel* const pTrackCancel = NULL);
63 WXDLLIMPEXP_GIS_GP bool CopyRows(wxGISTable* const pSrcDataSet, wxGISTable* const pDstDataSet, ITrackCancel* const pTrackCancel = NULL);
64 
65 /*bool WXDLLIMPEXP_GIS_GP Project(wxGISFeatureDatasetSPtr pDSet, CPLString sPath, wxString sName, IGxObjectFilter* pFilter, OGRSpatialReference* pNewSpaRef, ITrackCancel* pTrackCancel);
66 OGRGeometry WXDLLIMPEXP_GIS_GP *Intersection(OGRGeometry* pFeatureGeom, OGRPolygon* pRgn, OGREnvelope* pRgnEnv);
71 /*OGRGeometry WXDLLIMPEXP_GIS_GP *CheckRgnAndTransform(OGRGeometry* pFeatureGeom, OGRPolygon* pRgn1, OGRPolygon* pRgn2, OGREnvelope* pRgnEnv1, OGREnvelope* pRgnEnv2, OGRCoordinateTransformation *poCT);
72 bool WXDLLIMPEXP_GIS_GP GeometryVerticesToPoints(wxGISFeatureDatasetSPtr pDSet, CPLString sPath, wxString sName, IGxObjectFilter* pFilter, wxGISQueryFilter* pQFilter = NULL, ITrackCancel* pTrackCancel = NULL);
73 bool GeometryVerticesToPointsDataset(long nGeomFID, OGRGeometry* pGeom, wxGISFeatureDatasetSPtr pDSet, OGRCoordinateTransformation *poCT, long &nFidCounter, ITrackCancel* pTrackCancel);
74 */
75 WXDLLIMPEXP_GIS_GP bool ExportFormat(wxGISFeatureDataset* const pSrsDataSet, const CPLString &sPath, const wxString &sName, wxGxObjectFilter* const pFilter, const wxGISSpatialFilter &SpaFilter = wxGISNullSpatialFilter, char ** papszDataSourceOptions = NULL, char ** papszLayerOptions = NULL, bool bToMulti = true, ITrackCancel* const pTrackCancel = NULL);
76 WXDLLIMPEXP_GIS_GP bool ExportFormat(wxGISTable* const pSrsDataSet, const CPLString &sPath, const wxString &sName, wxGxObjectFilter* const pFilter, const wxGISSpatialFilter &SpaFilter = wxGISNullSpatialFilter, char ** papszDataSourceOptions = NULL, char ** papszLayerOptions = NULL, ITrackCancel* const pTrackCancel = NULL);
77 
78 WXDLLIMPEXP_GIS_GP bool ExportFormatEx(wxGISFeatureDataset* const pSrsDataSet, const CPLString &sPath, const wxString &sName, wxGxObjectFilter* const pFilter, const wxGISSpatialFilter &SpaFilter = wxGISNullSpatialFilter, OGRFeatureDefn* const poFields = NULL, const wxGISSpatialReference &oSpatialRef = wxNullSpatialReference, char ** papszDataSourceOptions = NULL, char ** papszLayerOptions = NULL, bool bCreateEmpty = false, OGRwkbGeometryType eFilterGeomType = wkbUnknown, bool bToMulti = true, ITrackCancel* const pTrackCancel = NULL);
79 WXDLLIMPEXP_GIS_GP bool ExportFormatEx(wxGISTable* const pSrsDataSet, const CPLString &sPath, const wxString &sName, wxGxObjectFilter* const pFilter, const wxGISSpatialFilter &SpaFilter = wxGISNullSpatialFilter, OGRFeatureDefn* const poFields = NULL, char ** papszDataSourceOptions = NULL, char ** papszLayerOptions = NULL, bool bCreateEmpty = false, ITrackCancel* const pTrackCancel = NULL);
80 
112 WXDLLIMPEXP_GIS_GP wxGISDataset *CreateDataset(const CPLString &sPath, const wxString &sName, wxGxObjectFilter* const pFilter, OGRFeatureDefn* const poFields, const wxGISSpatialReference &oSpatialRef = wxNullSpatialReference, char ** papszDataSourceOptions = NULL, char ** papszLayerOptions = NULL, ITrackCancel* const pTrackCancel = NULL);
113 
118 /*
119 bool WXDLLIMPEXP_GIS_GP GeometryVerticesToTextFile(wxGISFeatureDatasetSPtr pDSet, CPLString sPath, wxGISCoordinatesFormat &oFrmt, wxGISQueryFilter* pQFilter = NULL, ITrackCancel* pTrackCancel = NULL);
120 CPLString WXDLLIMPEXP_GIS_GP GeometryToText(long nGeomFID, OGRGeometry* pGeom, wxGISCoordinatesFormat &oFrmt, ITrackCancel* pTrackCancel = NULL);
121 void WXDLLIMPEXP_GIS_GP PointToText(CPLString &osData, OGRPoint* pPoint, wxGISCoordinatesFormat &oFrmt);
122 void WXDLLIMPEXP_GIS_GP LineToText(CPLString &osData, OGRLineString* pLine, wxGISCoordinatesFormat &oFrmt);
123 */
124 
Definition: table.h:37
A TrackCancel interface class.
Definition: core.h:144
Definition: dataset.h:33
Definition: gpvector.h:37
Definition: filter.h:49
Definition: gdalinh.h:57
Definition: featuredataset.h:32
Definition: gxfilters.h:33
Definition: gpvector.h:30