[OSM-dev] XAPI - Source code

Ian Dees ian.dees at gmail.com
Mon Jan 3 16:31:08 GMT 2011


On Mon, Jan 3, 2011 at 10:21 AM, arminus <arminus at gmail.com> wrote:

>
> @Ian:
>
> > The grammar that I published parses the examples on the xapi wiki page
> > just
> > fine. The hard part now is converting those in to SQL statements while
> > maintaining speed.
>
> In which stage is this code presently ? I managed to build it, but when I
> try to actually run a query, I get
>
> Exception in thread "main" org.springframework.jdbc.BadSqlGrammarException:
> PreparedStatementCallback; bad SQL grammar [CREATE TEMPORARY TABLE
> bbox_nodes ON COMMIT DROP AS SELECT * FROM nodes WHERE (geom && ?)]; nested
> exception is org.postgresql.util.PSQLException: Unknown type geometry.
>        at
>
> org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:98)
>
> (postgis-2.0.0SVN.jar is in my build path)
>

The code is working relatively well for some use cases last I checked. That
particular error looks like your schema isn't set up correctly.

Some things to check:
1) Are you using the Osmosis pgsnapshot schema?
2) Did you apply the *_linestring.sql file to the database?

-Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110103/6eb4136f/attachment.html>


More information about the dev mailing list