Hi James,

The lexical cast error is coming from a boost function that is used to  
convert data types being pulled from postgis. Essentially what is  
happening is likely due to problems involved in calculating extents or  
the table srid, where data is not able to be correctly cast to a new  
type required by the PosGIS plugin.

The I've seen this occur when querying an empty table and having  
estimate_extent=True, because its impossible to convert null extents  
to the required types. We should likely insert more friendly error  
checking, but until then I would assume that lexical cast errors  
indicate a problem in the data or parameters used to query postgis.

So, in your example below it looks like you are providing a manual  
extent, so the above does not directly apply. But does your table have  
an SRID set in the geometry columns? Is that extent value correct/ 
valid for your data projection? Does your user have privileges to  
access all the tables including the geometry columns table?

Dane

On Apr 23, 2009, at 11:25 AM, James McManus wrote:

> I'm using mapnik with postgis and tilecache.  Everything appears to  
> be working, except I am getting the error message "bad lexical cast:  
> source type value could not be interpreted as target" in my httpd/ 
> error_log, even when I have debug set to off.  I would like to  
> resolve this, so my error_log does not fill up.  Below is part of  
> the error_output from the error_log:
>
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68]  
> datasource=0xbf8420 type=1
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68] size = 7
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68] dbname=wake
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68]  
> estimate_extent=false
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68]  
> extent=1947126.12, 596061.63, 2258533.48, 891583.72
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68]  
> host=localhost
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68]  
> table=wakepublicopenspace0902
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68] type=postgis
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68] user=apache
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68] bad  
> lexical cast: source type value could not be interpreted as target
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68] borrow  
> 0xbbb8f0
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68] unknown  
> type_oid=408585
> [Thu Apr 23 13:57:06 2009] [error] [client 71.120.222.68] return  
> 0xbbb8f0
>
> It appears to not like how I'm referenceing user?
>
> Jim
>
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to