\hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser}{}\doxysection{osgeo\+::proj\+::io\+::WKTParser Class Reference}
\label{classosgeo_1_1proj_1_1io_1_1WKTParser}\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}


Parse a WKT string into the appropriate subclass of \mbox{\hyperlink{classosgeo_1_1proj_1_1util_1_1BaseObject}{util\+::\+Base\+Object}}.  




{\ttfamily \#include $<$io.\+hpp$>$}

\doxysubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum class \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3}{WKTGuessed\+Dialect}} \{ \newline
\mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3ac634e196cf84127855e2ff4569674d0d}{WKT2\+\_\+2019}}
, \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a127c3d731e34f71ebb200e6e06ad5a5c}{WKT2\+\_\+2018}} = WKT2\+\_\+2019
, \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a50ef9162833d7413d4985160f849ddb9}{WKT2\+\_\+2015}}
, \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a85c43e48faba72b30e6501b41536afe5}{WKT1\+\_\+\+GDAL}}
, \newline
\mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a8da08577d1e0b736b2259c71c40f0e38}{WKT1\+\_\+\+ESRI}}
, \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3aee6dcdfdd118e0afe68056a1f14c79a4}{NOT\+\_\+\+WKT}}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_ae20e7a5bb7f17a066647dae9fb2a66ff}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_ae20e7a5bb7f17a066647dae9fb2a66ff}} 
\mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser}{WKTParser}} \& {\bfseries attach\+Database\+Context} (const \mbox{\hyperlink{namespaceosgeo_1_1proj_1_1io_ac071e92c14195058e37bcd4c7b75b42f}{Database\+Context\+Ptr}} \&db\+Context)
\begin{DoxyCompactList}\small\item\em Attach a database context, to allow queries in it if needed. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_aa304679b2d130edf4b7055faf989f2e5}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_aa304679b2d130edf4b7055faf989f2e5}} 
\mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser}{WKTParser}} \& {\bfseries set\+Strict} (bool strict)
\begin{DoxyCompactList}\small\item\em Set whether parsing should be done in strict mode. \end{DoxyCompactList}\item 
std\+::list$<$ std\+::string $>$ \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a9bcb0096556541209c34ad02766cd9d0}{warning\+List}} () const
\begin{DoxyCompactList}\small\item\em Return the list of warnings found during parsing. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser}{WKTParser}} \& \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_af2a70beb0e67036f115a1cdea77f7dbb}{set\+Unset\+Identifiers\+If\+Incompatible\+Def}} (bool unset)
\begin{DoxyCompactList}\small\item\em Set whether object identifiers should be unset when there is a contradiction between the definition from WKT and the one from the database. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structosgeo_1_1proj_1_1util_1_1BaseObjectNNPtr}{util\+::\+Base\+Object\+NNPtr}} \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a8931fbaea1d67eff5098da93b38de6bb}{create\+From\+WKT}} (const std\+::string \&wkt)
\begin{DoxyCompactList}\small\item\em Instantiate a sub-\/class of Base\+Object from a WKT string. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a5c7ac955cdb57ae275900d1eb511aa7f}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a5c7ac955cdb57ae275900d1eb511aa7f}} 
\mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3}{WKTGuessed\+Dialect}} {\bfseries guess\+Dialect} (const std\+::string \&wkt) noexcept
\begin{DoxyCompactList}\small\item\em Guess the \char`\"{}dialect\char`\"{} of the WKT string. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Parse a WKT string into the appropriate subclass of \mbox{\hyperlink{classosgeo_1_1proj_1_1util_1_1BaseObject}{util\+::\+Base\+Object}}. 

\doxysubsection{Member Enumeration Documentation}
\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3}} 
\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!WKTGuessedDialect@{WKTGuessedDialect}}
\index{WKTGuessedDialect@{WKTGuessedDialect}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}
\doxysubsubsection{\texorpdfstring{WKTGuessedDialect}{WKTGuessedDialect}}
{\footnotesize\ttfamily enum class \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3}{osgeo\+::proj\+::io\+::\+WKTParser\+::\+WKTGuessed\+Dialect}}\hspace{0.3cm}{\ttfamily [strong]}}

Guessed WKT \char`\"{}dialect\char`\"{} \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{WKT2\_2019@{WKT2\_2019}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!WKT2\_2019@{WKT2\_2019}}}\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3ac634e196cf84127855e2ff4569674d0d}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3ac634e196cf84127855e2ff4569674d0d}} 
WKT2\+\_\+2019&\mbox{\hyperlink{general_doc_WKT2_2019}{WKT2\+:2019}} \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{WKT2\_2018@{WKT2\_2018}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!WKT2\_2018@{WKT2\_2018}}}\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a127c3d731e34f71ebb200e6e06ad5a5c}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a127c3d731e34f71ebb200e6e06ad5a5c}} 
WKT2\+\_\+2018&Deprecated alias for WKT2\+\_\+2019 \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{WKT2\_2015@{WKT2\_2015}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!WKT2\_2015@{WKT2\_2015}}}\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a50ef9162833d7413d4985160f849ddb9}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a50ef9162833d7413d4985160f849ddb9}} 
WKT2\+\_\+2015&\mbox{\hyperlink{general_doc_WKT2_2015}{WKT2\+:2015}} \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{WKT1\_GDAL@{WKT1\_GDAL}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!WKT1\_GDAL@{WKT1\_GDAL}}}\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a85c43e48faba72b30e6501b41536afe5}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a85c43e48faba72b30e6501b41536afe5}} 
WKT1\+\_\+\+GDAL&\mbox{\hyperlink{general_doc_WKT1}{WKT1 specification}} \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{WKT1\_ESRI@{WKT1\_ESRI}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!WKT1\_ESRI@{WKT1\_ESRI}}}\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a8da08577d1e0b736b2259c71c40f0e38}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3a8da08577d1e0b736b2259c71c40f0e38}} 
WKT1\+\_\+\+ESRI&ESRI variant of WKT1 \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{NOT\_WKT@{NOT\_WKT}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!NOT\_WKT@{NOT\_WKT}}}\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3aee6dcdfdd118e0afe68056a1f14c79a4}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a021718896a1e698fbe4c14bb62292eb3aee6dcdfdd118e0afe68056a1f14c79a4}} 
NOT\+\_\+\+WKT&Not WKT / unrecognized \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a8931fbaea1d67eff5098da93b38de6bb}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a8931fbaea1d67eff5098da93b38de6bb}} 
\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!createFromWKT@{createFromWKT}}
\index{createFromWKT@{createFromWKT}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}
\doxysubsubsection{\texorpdfstring{createFromWKT()}{createFromWKT()}}
{\footnotesize\ttfamily Base\+Object\+NNPtr osgeo\+::proj\+::io\+::\+WKTParser\+::create\+From\+WKT (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{wkt }\end{DoxyParamCaption})}



Instantiate a sub-\/class of Base\+Object from a WKT string. 

By default, validation is strict (to the extent of the checks that are actually implemented. Currently only WKT1 strict grammar is checked), and any issue detected will cause an exception to be thrown, unless set\+Strict(false) is called priorly.

In non-\/strict mode, non-\/fatal issues will be recovered and simply listed in \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser_a9bcb0096556541209c34ad02766cd9d0}{warning\+List()}}. This does not prevent more severe errors to cause an exception to be thrown.


\begin{DoxyExceptions}{Exceptions}
{\em \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1ParsingException}{Parsing\+Exception}}} & \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_af2a70beb0e67036f115a1cdea77f7dbb}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_af2a70beb0e67036f115a1cdea77f7dbb}} 
\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!setUnsetIdentifiersIfIncompatibleDef@{setUnsetIdentifiersIfIncompatibleDef}}
\index{setUnsetIdentifiersIfIncompatibleDef@{setUnsetIdentifiersIfIncompatibleDef}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}
\doxysubsubsection{\texorpdfstring{setUnsetIdentifiersIfIncompatibleDef()}{setUnsetIdentifiersIfIncompatibleDef()}}
{\footnotesize\ttfamily \mbox{\hyperlink{classosgeo_1_1proj_1_1io_1_1WKTParser}{WKTParser}} \& osgeo\+::proj\+::io\+::\+WKTParser\+::set\+Unset\+Identifiers\+If\+Incompatible\+Def (\begin{DoxyParamCaption}\item[{bool}]{unset }\end{DoxyParamCaption})}



Set whether object identifiers should be unset when there is a contradiction between the definition from WKT and the one from the database. 

At time of writing, this only applies to the base geographic CRS of a projected CRS, when comparing its coordinate system. \mbox{\Hypertarget{classosgeo_1_1proj_1_1io_1_1WKTParser_a9bcb0096556541209c34ad02766cd9d0}\label{classosgeo_1_1proj_1_1io_1_1WKTParser_a9bcb0096556541209c34ad02766cd9d0}} 
\index{osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}!warningList@{warningList}}
\index{warningList@{warningList}!osgeo::proj::io::WKTParser@{osgeo::proj::io::WKTParser}}
\doxysubsubsection{\texorpdfstring{warningList()}{warningList()}}
{\footnotesize\ttfamily std\+::list$<$ std\+::string $>$ osgeo\+::proj\+::io\+::\+WKTParser\+::warning\+List (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}



Return the list of warnings found during parsing. 

\begin{DoxyNote}{Note}
The list might be non-\/empty only is set\+Strict(false) has been called. 
\end{DoxyNote}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
include/proj/io.\+hpp\item 
src/iso19111/io.\+cpp\end{DoxyCompactItemize}
