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

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Tue May 31 07:48:23 BST 2011


Stefan Keller wrote:

> We're not targeting a rendering system but OSM web services which
> deliver OSM data in geospatial formats (incl. point, linestring and
> polygon).
>
> We're using heavily the hstore option and recently tried the slim mode
> (with varying success) because of out-of-memory problems:

If you aim at delivering OSM data in geospatial formats (incl. point,
linestring and polygon, why not to try WFS? It is pretty easy to set up a
OSM WFS service by using osm2pgsql for getting data into PostGIS and then
some standard WFS server for serving data out. Most obvious open source
alternatives are TinyOWS, deegree, GeoServer and MapServer. TinyOWS and
MapServer can also send all the tags from the hstore, but they are not
queryable yet. There is an open ticket about that
http://tinyows.org/trac/ticket/70 and Olivier Courtin has made some
preliminary thinking about how to make hstore queryable through WFS.

My demo service at http://188.64.1.61/cgi-bin/tinyows is already serving
osm_point, osm_line and osm_polygon feature types from Finland. It is also
serving all the free datasets from the National Land Survey of Finland,
for example 800000 named places. Perhaps by the end of this week there
will be a new Kosmo 2.0.1 release (http://opengis.es/) which can do pretty
nice attribute and spatial queries in a very user friendly way. There was
a need to make some enhancements to the current 2.0 version but they are
about ready now. Spatial queries do not mean just BBOX, also these are
supported: Disjoint, Equals, DWithin, Beyond, Intersects, Touches,
Crosses, Within, Contains, Overlaps. In addition, these comparison
operators are supported: EqualTo, NotEqualTo, LessThan, GreaterThan,
LessOrEqualTo, GreaterOrEqualTo, Between, Like.
I do know that OSM prefers to do things differently, but I would suggest
to have at least a look at WFS even it is an OGC standard and soon used by
thousands of INSPIRE download services.

-Jukka Rahkonen-




More information about the dev mailing list