[mapserver-users] Geometry_columns
Jeppe Lund Andersen
JXA at cowi.dk
Wed Sep 17 07:23:57 PDT 2008
Hello all
Wrote a few days ago but did not get any replay so I try again.
I upgradede mapserver from 4.8.4 to version 5.2 and gdal from 1.3.2. to
1.5.2
Now I get this error
Warning: [MapServer Error]: msDrawMap(): Failed to draw layer named
'ODBC'. in c:\inetpub\wwwroot\jar3\xmlkort.php on line 591
Warning: [MapServer Error]: msOGRFileNextShape(): No column definitions
found for table 'test', layer not usable. in
c:\inetpub\wwwroot\jar3\xmlkort.php on line 591 Fatal error: Call to a
member function on a non-object in c:\inetpub\wwwroot\jar3\xmlkort.php
on line 621
I found out that I had a row i geometry_columns that did not have a view
with that name, this was not a problem in mapserver 4.8.4
found in mapogr.cpp
static int
msOGRFileNextShape(layerObj *layer, shapeObj *shape,
msOGRFileInfo *psInfo )
that this code has been changed
***** cut out *****
**** from 5.2 ****
if( (hFeature = OGR_L_GetNextFeature( psInfo->hLayer )) == NULL )
{
if( CPLGetLastErrorType() == CE_Failure )
{
msSetError(MS_OGRERR, "%s", "msOGRFileNextShape()",
CPLGetLastErrorMsg() );
RELEASE_OGR_LOCK;
return MS_FAILURE;
}
else
{
RELEASE_OGR_LOCK;
if (layer->debug >= MS_DEBUGLEVEL_VV)
msDebug("msOGRFileNextShape: Returning MS_DONE (no
more shapes)\n" );
return MS_DONE; // No more features to read
}
}
***** cut out *****
***** cut out *****
*** from 4.8.4 ****
if( (poFeature = psInfo->poLayer->GetNextFeature()) == NULL )
{
return MS_DONE; // No more features to read
}
***** cut out *****
do you see any problem in changing the code to
if( (hFeature = OGR_L_GetNextFeature( psInfo->hLayer )) == NULL
)
{
return MS_DONE; // No more features to read
}
so that it doesnot check all rows in geometry_columns
and is there a reason why all rows in geometry_columns should have a
matching view ?
Jeppe Lund Andersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080917/53a3b4fc/attachment.htm>
More information about the MapServer-users
mailing list