[mapguide-commits] r9145 - sandbox/jng/clean_json/Common/PlatformBase/Services
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Apr 12 09:51:21 PDT 2017
Author: jng
Date: 2017-04-12 09:51:21 -0700 (Wed, 12 Apr 2017)
New Revision: 9145
Modified:
sandbox/jng/clean_json/Common/PlatformBase/Services/GeoJsonWriter.h
Log:
Document MgGeoJsonWriter
Modified: sandbox/jng/clean_json/Common/PlatformBase/Services/GeoJsonWriter.h
===================================================================
--- sandbox/jng/clean_json/Common/PlatformBase/Services/GeoJsonWriter.h 2017-04-11 15:36:32 UTC (rev 9144)
+++ sandbox/jng/clean_json/Common/PlatformBase/Services/GeoJsonWriter.h 2017-04-12 16:51:21 UTC (rev 9145)
@@ -1,5 +1,5 @@
//
-// Copyright (C) 2004-2015 by Autodesk, Inc.
+// Copyright (C) 2004-2017 by Autodesk, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of version 2.1 of the GNU Lesser
@@ -18,13 +18,94 @@
#ifndef _MGGEOJSONWRITER_H
#define _MGGEOJSONWRITER_H
+/// \defgroup MgFileFeatureSourceParams MgFileFeatureSourceParams
+/// \ingroup Feature_Service_classes
+/// \{
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// A helper class to output GeoJSON from feature readers
+///
class MG_PLATFORMBASE_API MgGeoJsonWriter : public MgGuardDisposable
{
PUBLISHED_API:
+ //////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Constructs a MgGeoJsonWriter object
+ ///
+ /// <!-- Syntax in .Net, Java, and PHP -->
+ /// \htmlinclude DotNetSyntaxTop.html
+ /// MgGeoJsonWriter();
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude JavaSyntaxTop.html
+ /// MgGeoJsonWriter();
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude PHPSyntaxTop.html
+ /// MgGeoJsonWriter();
+ /// \htmlinclude SyntaxBottom.html
+ ///
MgGeoJsonWriter();
+ //////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Converts the current feature in the given feature reader to GeoJSON
+ ///
+ /// \remarks
+ /// The id and geometry properties are inferred from the class definition returned by the feature reader
+ ///
+ /// <!-- Syntax in .Net, Java, and PHP -->
+ /// \htmlinclude DotNetSyntaxTop.html
+ /// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude JavaSyntaxTop.html
+ /// String FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude PHPSyntaxTop.html
+ /// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
+ /// \htmlinclude SyntaxBottom.html
+ ///
+ /// \param featureReader (MgFeatureReader)
+ /// The feature reader
+ ///
+ /// \param transform (MgTransform)
+ /// An optional transform
+ ///
+ /// \return
+ /// Returns the GeoJSON output as a string.
+ ///
STRING FeatureToGeoJson(MgFeatureReader* featureReader, MgTransform* transform);
+ //////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Converts the current feature in the given feature reader to GeoJSON
+ ///
+ /// <!-- Syntax in .Net, Java, and PHP -->
+ /// \htmlinclude DotNetSyntaxTop.html
+ /// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, string idPropertyName, string geomPropName);
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude JavaSyntaxTop.html
+ /// String FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, String idPropertyName, String geomPropName);
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude PHPSyntaxTop.html
+ /// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, string idPropertyName, string geomPropName);
+ /// \htmlinclude SyntaxBottom.html
+ ///
+ /// \param featureReader (MgFeatureReader)
+ /// The feature reader
+ ///
+ /// \param transform (MgTransform)
+ /// An optional transform
+ ///
+ /// \param idPropertyName (String/string)
+ /// The name of the id property. The value of the property specified will be written to the top-level "id" property of the GeoJSON
+ ///
+ /// \param geomPropName (String/string)
+ /// The name of the geometry property. The value of the property specified will be written to the top-level "geometry" property
+ /// of the GeoJSON. If this property is not specified, no geometry is written.
+ ///
+ /// \return
+ /// Returns the GeoJSON output as a string.
+ ///
STRING FeatureToGeoJson(MgReader* reader, MgTransform* transform, CREFSTRING idPropertyName, CREFSTRING geomPropName);
protected:
@@ -43,5 +124,6 @@
Ptr<MgAgfReaderWriter> m_agfRw;
};
+/// \}
#endif
\ No newline at end of file
More information about the mapguide-commits
mailing list