Open rsvancara opened 7 years ago
@rsvancara what version of tegola are you using?
When debugging I would start at the SQL. You can turn on SQL debug statements by setting the environment variable SQL_DEBUG=EXECUTE_SQL
which will show you the SQL that is being run. You can then run that output against PostGIS to see if you're getting features back. If the result set is 0 then this is where the issue is. If the result set is above 0 the I would suspect the issue is with the your client side styles.
I am using the latest tegola build. Here is a sample query:
SELECT "osm_id", "access", "addr:housename", "addr:housenumber", "addr:interpolation", "admin_level", "aerialway", "aeroway", "amenity", "barrier", "bicycle", "bridge", "boundary", "building", "construction", "covered", "foot", "highway", "historic", "horse", "junction", "landuse", "layer", "leisure", "lock", "man_made", "military", "name", "natural", "oneway", "place", "power", "railway", "ref", "religion", "route", "service", "shop", "surface", "tourism", "tracktype", "tunnel", "water", "waterway", "way_area", "z_order", "tags", ST_AsBinary("way") AS "way" FROM planet_osm_roads WHERE "way" && ST_MakeEnvelope(1.3658379708320316e+07,6.026906805390624e+06,1.3697515466796879e+07,5.9877710469140615e+06,3857);
@rsvancara just to confirm, you're using v0.4.0-alpha?
Did you test that query against your database to confirm it returned features?
Yes, I am using v0.4.0-alpha.
That is the query and it is not returning features. I guess I dont understand how to find my bounding box to query for features. I have only loaded north america as my region.
Thanks,
@rsvancara I think the issue might be your import actually (sorry I missed that initially). When working with the OSM PBF extracts you will want to use a tool like imposm3 to convert from the node / ways storage that OSM uses.
We have a repo to help with setting up tegola and OSM. It comes with imposm3 mapping files, tegola config files, and mapbox-gl style files. Check out tegola-osm.
@rsvancara were you able to get setup using tegola and OSM? I would like to close this issue unless you're still in need of assistance.
@ARolek where are the mapbox-gl style files ?
@MohammedAlsayed All the styles that use the tegola-osm schema and can be seen at demo.tegola.io can be found in the demo repo at https://github.com/go-spatial/tegola-web-demo/tree/master/styles.
Surprised that this is still open, but anyway: osm2pgsql -is- an importer for OSM data than instantiates geometries in a Postgres/PostGIS database and matter of fact it is the by far the most popular one as it hits a sweet spot between enabling rendering and still remaining close to the original OSM data.
It would be very nice if there were pre-made examples that support the osm2pgsql schema and not only imposm and would likely do wonders for tegolas adoption.
@simonpoole I completely agree I just have not carved out time to build the tegola config and test it with osm2pgsql schema. I would gladly help with this effort and I think it would make a great addition to the tegola-osm repo. That repo could be reorganized to show examples from imposm, osm2pgsql and OpenMapTiles. Ideally there would be example configs for each schema and associated base styles.
Would you be interested in helping with the effort?
@arolek I'd be interesting in helping with this effort as well.
Well I can at least give a couple of pointers if necessary.
I like this project and I want to like it even more. But using this with open street map data in post GIS seems problematic. My configuration is as follows and really all I want to do is just have something work.
My config:
The database has the following tables:
public | planet_osm_line | table | gis public | planet_osm_nodes | table | gis public | planet_osm_point | table | gis public | planet_osm_polygon | table | gis public | planet_osm_rels | table | gis public | planet_osm_roads | table | gis public | planet_osm_ways | table | gis
But the map displays nothing. I am trying to use this with mapbox-gl as the client. I was able to get the sample data and configuration to work. I used osm2pgsql to load the data into postgis?
The client configuration is:
R