paleolimbot commented on code in PR #45459:
URL: https://github.com/apache/arrow/pull/45459#discussion_r2007970230
##########
cpp/src/parquet/properties.h:
##########
@@ -69,6 +69,45 @@ constexpr int32_t kDefaultThriftContainerSizeLimit = 1000 *
1000;
// PARQUET-978: Minimize footer reads by reading 64 KB from the end of the file
constexpr int64_t kDefaultFooterReadSize = 64 * 1024;
+/// \brief Convert Coordinate Reference System values for GEOMETRY and
GEOGRAPHY logical
+/// types
+///
+/// EXPERIMENTAL
+class PARQUET_EXPORT GeoCrsContext {
+ public:
+ virtual ~GeoCrsContext() = default;
+
+ /// \brief Remove any previously saved PROJJSON CRS fields
+ virtual void Clear() = 0;
+
+ /// \brief Given a coordinate reference system value and encoding from
GeoArrow
+ /// extension metadata, return the value that should be placed in the
+ /// LogicalType::Geography|Geometry(crs=) field
+ ///
+ /// For PROJJSON Crses (the most common way coordinate reference systems
arrive
+ /// in Arrow), the Parquet specification forces us to write them to the file
+ /// metadata. The default GeoCrsContext will record such values and return
the required
+ /// string that can be placed into the 'crs' of the Geometry or Geography
logical
+ /// type.
+ virtual std::string GetParquetCrs(std::string crs_value,
+ const std::string& crs_encoding) = 0;
+
+ /// \brief Returns true if any converted CRS values were PROJJSON whose
values are
+ /// stored in this object and should be written to the file metadata
+ virtual bool HasProjjsonCrsFields() = 0;
+
+ /// \brief Add any stored PROJJSON values to the supplied file
KeyValueMetadata
+ ///
+ /// The default implementation will add any PROJJSON values it encountered
to the file
+ /// KeyValueMetadata; however, a custom implementation may choose to store
these values
+ /// somewhere else and implement this method as a no-op.
+ virtual void AddProjjsonCrsFieldsToFileMetadata(
Review Comment:
I removed the GeoCrsContext!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]