[OSM-dev] osm2pgsql output possible to work with Java XAPI?

Ian Dees ian.dees at gmail.com
Tue May 31 23:57:12 BST 2011

On Tue, May 31, 2011 at 5:48 PM, Stefan Keller <sfkeller at gmail.com> wrote:

> Hi Ian, hi all
> 2011/5/31 Ian Dees <ian.dees at gmail.com> wrote:
> > Since OSM format (and thus XAPI/JXAPI) does not natively support
> polygons,
> > you'll have to come up with something else to use to query the database.
> > osm2pgsql will convert OSM data to polygons for you, but it does not
> offer a
> > way to query for those polygons.
> Thanks for the hints.
> As I also said to Jukka: the webservices and the query component are
> not my problem - the import software is. I'm using PostGIS-Terminal
> and an enhanced FeatureServer as query components.
> Given my use case I still tend to prefer to adapt osm2psql. Here I
> still don't understand why JXAPI does not get all data required to
> build a response XML: osm2pgsql outputs tables
> osm_nodes,osm_rels,osm_ways (as well as
> osm_line,osm_point,osm_polygon,osm_roads). To complete the OSM XML to
> me what it's missing is perhaps the XML attribute 'version' in the
> tables.
> Can somebody explain why this doesn't work and what coding to enhance
> osm2pgsql this would mean?

Osmosis/JXAPI is looking for some pgsnapshot-specific things (including
schema version numbers, tags stored in an hstore, etc.) that won't be there
unless you heavily modify osm2pgsql.

As I said earlier, JXAPI is meant *specifically* to generate OSM XML and
nothing else. I would recommend that you not use JXAPI as you're not trying
to generate OSM XML output.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110531/62b7f663/attachment.html>

More information about the dev mailing list