Hello Christian: Thank you for answering my question. This is definitely extremely helpful.
On Wed, Jul 30, 2014 at 1:29 PM, Christian Quest <[email protected]> wrote: > > The PostGIS in Action book has an interesting example of query: >> "Suppose the task at hand is to find the total length of all interstate >> highways in the state of Utah. We search for two tables: one with the >> polygons for all the states and one with all interstate highways in the >> United States, represented as linestrings. Next we extract the polygon that >> represents Utah from the states table and perform an SQL join with the >> highways table using >> the geometric intersects function as the join operator and geometric >> intersection as >> our output function. The output of that query would be those portions of >> all highways >> within the state of Utah." >> >> Is such a query doable with the postgis database generated by osm2pgsql? >> > > Yes > > It is not designed for that, but I regularly use it that way. > Be aware that osm2pgsql does not keep all OSM data and tags. This is > controlled by the style file (or style LUA script) during import. > Be aware also of the map projection. By default osm2pgsql will reproject > OSM lat/lon into web mercator coordinates. Doing real distance based > queries will require reprojection... > > When you say that osm2pgsql will reproject OSM lat/lon into web mercator, and that real distance calculation will require reprojection, do you actually mean re-importing the data in a different manner in the database, or is there a way to do the conversion on the fly with a query or using custom client code? Again, thank you for all your help!
_______________________________________________ dev mailing list [email protected] https://lists.openstreetmap.org/listinfo/dev

