I hope you can help as I am tearing my hair out here. Do any of you elite geo peeps have any idea why some specific functions could be missing from my PostGIS install?
I am trying to use Mapnik with PostGIS but when I try to run queries from Python it fails with an error of:
ERROR: function st_extent(geography) does not exist at character 73 HINT: No function matches the given name and argument types. You might need to add explicit type casts. STATEMENT: SELECT ST_XMin(ext),ST_YMin(ext),ST_XMax(ext),ST_YMax(ext) FROM (SELECT ST_Extent(geom) as ext from reseller_map_core_reseller) as tmp
This is the part of the mapnik code:
shapes = mapnik.Layer('Geometry from PostGIS') shapes.datasource = mapnik.PostGIS(host='localhost', user='user', password='password', dbname='sales_map', table='sales_map_core_sales', geometry_field='geom', srid='4326') shapes.styles.append('My Style') m.layers.append(shapes)
I'm just trying to overlay all of the regions from the selected table onto my mapnik generated image.
I have installed PostGIS successfully, created a spatial db using extensions and my other GeoDjango/PostGIS seems to work so far.
I have looked in the db using pgAdmin and I can see that the st_extents() is missing from the list for some reason even though the others seem to be there.
Any ideas why this specific function (and possibly others) could be missing when I have installed everything?
I am using:
- PostGIS: 2.0.3
- Postgresql: 9.2.3
- Mapnik 2.10
Thanks for your help!