[fdo-commits] r2448 - trunk/Providers/OGR
svn_fdo at osgeo.org
svn_fdo at osgeo.org
Wed Jan 31 18:09:34 EST 2007
Author: traianstanev
Date: 2007-01-31 18:09:34 -0500 (Wed, 31 Jan 2007)
New Revision: 2448
Modified:
trunk/Providers/OGR/OGRProvider.vcproj
trunk/Providers/OGR/OgrFdoUtil.cpp
Log:
fix intersection and FID query issues.
Modified: trunk/Providers/OGR/OGRProvider.vcproj
===================================================================
--- trunk/Providers/OGR/OGRProvider.vcproj 2007-01-29 22:22:21 UTC (rev 2447)
+++ trunk/Providers/OGR/OGRProvider.vcproj 2007-01-31 23:09:34 UTC (rev 2448)
@@ -120,7 +120,7 @@
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="1"
- AdditionalIncludeDirectories="..\..\Fdo\Unmanaged\Inc;"gdal\gdal-1.3.2\ogr";"gdal\gdal-1.3.2\ogr\ogrsf_frmts";"gdal\gdal-1.3.2\port""
+ AdditionalIncludeDirectories="..\..\\Fdo\Unmanaged\Inc;"gdal\gdal-1.4.0\ogr";"gdal\gdal-1.4.0\ogr\ogrsf_frmts";"gdal\gdal-1.4.0\port""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OGRPROVIDER_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@@ -139,9 +139,9 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="fdo.lib fdocommon.lib fdogeometry.lib ogr.lib cpl.lib ogrsf_frmts.lib ogrsf_frmts_sup.lib proj.lib geos.lib libpq.lib wsock32.lib oci.lib"
+ AdditionalDependencies="fdo.lib fdocommon.lib fdogeometry.lib ogr.lib cpl.lib ogrsf_frmts.lib ogrsf_frmts_sup.lib proj.lib geos.lib libpq.lib wsock32.lib oci.lib geos_c.obj"
LinkIncremental="1"
- AdditionalLibraryDirectories=""gdal\gdal-1.3.2\ogr\";"gdal\gdal-1.3.2\port";"gdal\gdal-1.3.2\ogr\ogrsf_frmts";d:\oracle\product\10.2.0\client_1\oci\lib\msvc;"gdal\proj-4.4.9\src";"gdal\geos-2.2.0\VisualStudio\Release";"gdal\postgresql-8.1.4\src\interfaces\libpq\Release";..\..\Fdo\Unmanaged\lib\win32\release"
+ AdditionalLibraryDirectories=""gdal\gdal-1.4.0\ogr\";"gdal\gdal-1.4.0\port";"gdal\gdal-1.4.0\ogr\ogrsf_frmts";e:\oracle\oci\lib\msvc;"gdal\proj-4.5.0\src";"gdal\geos-2.2.3\source\";"gdal\postgresql-8.2.1\src\interfaces\libpq\Release";..\..\\Fdo\Unmanaged\lib\win32\release;"gdal\geos-2.2.3\source\capi""
DelayLoadDLLs="oci.dll;fdo.dll;fdogeometry.dll;"
GenerateDebugInformation="true"
SubSystem="2"
Modified: trunk/Providers/OGR/OgrFdoUtil.cpp
===================================================================
--- trunk/Providers/OGR/OgrFdoUtil.cpp 2007-01-29 22:22:21 UTC (rev 2447)
+++ trunk/Providers/OGR/OgrFdoUtil.cpp 2007-01-31 23:09:34 UTC (rev 2448)
@@ -306,6 +306,10 @@
FdoFilter* spatial = NULL;
FdoFilter* attr = NULL;
+ //zero out the filters
+ layer->SetAttributeFilter(NULL);
+ layer->SetSpatialFilter(NULL);
+
//this is lame, but much shorter than implementing
//all of FdoIFilterProcessor and FdoIExpressionProcessor
if (dynamic_cast<FdoSpatialCondition*>(filter))
@@ -364,7 +368,29 @@
}
else if (sc->GetOperation() == FdoSpatialOperations_Intersects)
{
- //TODO: must implement this for selection to work in the AJAX viewer.
+ //Intersects is used for selection of features by the MapGuide AJAX viewer
+
+ FdoPtr<FdoExpression> expr = sc->GetGeometry();
+ FdoGeometryValue* geomval = dynamic_cast<FdoGeometryValue*>(expr.p);
+
+ if (geomval)
+ {
+ FdoPtr<FdoByteArray> fgf = geomval->GetGeometry();
+
+ unsigned char* wkb = (unsigned char*) alloca(fgf->GetCount());
+
+ int len = Fgf2Wkb(fgf->GetData(), wkb);
+
+ OGRGeometry* geom = NULL;
+ OGRGeometryFactory::createFromWkb(wkb, NULL, &geom, len);
+
+ if (geom)
+ layer->SetSpatialFilter(geom);
+ else
+ printf ("failed to convert intersects spatial filter geometry value");
+
+ OGRFree(geom);
+ }
}
}
}
More information about the fdo-commits
mailing list