TileStache / TileStache

A stylish alternative for caching your map tiles.

Home Page:http://tilestache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tilestache: Not able to render data from postGIS SQL

Akulkarni1 opened this issue · comments

my tilestache.cfg is as below:
{
"cache": {
"name": "Disk",
"path": "mnt/tile-cache/"
}
,
"layers":
{
"countries":
{
"provider": {
"name": "vector",
"driver": "PostgreSQL",
"parameters":
{
"dbname": "test1",
"host" : "localhost",
"port" : "5432",
"user": "postgres",
"password":"postgres",
"table": "ne_110m_admin_0_countries",
"query":"SELECT admin, ST_Y(ST_Centroid(wkb_geometry)) as lattitude FROM ne_110m_admin_0_countries;"

         }}}}}

I am getting error as

File "/usr/local/lib/python2.7/dist-packages/TileStache-1.51.6-py2.7.egg/TileStache/init.py", line 303, in requestHandler2
print >> out, 'Known unknown!'

URL using is as below

I am using URL as localhost:8080/countries/1/1/1.json

Not able to render data.

Can you please provide the content of the response?

Also, can you confirm that you are running python 2.7.x?

What’s the admin column? If it’s not a PostGIS geometry, then I’m guessing you’re not selecting one and TileStache has nothing to return in vector form.

Hi,
I am using python 2.7.x.
I tried with below query.
Select gid,geom AS geometry from public.be-water-area_multiploygon
from the table below.
image
below is the response
image

image

Please help me with the above.

Thanks in advance.
Best regards,
Amit.

ok , shall try with the same.
Thanks for the help.

Able to render the data.
Thanks for the help.

@Akulkarni1 Where did you use "io.BytesIO" to get it working?