Dane,

My tables do have SRID set in the geometry columns, but I have been having
problems using EPSG codes with mapnik.  When I use src=+init=epsg:2264 in my
xml file I get a blank map, so I have been using src=+proj=lcc +datum=NAD83
instead.  This works, but it looks like it may be the cause of the bad
lexical cast problem.

Looking at other emails on this list, I see that mapnik has a place to set
epsg codes ( allowedepsgcodes) in ogcserver.conf.  Do I have to use this
method, when using epsg codes?

In my current configureation I'm using mapnik with openlayers (Layer.WMS)
and tilecache (type=MapnikLayer), with eather mod_python (must restart
server, after each edit) or just cgi when editing maps.  Is there currently
a conventional way to setup mapniks ogcserver to work with tilecache?  I
currently I have epsg:2264 defined in both tilecache.cfg and in Openlayers.
Possibly I could just incorporate ogcserver's wms.py into my tilecache.py or
tilecache.cgi scripts?

Thanks
Jim

On Thu, Apr 23, 2009 at 6:59 PM, Dane Springmeyer <[email protected]>wrote:

> 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