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
Cannot detect SRID for layer #944
Comments
Interesting that your SRID is 0 - perhaps an osm2pgsql bug when used with postgis 2.0 - needs looking into. Can you post the result of |
Yes, this 0 SRID is interesting. In PostGIS 2.0 geometry_columns is a view which is based on real data, not physical table, maybe osm2pgsql is not aware of that. I now got also explain results
My quick query was:
(3 rows) Just upgraded to latest mapnik from github - no difference there. |
thanks for the extra details - will be helpful to replicate. In the meantime you should just pass: <Parameter name="srid">900913</Parameter> in your osm.xml config to ensure this lag does not happen (allows mapnik to skip the query, both the one that is failing that hits geometry_columns and the one that is hanging). Please, do this and let me know if you see other hangs later on with these big tables. There may be other postgis 2.x subtle incompatibilities. I'll try to get postgis 2.x running locally to replicate the first issue this week, latest early next week. |
Adding this finally helped. There was one another issue with PostGIS 2.0: there is no asBinary() function. My quick check did not find any reference that it was deprecated or something. I restored it with following SQL in database, but perhaps in mapnik you should use st_asbinary(geometry) which is there for sure.
|
yep, w'ere aware of the ST_binary issue and have a separate ticket for it which will get fixed shortly, thanks and nice workaround. |
update on this: I installed postgis trunk and osm2pgsql trunk and did not see this problem (of Going to leave this issue open until i have time to look into the issue of the slow query, if the srid is not known (since likely this condition could still be hit by some edge cases). |
closing, not actionable. original problem was 0 srid written by osm2pgsql, not much we can do on the mapnik side. |
WIth OSM planet rendering hangs with following query:
Freezes means that the query stays running for ages (hours at least, maybe even more), and IO is heavily consumed, so I suspect full scan happening. I try to make explain analyze, but not sure if it will complete any time soon.
Style file is osm "mapnik" style converted for mapnik2. The layer definition is following. It seems to have SRID definition already, so why this query is done anyway?
The text was updated successfully, but these errors were encountered: