Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSM Bright — function setsrid(box3d, integer) does not exist #1364

Closed
ghost opened this issue Apr 9, 2012 · 4 comments
Closed

OSM Bright — function setsrid(box3d, integer) does not exist #1364

ghost opened this issue Apr 9, 2012 · 4 comments
Milestone

Comments

@ghost
Copy link

ghost commented Apr 9, 2012

Hi,

I'm setting up the OSM Bright template on Mac OS X 10.7.3, following this guide: http://mapbox.com/tilemill/docs/guides/osm-bright-mac-quickstart/

Everything seems to have gone ok until the end of step 3 — loading the project in Tilemill. I waited about 1 hour for the cache directory to populate with about 1GB of additional data. However I immediately got the error:

function setsrid(box3d, integer) does not exist

Full error details are below:

Postgis Plugin: PSQL error:
ERROR: function setsrid(box3d, integer) does not exist
LINE 6: AND ST_SetSRID(way,900913) && SetSRID('BOX3D(-1.79769313...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Full sql was: 'SELECT * FROM ( SELECT COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type,
name, way_area AS area,
ST_PointOnSurface(way) AS way
FROM planet_osm_polygon
WHERE name IS NOT NULL
AND ST_SetSRID(way,900913) && SetSRID('BOX3D(-1.797693134862316e+308 -1.797693134862316e+308,1.797693134862316e+308 1.797693134862316e+308)'::box3d, 900913)
AND ST_IsValid(way)

UNION ALL

SELECT 'building' AS type, name, way_area AS area,
ST_PointOnSurface(way) AS way
FROM planet_osm_polygon
WHERE name IS NOT NULL
AND building NOT IN ('', 'no', '0', 'false')
AND ST_SetSRID(way,900913) && SetSRID('BOX3D(-1.797693134862316e+308 -1.797693134862316e+308,1.797693134862316e+308 1.797693134862316e+308)'::box3d, 900913)
AND ST_IsValid(way)
ORDER BY area DESC
) AS data LIMIT 0'
(encountered during parsing of layer 'area_label' in map '/Users/carvillp/Documents/MapBox/project/OSMBright/')

Interestingly, when I look in the 'area_label' PostGIS layer details, the 'table or subquery' query does not mention any SetSRID function, rather t has the following in it:

( SELECT COALESCE(landuse, leisure, "natural", highway, amenity, tourism) AS type,
name, way_area AS area,
ST_PointOnSurface(way) AS way
FROM planet_osm_polygon
WHERE name IS NOT NULL
AND ST_SetSRID(way,900913) && !bbox!
AND ST_IsValid(way)

UNION ALL

SELECT 'building' AS type, name, way_area AS area,
ST_PointOnSurface(way) AS way
FROM planet_osm_polygon
WHERE name IS NOT NULL
AND building NOT IN ('', 'no', '0', 'false')
AND ST_SetSRID(way,900913) && !bbox!
AND ST_IsValid(way)
ORDER BY area DESC
) AS data

I tried removing the 'area_label' layer, but got a similar error on another layer.

Any ideas? Issue 1083 on the Mapnik GitHub repo seems to say that this bug was fixed in Mapnik 2 months ago: mapnik/mapnik#1083 Is there any way to update the Mapnik instance Tilemill is using?

thanks,
paul

@springmeyer
Copy link
Member

So I presume you are using PostGIS 2.0? We are planning on a TileMill 0.9.1 release very soon that will include latest mapnik with that fix from 1083.

@ghost
Copy link
Author

ghost commented Apr 9, 2012

I am. SELECT PostGIS_full_version() gives me:

POSTGIS="2.0.0 r9605" GEOS="3.3.2-CAPI-1.7.2" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.7.3" LIBJSON="UNKNOWN"

If I use PostGIS 1.5 will it fix this issue? Is it easy to downgrade 2.0 to 1.5? I'm using the binaries from http://www.kyngchaos.com/software/postgres

I'm trying to get some custom map tiles built by the end of this week. Any idea when the 0.9.1 release is coming :)

cheers

@springmeyer
Copy link
Member

0.9.1 either late this week or next. If it is possible to downgrade then that will be a much quicker workaround.

I'm going to close this issue since both fixes should work. Thanks for the report.

@MeenaTallapragada
Copy link

Thanks springmeyer :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants