[mapguide-commits] r9195 - sandbox/jng/utfgrid/Server/src/Services/Rendering

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed May 31 08:30:42 PDT 2017


Author: jng
Date: 2017-05-31 08:30:41 -0700 (Wed, 31 May 2017)
New Revision: 9195

Added:
   sandbox/jng/utfgrid/Server/src/Services/Rendering/OpRenderTileUTFGrid.cpp
   sandbox/jng/utfgrid/Server/src/Services/Rendering/OpRenderTileUTFGrid.h
Modified:
   sandbox/jng/utfgrid/Server/src/Services/Rendering/Makefile.am
Log:
Oops, left out some files that should've been committed long ago

Hopefully this fixes the Linux build

Modified: sandbox/jng/utfgrid/Server/src/Services/Rendering/Makefile.am
===================================================================
--- sandbox/jng/utfgrid/Server/src/Services/Rendering/Makefile.am	2017-05-31 15:11:44 UTC (rev 9194)
+++ sandbox/jng/utfgrid/Server/src/Services/Rendering/Makefile.am	2017-05-31 15:30:41 UTC (rev 9195)
@@ -37,6 +37,7 @@
   OpRenderMap.cpp \
   OpRenderTile.cpp \
   OpRenderTileXYZ.cpp \
+  OpRenderTileUTFGrid.cpp \
   OpQueryFeatures.cpp \
   OpQueryFeatureProperties.cpp \
   FeatureInfoRenderer.cpp \
@@ -53,6 +54,7 @@
   OpRenderMap.h \
   OpRenderTile.h \
   OpRenderTileXYZ.h \
+  OpRenderTileUTFGrid.h \
   OpQueryFeatures.h \
   OpQueryFeatureProperties.h \
   FeatureInfoRenderer.h \

Added: sandbox/jng/utfgrid/Server/src/Services/Rendering/OpRenderTileUTFGrid.cpp
===================================================================
--- sandbox/jng/utfgrid/Server/src/Services/Rendering/OpRenderTileUTFGrid.cpp	                        (rev 0)
+++ sandbox/jng/utfgrid/Server/src/Services/Rendering/OpRenderTileUTFGrid.cpp	2017-05-31 15:30:41 UTC (rev 9195)
@@ -0,0 +1,111 @@
+//
+//  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 "OpRenderTileUTFGrid.h"
+#include "LogManager.h"
+
+MgOpRenderTileUTFGrid::MgOpRenderTileUTFGrid()
+{
+}
+
+MgOpRenderTileUTFGrid::~MgOpRenderTileUTFGrid()
+{
+}
+
+void MgOpRenderTileUTFGrid::Execute()
+{
+    ACE_DEBUG((LM_DEBUG, ACE_TEXT("  (%t) MgOpRenderTileUTFGrid::Execute()\n")));
+
+    MG_LOG_OPERATION_MESSAGE(L"MgOpRenderTileUTFGrid");
+
+    MG_TRY()
+
+        MG_LOG_OPERATION_MESSAGE_INIT(m_packet.m_OperationVersion, m_packet.m_NumArguments);
+
+    ACE_ASSERT(m_stream != NULL);
+
+    if (6 == m_packet.m_NumArguments)
+    {
+        Ptr<MgMap> map = (MgMap*)m_stream->GetObject();
+        Ptr<MgResourceIdentifier> resource = map->GetResourceId();
+        map->SetDelayedLoadResourceService(m_resourceService);
+
+        STRING baseMapLayerGroupName;
+        m_stream->GetString(baseMapLayerGroupName);
+
+        INT32 x = 0;
+        m_stream->GetInt32(x);
+
+        INT32 y = 0;
+        m_stream->GetInt32(y);
+
+        INT32 z = 0;
+        m_stream->GetInt32(z);
+
+        INT32 tileDpi = 0;
+        m_stream->GetInt32(tileDpi);
+
+        BeginExecution();
+
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING((NULL == resource) ? L"MgResourceIdentifier" : resource->ToString().c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_STRING(baseMapLayerGroupName.c_str());
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(x);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(y);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(z);
+        MG_LOG_OPERATION_MESSAGE_ADD_SEPARATOR();
+        MG_LOG_OPERATION_MESSAGE_ADD_INT32(tileDpi);
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+        Validate();
+
+        Ptr<MgByteReader> byteReader = m_service->RenderTileUTFGrid(map, baseMapLayerGroupName, x, y, z, tileDpi);
+
+        EndExecution(byteReader);
+    }
+    else
+    {
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+        MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+    }
+
+    if (!m_argsRead)
+    {
+        throw new MgOperationProcessingException(L"MgOpRenderTileUTFGrid.Execute",
+            __LINE__, __WFILE__, NULL, L"", NULL);
+    }
+
+    // Successful operation
+    MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+    MG_CATCH(L"MgOpRenderTileUTFGrid.Execute")
+
+        if (mgException != NULL)
+        {
+            // Failed operation
+            MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+        }
+
+    // Add access log entry for operation
+    MG_LOG_OPERATION_MESSAGE_ACCESS_ENTRY();
+
+    MG_THROW()
+}

Added: sandbox/jng/utfgrid/Server/src/Services/Rendering/OpRenderTileUTFGrid.h
===================================================================
--- sandbox/jng/utfgrid/Server/src/Services/Rendering/OpRenderTileUTFGrid.h	                        (rev 0)
+++ sandbox/jng/utfgrid/Server/src/Services/Rendering/OpRenderTileUTFGrid.h	2017-05-31 15:30:41 UTC (rev 9195)
@@ -0,0 +1,33 @@
+//
+//  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_OP_RENDER_TILE_UTFGRID_H
+#define MG_OP_RENDER_TILE_UTFGRID_H
+
+#include "RenderingOperation.h"
+
+class MgOpRenderTileUTFGrid : public MgRenderingOperation
+{
+public:
+    MgOpRenderTileUTFGrid();
+    virtual ~MgOpRenderTileUTFGrid();
+
+public:
+    virtual void Execute();
+};
+
+#endif
\ No newline at end of file



More information about the mapguide-commits mailing list