Re: [osmosis-dev] Closed ways -> polygons?
On Mon, Dec 21, 2009 at 4:13 PM, Marcus Wolschon wrote: > What exactly do you mean with converting closed ways into polygons? > Closed ways ARE already polygons. > A closed way tagged barrier=fence is a polygon? ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] Closed ways -> polygons?
On Tue, Dec 22, 2009 at 12:42:49AM +0100, Frederik Ramm wrote: > Hi, > > Lennard wrote: > > David Carmean wrote: > > > >> I found that osm2pgsql omitted several attributes that I require. Also, > >> the > >> schema created by osmosis is more suitable to my needs. > > > > If these attributes are the user, uid, version and timestamp, check out > > http://trac.openstreetmap.org/changeset/19144 > > And if they are other attributes, then it is very likely that you will > be able to modify the osm2pgsql style file to suit your needs. > > This is probably going to be easier than trying to build proper > multipolygons from data imported by osmosis, unless you are a real SQL > wizard. Aye. Part of my problem is that I haven't been able to build osm2pgsql under Cygwin/Vista64, and thus can't add the above patch. Vista64 is the only environment I currently possess to run this under; hopefully within a few weeks I can build a Linux server with adequate storage and CPU. I have also considered using a combination of the two toolsets. ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] Closed ways -> polygons?
Hi, David Carmean wrote: > If nothing else it appears that I could write a query using PostGIS functions > that will do what I want: > > http://postgis.refractions.net/documentation/manual-1.3/ch06.html#IsClosed Be advised that multipolygons may consist of any number of outer and inner ways which do not have to be closed themselves, they only have to form a closed ring. It will certainly be hard (but certainly not impossible) to do this with SQL alone. Bye Frederik -- Frederik Ramm ## eMail frede...@remote.org ## N49°00'09" E008°23'33" ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] Closed ways -> polygons?
Hi, Lennard wrote: > David Carmean wrote: > >> I found that osm2pgsql omitted several attributes that I require. Also, the >> schema created by osmosis is more suitable to my needs. > > If these attributes are the user, uid, version and timestamp, check out > http://trac.openstreetmap.org/changeset/19144 And if they are other attributes, then it is very likely that you will be able to modify the osm2pgsql style file to suit your needs. This is probably going to be easier than trying to build proper multipolygons from data imported by osmosis, unless you are a real SQL wizard. Bye Frederik -- Frederik Ramm ## eMail frede...@remote.org ## N49°00'09" E008°23'33" ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] Closed ways -> polygons?
David Carmean wrote: > I found that osm2pgsql omitted several attributes that I require. Also, the > schema created by osmosis is more suitable to my needs. If these attributes are the user, uid, version and timestamp, check out http://trac.openstreetmap.org/changeset/19144 -- Lennard ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] Closed ways -> polygons?
On Mon, Dec 21, 2009 at 10:25:52PM +0100, Frederik Ramm wrote: > Are you aware of osm2pgsql, a tool which has nothing to do with Osmosis > but does roughly what you want? I found that osm2pgsql omitted several attributes that I require. Also, the schema created by osmosis is more suitable to my needs. If nothing else it appears that I could write a query using PostGIS functions that will do what I want: http://postgis.refractions.net/documentation/manual-1.3/ch06.html#IsClosed ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] Closed ways -> polygons?
When I import a .osm file into PostGIS, using osmosis (dumping to a COPY file), all I get are POINT and LINESTRING WKB geometry columns, but no POLYGON WKB columns . The linstrings from what OSM knows as Closed Ways do have the first and last points with identical coordinates, but since they are not OGC POLYGON types neither PostGIS nor apps connecting to it recognize the feature as a polygon. On Mon, Dec 21, 2009 at 10:13:02PM +0100, Marcus Wolschon wrote: > What exactly do you mean with converting closed ways into polygons? > Closed ways ARE already polygons. What more is there to convert? > > Marcus > > ___ > osmosis-dev mailing list > osmosis-dev@openstreetmap.org > http://lists.openstreetmap.org/listinfo/osmosis-dev ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] Closed ways -> polygons?
Hi, David Carmean wrote: > I'm attempting to use OSM data, as imported to PostGIS via Osmosis, as > layers in a project in some GIS software; I've had some success crafting > queries to pull highways into a separate table, and am now working on > hydrologic features. My current roadblock is: how/where can I convert > closed OSM ways into polygons? And then of course there will be > multipolygons. Are you aware of osm2pgsql, a tool which has nothing to do with Osmosis but does roughly what you want? Bye Frederik -- Frederik Ramm ## eMail frede...@remote.org ## N49°00'09" E008°23'33" ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
Re: [osmosis-dev] Closed ways -> polygons?
What exactly do you mean with converting closed ways into polygons? Closed ways ARE already polygons. What more is there to convert? Marcus ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev
[osmosis-dev] Closed ways -> polygons?
I'm attempting to use OSM data, as imported to PostGIS via Osmosis, as layers in a project in some GIS software; I've had some success crafting queries to pull highways into a separate table, and am now working on hydrologic features. My current roadblock is: how/where can I convert closed OSM ways into polygons? And then of course there will be multipolygons. Is this something better done in PostGIS? Is this a feature of osmosis that has a different name than I'm looking for? Thanks. (I'd also be interested in discussing/sharing queries with people who are similarly using OSM data in a PostgreSQL/PostGIS server backend for GIS software.) ___ osmosis-dev mailing list osmosis-dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/osmosis-dev