-
-
Notifications
You must be signed in to change notification settings - Fork 38
Reporting tegola rendering issues
So you have encountered a rendering bug in tegola and would like it fixed. We would like to help! Please use the following guide to help provide context and the necessary information we need to start working on a solution.
This will tell tegola to spit out the SQL used to query PostGIS for each layer:
$ TEGOLA_SQL_DEBUG=EXECUTE_SQL ./tegola serve --config tegola.toml --no-cache
This will allow us to focus on only the tile that's having an issue
$ curl localhost:8080/maps/osm/10/164/397.pbf
Once you have issued the curl command, check the tegola logs which will have various statements which look like:
2019/09/18 16:49:12 postgis.go:523: TEGOLA_SQL_DEBUG:EXECUTE_SQL for layer (waterway): SELECT ST_AsBinary(geometry) AS geometry FROM layer_waterway(ST_MakeEnvelope(-1.3619855446069947e+07,4.460864970101929e+06,-1.357949669514099e+07,4.501223721030884e+06,3857), 10)
Find the SQL that's specific to the layer which has the rendering issue. In the above statement, the layer is named "waterway"
Using the SQL from the previous step, we can now extract the geometries from PostGIS. We need to make one change to the query, so let's use the following query as an example:
SELECT ST_AsBinary(geometry) AS geometry FROM layer_waterway(ST_MakeEnvelope(-1.3619855446069947e+07,4.460864970101929e+06,-1.357949669514099e+07,4.501223721030884e+06,3857), 10)
Looking at the above SQL, we're going to change ST_AsBinary(geometry)
to ST_AsText(geometry)
. This will output the geometry as WKT which is what we use for building test cases. The new SQL should look something like:
SELECT ST_AsText(geometry) AS geometry FROM layer_waterway(ST_MakeEnvelope(-1.3619855446069947e+07,4.460864970101929e+06,-1.357949669514099e+07,4.501223721030884e+06,3857), 10)
Now connect to PostGIS using psql
:
$ psql -U postgres -d osm
Now run the SQL and export to CSV using the \copy
command
osm# \copy (SELECT ST_AsText(geometry) AS geometry FROM layer_waterway(ST_MakeEnvelope(-1.3619855446069947e+07,4.460864970101929e+06,-1.357949669514099e+07,4.501223721030884e+06,3857), 10)) to '/tmp/geom_query.csv' with csv
Open an issue with the following details:
- The Z/X/Y value of the tile which is having an issue
- The csv of the WKT output from PostGIS
- A screenshot of error
That's it! Thanks for reporting the issue.