New answers tagged

0

The issue (after removing all the ":" from column names) is the column named "natural", which apparently causes problems because it is a reserved word. I changed the column name to "nat" and now can view the data in ArcGIS without errors. The ArcGIS OSM extension recommended above seems to have a way around this (see ...


5

If you have imported a planet or extract some time ago and have now downloaded a (much) newer planet or extract: It does not really make sense to do any updating as I think calculating and applying the diff will not save you time. Just re-run osm2pgsql again and it will remove the tables and create new ones resulting in updated data. If you want to keep ...


0

You have not written what you want to do with the stops or why you want to know which stop belongs to which route. This might influence what the best solution to your problem is. The data you need is in the DB. If we look at Relation 1658527 as example you get the routes out of planet_osm_line by looking for osm_id -1658527. The information about the stops ...


0

I realized that it is possible to cast from the Geometry object to the Geography object using the SQLAlchemy function, despite the two not being native SQLAlchemy objects. query = session.query(Route).filter(func.ST_Distance(cast(Route.way,Geography),'SRID=4326;POINT(10.71223 47.69716)') < distance )


0

If your route.way is already in WGS84, EPSG:4326, then casting should be possible. I have not used GeoAlchemy2 but based on your syntax it should be: query = session.query(Route).filter(func.ST_Distance(Route.way::geography,ST_GeomFromText('POINT(10.71223 47.69716)',4326)::geography) < distance


1

probably you are not entering correct password. Please make sure you can access db from pgAdmin. Then use same user/password (copy&paste).


3

The best method is, as you've found, osmconvert, or osmosis. With osmconvert, you can merge two files with osmconvert <(osmconvert a.pbf --out-o5m) <(osmconvert b.pbf --out-o5m) -o merged.pbf or, if you want to use o5m as an intermediate format, osmconvert <(osmconvert a.pbf --out-o5m) <(osmconvert b.pbf --out-o5m) -o merged.o5m With osmosis, ...



Top 50 recent answers are included