[mapserver-commits] r8526 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Feb 11 08:07:56 EST 2009
Author: tamas
Date: 2009-02-11 08:07:56 -0500 (Wed, 11 Feb 2009)
New Revision: 8526
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapogr.cpp
Log:
Removed the error generation when the OGR layer contains no fields (#2883)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-02-10 22:02:28 UTC (rev 8525)
+++ trunk/mapserver/HISTORY.TXT 2009-02-11 13:07:56 UTC (rev 8526)
@@ -12,6 +12,8 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+- Removed the error generation when the OGR layer contains no fields (#2883)
+
- Added enhancements to mapogr.cpp for style annotations (#2879)
- Fixed memory leaks when using msUpdate*FromString methods. (#2857)
Modified: trunk/mapserver/mapogr.cpp
===================================================================
--- trunk/mapserver/mapogr.cpp 2009-02-10 22:02:28 UTC (rev 8525)
+++ trunk/mapserver/mapogr.cpp 2009-02-11 13:07:56 UTC (rev 8526)
@@ -1641,16 +1641,17 @@
char **items;
const char *getShapeStyleItems;
- if((hDefn = OGR_L_GetLayerDefn( psInfo->hLayer )) == NULL ||
- (totalnumitems = numitems = OGR_FD_GetFieldCount( hDefn )) == 0)
+ if((hDefn = OGR_L_GetLayerDefn( psInfo->hLayer )) == NULL)
{
msSetError(MS_OGRERR,
- "OGR Connection for layer `%s' contains no fields.",
+ "OGR Connection for layer `%s' contains no field definition.",
"msOGRFileGetItems()",
layer->name?layer->name:"(null)" );
return NULL;
}
+ totalnumitems = numitems = OGR_FD_GetFieldCount( hDefn );
+
getShapeStyleItems = msLayerGetProcessingKey( layer, "GETSHAPE_STYLE_ITEMS" );
if (getShapeStyleItems && EQUAL(getShapeStyleItems, "all"))
totalnumitems += numStyleItems;
More information about the mapserver-commits
mailing list