[mapguide-commits] r9212 - in sandbox/jng/geoprocessing: Common/Schema UnitTest/WebTier/MapAgent/MapAgentForms Web/src/HttpHandler

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Jun 15 07:53:49 PDT 2017


Author: jng
Date: 2017-06-15 07:53:48 -0700 (Thu, 15 Jun 2017)
New Revision: 9212

Added:
   sandbox/jng/geoprocessing/Common/Schema/UnitOfMeasure-3.3.0.xsd
   sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/convexhullform.html
   sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/distanceform.html
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoConvexHull.cpp
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoConvexHull.h
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoDistance.cpp
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoDistance.h
Modified:
   sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/geoprocessingapi.html
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandler.vcxproj
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandler.vcxproj.filters
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandlerBuild.cpp
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpRequest.cpp
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpResourceStrings.cpp
   sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpResourceStrings.h
   sandbox/jng/geoprocessing/Web/src/HttpHandler/Makefile.am
   sandbox/jng/geoprocessing/Web/src/HttpHandler/XmlJsonConvert.cpp
Log:
Enhance the mapagent with the following operations:
 - GEO.CONVEXHULL
   - Returns the convex hull of the given input geometry (in WKT) as WKT or GeoJSON with optional transformation
 - GEO.DISTANCE
   - Returns the shortest distance between the input geometry (in WKT) and another (also in WKT). If a coordinate system (as CS-Map code) is provided, the distance will be converted to meters using the coordinate system measure. Otherwise the distance will be computed from a linear distance algorithm with unknown units. The result is modeled on a new UnitOfMeasure-3.3.0.xsd XML schema.

Also includes updated mapagent forms for testing these operations.

Added: sandbox/jng/geoprocessing/Common/Schema/UnitOfMeasure-3.3.0.xsd
===================================================================
--- sandbox/jng/geoprocessing/Common/Schema/UnitOfMeasure-3.3.0.xsd	                        (rev 0)
+++ sandbox/jng/geoprocessing/Common/Schema/UnitOfMeasure-3.3.0.xsd	2017-06-15 14:53:48 UTC (rev 9212)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+  <xs:element name="UnitOfMeasure">
+    <xs:annotation>
+      <xs:documentation>Unit of measure</xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element name="Value" type="xs:double" />
+        <xs:element name="Unit" type="xs:string" />
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>

Added: sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/convexhullform.html
===================================================================
--- sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/convexhullform.html	                        (rev 0)
+++ sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/convexhullform.html	2017-06-15 14:53:48 UTC (rev 9212)
@@ -0,0 +1,33 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<script type="text/javascript" src="setactiontarget.js" >
+</script>
+</head>
+<body>
+<form name="input" action="" method="get">
+<b>Operation:</b>
+<input type="text" name="OPERATION" value="GEO.CONVEXHULL" size="50">
+<p> Version:
+<input type="text" name="VERSION" value="3.3.0" size="10">
+<p> Locale:
+<input type="text" name="LOCALE" value="en" size="10">
+<p> Client Agent:
+<input type="text" name="CLIENTAGENT" value="MapGuide Developer" size="100">
+<p> Geometry (WKT):
+<input type="text" name="GEOMETRY" value="" size="100">
+<p> Output Format:
+<select name="FORMAT">
+    <option value="WKT">Geometry Well-Known Text</option>
+    <option value="GEOJSON">GeoJSON</option>
+</select>
+<p> Input Coordinate System (CS-Map Code):
+<input type="text" name="COORDINATESYSTEM" value="" size="10">
+<p> Output Coordinate System (CS-Map Code):
+<input type="text" name="TRANSFORMTO" value="" size="10">
+<p>
+<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
+</form>
+</body>
+</html>
+<html>

Added: sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/distanceform.html
===================================================================
--- sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/distanceform.html	                        (rev 0)
+++ sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/distanceform.html	2017-06-15 14:53:48 UTC (rev 9212)
@@ -0,0 +1,35 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<script type="text/javascript" src="setactiontarget.js" >
+</script>
+</head>
+<body>
+<form name="input" action="" method="get">
+<b>Operation:</b>
+<input type="text" name="OPERATION" value="GEO.DISTANCE" size="50">
+<p> Version:
+<input type="text" name="VERSION" value="3.3.0" size="10">
+<p> Locale:
+<input type="text" name="LOCALE" value="en" size="10">
+<p> Client Agent:
+<input type="text" name="CLIENTAGENT" value="MapGuide Developer" size="100">
+<p> Geometry (WKT):
+<input type="text" name="GEOMETRY" value="" size="100">
+<p> Other Geometry (WKT):
+<input type="text" name="OTHERGEOMETRY" value="" size="100">
+<p> Output Format:
+<select name="FORMAT">
+    <option value="text/xml">text/xml</option>
+    <option value="application/json">application/json</option>
+</select>
+<p>
+    Clean JSON: <input type="text" name="CLEAN" value="1" ID="TextClean">
+<p> Coordinate System (CS-Map Code, for non-linear measurment):
+<input type="text" name="COORDINATESYSTEM" value="" size="10">
+<p>
+<input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
+</form>
+</body>
+</html>
+<html>

Modified: sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/geoprocessingapi.html
===================================================================
--- sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/geoprocessingapi.html	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/UnitTest/WebTier/MapAgent/MapAgentForms/geoprocessingapi.html	2017-06-15 14:53:48 UTC (rev 9212)
@@ -11,6 +11,10 @@
             <LI>
                 <A href="bufferform.html" target="showform">Buffer</A>
             <LI>
+                <A href="convexhullform.html" target="showform">ConvexHull</A>
+            <LI>
+                <A href="distanceform.html" target="showform">Distance</A>
+            <LI>
                 <A href="simplifyform.html" target="showform">Simplify</A>
             <LI>
                 <A href="binaryoperationform.html" target="showform">BinaryOperation</A>

Added: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoConvexHull.cpp
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoConvexHull.cpp	                        (rev 0)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoConvexHull.cpp	2017-06-15 14:53:48 UTC (rev 9212)
@@ -0,0 +1,104 @@
+//
+//  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
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "HttpHandler.h"
+#include "HttpGeoConvexHull.h"
+
+HTTP_IMPLEMENT_CREATE_OBJECT(MgHttpGeoConvexHull)
+
+MgHttpGeoConvexHull::MgHttpGeoConvexHull(MgHttpRequest* hRequest)
+{
+    InitializeCommonParameters(hRequest);
+    Ptr<MgHttpRequestParam> params = hRequest->GetRequestParam();
+    m_geomWKT = params->GetParameterValue(MgHttpResourceStrings::reqFeatGeometry);
+    m_format = params->GetParameterValue(MgHttpResourceStrings::reqGeoFormat);
+    m_coordinateSystem = params->GetParameterValue(MgHttpResourceStrings::reqGeoCoordinateSystem);
+    m_transformTo = params->GetParameterValue(MgHttpResourceStrings::reqGeoTransformTo);
+}
+
+void MgHttpGeoConvexHull::Execute(MgHttpResponse & hResponse)
+{
+    Ptr<MgHttpResult> hResult = hResponse.GetResult();
+
+    MG_HTTP_HANDLER_TRY()
+
+    // Check common parameters
+    ValidateCommonParameters();
+
+    if (m_geomWKT.empty())
+    {
+        MgStringCollection arguments;
+        arguments.Add(MgHttpResourceStrings::reqFeatGeometry);
+        arguments.Add(MgResources::BlankArgument);
+
+        throw new MgInvalidArgumentException(L"MgHttpGeoConvexHull.Execute",
+            __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
+    }
+
+    Ptr<MgWktReaderWriter> wktRw = new MgWktReaderWriter();
+    Ptr<MgGeometry> input = wktRw->Read(m_geomWKT);
+    Ptr<MgGeometry> result = input->ConvexHull();
+
+    if (!m_transformTo.empty())
+    {
+        Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
+        Ptr<MgCoordinateSystem> cs = csFactory->CreateFromCode(m_coordinateSystem);
+        Ptr<MgCoordinateSystem> target = csFactory->CreateFromCode(m_transformTo);
+        Ptr<MgCoordinateSystemTransform> xform = csFactory->GetTransform(cs, target);
+        Ptr<MgGeometry> xGeom = (MgGeometry*)result->Transform(xform);
+
+        result = xGeom;
+    }
+
+    if (m_format == L"WKT")
+    {
+        STRING wkt = wktRw->Write(result);
+        Ptr<MgHttpPrimitiveValue> value = new MgHttpPrimitiveValue(wkt);
+        hResult->SetResultObject(value, MgMimeType::Text);
+    }
+    else if (m_format == L"GEOJSON")
+    {
+        MgGeoJsonWriter gw;
+        STRING geoJson = gw.GeometryToGeoJson(result);
+
+        std::string mbGeoJson;
+        MgUtil::WideCharToMultiByte(geoJson, mbGeoJson);
+
+        Ptr<MgByteSource> byteSource = new MgByteSource((BYTE_ARRAY_IN)mbGeoJson.c_str(), (INT32)mbGeoJson.length());
+        byteSource->SetMimeType(MgMimeType::Json);
+        Ptr<MgByteReader> byteReader = byteSource->GetReader();
+
+        hResult->SetResultObject(byteReader, byteReader->GetMimeType());
+    }
+
+    MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGeoConvexHull.Execute")
+}
+
+void MgHttpGeoConvexHull::ValidateOperationVersion()
+{
+    MG_HTTP_HANDLER_TRY()
+
+    // There are multiple supported versions
+    INT32 version = m_userInfo->GetApiVersion();
+    if (version != MG_API_VERSION(3, 3, 0))
+    {
+        throw new MgInvalidOperationVersionException(
+            L"MgHttpGeoConvexHull.ValidateOperationVersion", __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    MG_HTTP_HANDLER_CATCH_AND_THROW(L"MgHttpGeoConvexHull.ValidateOperationVersion");
+}

Added: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoConvexHull.h
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoConvexHull.h	                        (rev 0)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoConvexHull.h	2017-06-15 14:53:48 UTC (rev 9212)
@@ -0,0 +1,63 @@
+//
+//  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
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef MG_HTTP_GEO_CONVEX_HULL_H
+#define MG_HTTP_GEO_CONVEX_HULL_H
+
+class MgHttpGeoConvexHull : public MgHttpRequestResponseHandler
+{
+    HTTP_DECLARE_CREATE_OBJECT()
+
+public:
+    /// <summary>
+    /// Initializes the common parameters of the request.
+    /// </summary>
+    /// <param name="name">Input
+    /// MgHttpRequest
+    /// This contains all the parameters of the request.
+    /// </param>
+    /// <returns>
+    /// nothing
+    /// </returns>
+    MgHttpGeoConvexHull(MgHttpRequest *hRequest);
+
+    /// <summary>
+    /// Executes the specific request.
+    /// </summary>
+    /// <param name="hResponse">Input
+    /// This contains the response (including MgHttpResult and StatusCode) from the server.
+    /// </param>
+    void Execute(MgHttpResponse& hResponse);
+
+    /// <summary>
+    /// Returns the classification of this request/response handler
+    /// </summary>
+    /// <returns>
+    /// Classification of handler
+    /// </returns>
+    MgRequestClassification GetRequestClassification() { return MgHttpRequestResponseHandler::mrcViewer; }
+
+    virtual void ValidateOperationVersion();
+
+private:
+    STRING m_geomWKT;
+    STRING m_format;
+    STRING m_coordinateSystem;
+    STRING m_transformTo;
+};
+
+#endif

Added: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoDistance.cpp
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoDistance.cpp	                        (rev 0)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoDistance.cpp	2017-06-15 14:53:48 UTC (rev 9212)
@@ -0,0 +1,125 @@
+//
+//  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
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "HttpHandler.h"
+#include "HttpGeoDistance.h"
+
+HTTP_IMPLEMENT_CREATE_OBJECT(MgHttpGeoDistance)
+
+MgHttpGeoDistance::MgHttpGeoDistance(MgHttpRequest* hRequest)
+{
+    InitializeCommonParameters(hRequest);
+    Ptr<MgHttpRequestParam> params = hRequest->GetRequestParam();
+    m_geomWKT = params->GetParameterValue(MgHttpResourceStrings::reqFeatGeometry);
+    m_geomOther = params->GetParameterValue(MgHttpResourceStrings::reqFeatGeometryOther);
+    m_coordinateSystem = params->GetParameterValue(MgHttpResourceStrings::reqGeoCoordinateSystem);
+}
+
+void MgHttpGeoDistance::Execute(MgHttpResponse & hResponse)
+{
+    Ptr<MgHttpResult> hResult = hResponse.GetResult();
+
+    MG_HTTP_HANDLER_TRY()
+
+        // Check common parameters
+        ValidateCommonParameters();
+
+    if (m_geomWKT.empty())
+    {
+        MgStringCollection arguments;
+        arguments.Add(MgHttpResourceStrings::reqFeatGeometryOther);
+        arguments.Add(MgResources::BlankArgument);
+
+        throw new MgInvalidArgumentException(L"MgHttpGeoDistance.Execute",
+            __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
+    }
+
+    if (m_geomOther.empty())
+    {
+        MgStringCollection arguments;
+        arguments.Add(MgHttpResourceStrings::reqFeatGeometry);
+        arguments.Add(MgResources::BlankArgument);
+
+        throw new MgInvalidArgumentException(L"MgHttpGeoDistance.Execute",
+            __LINE__, __WFILE__, &arguments, L"MgStringEmpty", NULL);
+    }
+
+    Ptr<MgWktReaderWriter> wktRw = new MgWktReaderWriter();
+    Ptr<MgGeometry> input = wktRw->Read(m_geomWKT);
+    Ptr<MgGeometry> other = wktRw->Read(m_geomOther);
+
+    Ptr<MgCoordinateSystem> cs;
+    Ptr<MgMeasure> measure;
+
+    if (!m_coordinateSystem.empty())
+    {
+        Ptr<MgCoordinateSystemFactory> csFactory = new MgCoordinateSystemFactory();
+        cs = csFactory->CreateFromCode(m_coordinateSystem);
+        measure = cs->GetMeasure();
+    }
+
+    double distance = input->Distance(other, measure);
+    if (NULL != cs.p)
+    {
+        distance = cs->ConvertCoordinateSystemUnitsToMeters(distance);
+    }
+
+    std::string mbXml;
+    mbXml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
+    mbXml += "<UnitOfMeasure xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"UnitOfMeasure-3.3.0.xsd\">";
+    mbXml += "<Value>";
+    std::string sDistance;
+    MgUtil::DoubleToString(distance, sDistance);
+    mbXml += sDistance;
+    mbXml += "</Value>";
+    if (NULL != measure.p) //If a measure was given, this will be in meters
+    {
+        mbXml += "<Unit>meters</Unit>";
+    }
+    else //Otherwise this is a linear distance measure. We don't know what the units are here
+    {
+        mbXml += "<Unit>unknown</Unit>";
+    }
+    
+    mbXml += "</UnitOfMeasure>";
+
+    Ptr<MgByteSource> bs = new MgByteSource((BYTE_ARRAY_IN)mbXml.c_str(), (INT32)mbXml.length());
+    bs->SetMimeType(MgMimeType::Xml);
+    Ptr<MgByteReader> br = bs->GetReader();
+
+    //Convert to alternate response format, if necessary
+    ProcessFormatConversion(br);
+
+    hResult->SetResultObject(br, br->GetMimeType());
+
+    MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGeoDistance.Execute")
+}
+
+void MgHttpGeoDistance::ValidateOperationVersion()
+{
+    MG_HTTP_HANDLER_TRY()
+
+    // There are multiple supported versions
+    INT32 version = m_userInfo->GetApiVersion();
+    if (version != MG_API_VERSION(3, 3, 0))
+    {
+        throw new MgInvalidOperationVersionException(
+            L"MgHttpGeoDistance.ValidateOperationVersion", __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    MG_HTTP_HANDLER_CATCH_AND_THROW(L"MgHttpGeoDistance.ValidateOperationVersion");
+}

Added: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoDistance.h
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoDistance.h	                        (rev 0)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpGeoDistance.h	2017-06-15 14:53:48 UTC (rev 9212)
@@ -0,0 +1,62 @@
+//
+//  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
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef MG_HTTP_GEO_DISTANCE_H
+#define MG_HTTP_GEO_DISTANCE_H
+
+class MgHttpGeoDistance : public MgHttpRequestResponseHandler
+{
+    HTTP_DECLARE_CREATE_OBJECT()
+
+public:
+    /// <summary>
+    /// Initializes the common parameters of the request.
+    /// </summary>
+    /// <param name="name">Input
+    /// MgHttpRequest
+    /// This contains all the parameters of the request.
+    /// </param>
+    /// <returns>
+    /// nothing
+    /// </returns>
+    MgHttpGeoDistance(MgHttpRequest *hRequest);
+
+    /// <summary>
+    /// Executes the specific request.
+    /// </summary>
+    /// <param name="hResponse">Input
+    /// This contains the response (including MgHttpResult and StatusCode) from the server.
+    /// </param>
+    void Execute(MgHttpResponse& hResponse);
+
+    /// <summary>
+    /// Returns the classification of this request/response handler
+    /// </summary>
+    /// <returns>
+    /// Classification of handler
+    /// </returns>
+    MgRequestClassification GetRequestClassification() { return MgHttpRequestResponseHandler::mrcViewer; }
+
+    virtual void ValidateOperationVersion();
+
+private:
+    STRING m_geomWKT;
+    STRING m_geomOther;
+    STRING m_coordinateSystem;
+};
+
+#endif
\ No newline at end of file

Modified: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandler.vcxproj
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandler.vcxproj	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandler.vcxproj	2017-06-15 14:53:48 UTC (rev 9212)
@@ -210,6 +210,12 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="HttpGeoConvexHull.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="HttpCopyResource.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -294,6 +300,12 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="HttpGeoDistance.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="HttpGeoSimplify.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@@ -969,6 +981,7 @@
   <ItemGroup>
     <ClInclude Include="HttpApplyResourcePackage.h" />
     <ClInclude Include="HttpChangeResourceOwner.h" />
+    <ClInclude Include="HttpGeoConvexHull.h" />
     <ClInclude Include="HttpCopyResource.h" />
     <ClInclude Include="HttpCreateRepository.h" />
     <ClInclude Include="HttpCreateRuntimeMap.h" />
@@ -983,6 +996,7 @@
     <ClInclude Include="HttpEnumerateUnmanagedData.h" />
     <ClInclude Include="HttpGeoBuffer.h" />
     <ClInclude Include="HttpGeoBinaryOperation.h" />
+    <ClInclude Include="HttpGeoDistance.h" />
     <ClInclude Include="HttpGeoSimplify.h" />
     <ClInclude Include="HttpGeoSpatialPredicate.h" />
     <ClInclude Include="HttpGetRepositoryContent.h" />

Modified: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandler.vcxproj.filters
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandler.vcxproj.filters	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandler.vcxproj.filters	2017-06-15 14:53:48 UTC (rev 9212)
@@ -401,6 +401,12 @@
     <ClCompile Include="HttpGeoSpatialPredicate.cpp">
       <Filter>GeoProcessing</Filter>
     </ClCompile>
+    <ClCompile Include="HttpGeoDistance.cpp">
+      <Filter>GeoProcessing</Filter>
+    </ClCompile>
+    <ClCompile Include="HttpGeoConvexHull.cpp">
+      <Filter>GeoProcessing</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="HttpApplyResourcePackage.h">
@@ -784,6 +790,12 @@
     <ClInclude Include="HttpGeoBinaryOperation.h">
       <Filter>GeoProcessing</Filter>
     </ClInclude>
+    <ClInclude Include="HttpGeoDistance.h">
+      <Filter>GeoProcessing</Filter>
+    </ClInclude>
+    <ClInclude Include="HttpGeoConvexHull.h">
+      <Filter>GeoProcessing</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="HttpHandler.rc" />

Modified: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandlerBuild.cpp
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandlerBuild.cpp	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpHandlerBuild.cpp	2017-06-15 14:53:48 UTC (rev 9212)
@@ -57,6 +57,8 @@
 #include "HttpEnumerateApplicationContainers.cpp"
 #include "HttpGeoBuffer.cpp"
 #include "HttpGeoBinaryOperation.cpp"
+#include "HttpGeoConvexHull.cpp"
+#include "HttpGeoDistance.cpp"
 #include "HttpGeoSimplify.cpp"
 #include "HttpGeoSpatialPredicate.cpp"
 #include "HttpGetCapabilities.cpp"

Modified: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpRequest.cpp
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpRequest.cpp	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpRequest.cpp	2017-06-15 14:53:48 UTC (rev 9212)
@@ -127,6 +127,8 @@
 // Geo-Processing
 #include "HttpGeoBuffer.h"
 #include "HttpGeoBinaryOperation.h"
+#include "HttpGeoConvexHull.h"
+#include "HttpGeoDistance.h"
 #include "HttpGeoSimplify.h"
 #include "HttpGeoSpatialPredicate.h"
 
@@ -439,6 +441,8 @@
     httpClassCreators[MgHttpResourceStrings::opGetDefaultTileSizeY] = MgHttpGetDefaultTileSizeY::CreateObject;
     httpClassCreators[MgHttpResourceStrings::opGeoBuffer] = MgHttpGeoBuffer::CreateObject;
     httpClassCreators[MgHttpResourceStrings::opGeoBinaryOperation] = MgHttpGeoBinaryOperation::CreateObject;
+    httpClassCreators[MgHttpResourceStrings::opGeoConvexHull] = MgHttpGeoConvexHull::CreateObject;
+    httpClassCreators[MgHttpResourceStrings::opGeoDistance] = MgHttpGeoDistance::CreateObject;
     httpClassCreators[MgHttpResourceStrings::opGeoSimplify] = MgHttpGeoSimplify::CreateObject;
     httpClassCreators[MgHttpResourceStrings::opGeoSpatialPredicate] = MgHttpGeoSpatialPredicate::CreateObject;
 

Modified: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpResourceStrings.cpp
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpResourceStrings.cpp	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpResourceStrings.cpp	2017-06-15 14:53:48 UTC (rev 9212)
@@ -149,6 +149,7 @@
 const STRING MgHttpResourceStrings::reqFeatGeomProperty = L"GEOMPROPERTY";
 const STRING MgHttpResourceStrings::reqFeatSpatialOp = L"SPATIALOP";
 const STRING MgHttpResourceStrings::reqFeatGeometry = L"GEOMETRY";
+const STRING MgHttpResourceStrings::reqFeatGeometryOther = L"OTHERGEOMETRY";
 const STRING MgHttpResourceStrings::reqFeatProperties = L"PROPERTIES";
 const STRING MgHttpResourceStrings::reqFeatActiveOnly = L"ACTIVEONLY";
 const STRING MgHttpResourceStrings::reqFeatComputedProperties = L"COMPUTED_PROPERTIES";
@@ -365,6 +366,8 @@
 
 // Geo-Processing Operations
 const STRING MgHttpResourceStrings::opGeoBuffer = L"GEO.BUFFER";
+const STRING MgHttpResourceStrings::opGeoConvexHull = L"GEO.CONVEXHULL";
+const STRING MgHttpResourceStrings::opGeoDistance = L"GEO.DISTANCE";
 const STRING MgHttpResourceStrings::opGeoSimplify = L"GEO.SIMPLIFY";
 const STRING MgHttpResourceStrings::opGeoSpatialPredicate = L"GEO.SPATIALPREDICATE";
 const STRING MgHttpResourceStrings::opGeoBinaryOperation = L"GEO.BINARYOPERATION";

Modified: sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpResourceStrings.h
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpResourceStrings.h	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/HttpResourceStrings.h	2017-06-15 14:53:48 UTC (rev 9212)
@@ -125,6 +125,7 @@
     static const STRING reqFeatGeomProperty;
     static const STRING reqFeatSpatialOp;
     static const STRING reqFeatGeometry;
+    static const STRING reqFeatGeometryOther;
     static const STRING reqFeatActiveOnly;
     static const STRING reqFeatComputedProperties;
     static const STRING reqFeatComputedAliases;
@@ -369,6 +370,8 @@
 
     // Geo-Processing Operations
     static const STRING opGeoBuffer;
+    static const STRING opGeoConvexHull;
+    static const STRING opGeoDistance;
     static const STRING opGeoSimplify;
     static const STRING opGeoSpatialPredicate;
     static const STRING opGeoBinaryOperation;

Modified: sandbox/jng/geoprocessing/Web/src/HttpHandler/Makefile.am
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/Makefile.am	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/Makefile.am	2017-06-15 14:53:48 UTC (rev 9212)
@@ -56,6 +56,8 @@
   HttpEnumerateApplicationTemplates.cpp \
   HttpGeoBinaryOperation.cpp \
   HttpGeoBuffer.cpp \
+  HttpGeoConvexHull.cpp \
+  HttpGeoDistance.cpp \
   HttpGeoSimplify.cpp \
   HttpGeoSpatialPredicate.cpp \
   HttpGetCapabilities.cpp \
@@ -185,6 +187,8 @@
   HttpEnumerateApplicationTemplates.h \
   HttpGeoBinaryOperation.h \
   HttpGeoBuffer.h \
+  HttpGeoConvexHull.h \
+  HttpGeoDistance.h \
   HttpGeoSimplify.h \
   HttpGeoSpatialPredicate.h \
   HttpGetCapabilities.h \

Modified: sandbox/jng/geoprocessing/Web/src/HttpHandler/XmlJsonConvert.cpp
===================================================================
--- sandbox/jng/geoprocessing/Web/src/HttpHandler/XmlJsonConvert.cpp	2017-06-13 15:42:59 UTC (rev 9211)
+++ sandbox/jng/geoprocessing/Web/src/HttpHandler/XmlJsonConvert.cpp	2017-06-15 14:53:48 UTC (rev 9212)
@@ -944,6 +944,8 @@
     s_elementPathTypeMap["/ClassDefinition/Properties/Property/HasMeasure"] = XML_DATA_TYPE_BOOLEAN;
     s_elementPathTypeMap["/ClassDefinition/Properties/Property/DefaultImageXSize"] = XML_DATA_TYPE_NUM_INT;
     s_elementPathTypeMap["/ClassDefinition/Properties/Property/DefaultImageYSize"] = XML_DATA_TYPE_NUM_INT;
+    //UnitOfMeasure-3.3.0.xsd
+    s_elementPathTypeMap["/UnitOfMeasure/Value"] = XML_DATA_TYPE_NUM_DOUBLE;
     //Miscellaneous MapGuide response types that don't have a formal schema
     s_elementPathTypeMap["/SessionTimeout/Value"] = XML_DATA_TYPE_NUM_INT;
     s_elementPathTypeMap["/FeatureInformation/SelectedFeatures/SelectedLayer/LayerMetadata/Property/Type"] = XML_DATA_TYPE_NUM_INT;



More information about the mapguide-commits mailing list